Thursday, 11 December 2008

 

Explaining the gibberish in my status updates

I was asked yesterday what the "gibberish" was in my status update on Facebook. I tried to explain it in a comment, but really, I ran out of space, and not being able to show people what I was talking about makes it a bit difficult!

So, here's what I wrote:
@nikdoof @dantheman @fabsh A #LUGCamp or #FOSSCamp would be a good idea, perhaps with keynotes by #UUPC, #LinuxOutlaws?
Because of the way that Facebook works, it can be updated by an external website - for example identi.ca or twitter



You will notice that both of these sites have a pretty standard template. Picture on one side, name of person next to the photo and then a message, finished by the date of the message. Like blogs, facebook and myspace, these systems are starting to become ubiqutious. Most news channels now have a twitter feed, and during the recent Presidential Elections, Barack Obama used Twitter (amongst other Social Networking systems) to rally support.

Twitter and Identi.ca (and others) are collectively known as Micro-blogs, or Microblogging sites, because of the size of the updates, which is limited to 140 characters, which is set at this size to be used (initially) with SMS, as a single SMS message would contain the nickname of the person who sent the message and their message.

Most microblogging sites follow a common convention for referring to things, so people are usually prefixed by an @ sign (for example @jontheniceguy), and a subject of interest will be prefixed by the # symbol (for example #bcliverpool). So that explains the symbols, but how about the words?

Here's what I wrote again:
@nikdoof @dantheman @fabsh A #LUGCamp or #FOSSCamp would be a good idea, perhaps with keynotes by #UUPC, #LinuxOutlaws?
So, we now know that I wrote to three people, nikdoof, dantheman and fabsh, the last two are presenters of a podcast, and the first the organiser of the Liverpool Linux Users Group, and I proposed that we should organise a "LUGCamp or FOSSCamp". LUG stands for Linux Users Group and FOSS (sometimes written as FLOSS) stands for Free (Libre) and Open Source Software. Linux is the basis of an alternative operating system to Windows or MacOS, but unlike Windows or OS X, it has a permissive license, which allows it to be given away for free, and installed on as many computers as the user wishes, without requiring any license feeds to be paid.

My inspiration for this event was another event I attended this past weekend, which was a "BarCamp". Now, a BarCamp is not something to do with drinking (although plenty occurred), but instead refers to computing jargon. A BarCamp is an "Unconference", where participants of the event, on their arrival, decide if they will be doing a talk, and if so, indicate to all the other participants by putting the details of their talk on a post-it note, which they then place on the schedule, which is usually a blank sheet of paper just detailing the available rooms. A BarCamp will tend to discuss computer topics, but can just as easily have a discussion about hypnotism, environmental issues or football! It tends to be a "geeky" event, but that isn't to say that non-geeks aren't welcome - in fact, frequently they will be welcomed to the group and encouraged to talk about what they are expert in.

By proposing that we organise a LUGCamp (a BarCamp for Linux Users) or a FOSSCamp (a BarCamp for those involved in Free and Open Source Software), I want to encourage the use of truely Free Software (which includes Linux based Operating Systems), and Open Source Software (of which Free Software is a subet), and I think a BarCamp like event would be a good way to start something up.

The last part of my text suggested that the keynote speeches (usually the inspirational talk given by a community leader or business director at the beginning or end of a conference) would be given by podcasters from the Ubuntu UK PodCast or the LinuxOutlaws Podcast. A podcast is a recorded audio or video show that is distributed via a web server and announced to RSS readers or specific "Pod Catching" software using an RSS feed.

I hope I've not missed anything out in explaining this properly, and if there's anything here I've missed, please let me know, either in the comments of this blog, or by e-mail.

Labels: , , , , , , ,


Monday, 1 September 2008

 

SMS to Laconi.ca - An introduction

I've not posted in a while, but I thought I'd put together some notes about a little project I started to help out the Laconi.ca community.

Just to introduce Laconi.ca for those who don't already know about it; it's a federated micro-blogging system. You might have heard about this from people talking about identi.ca (which is the best known implementation of the Laconi.ca code base).

So, what does my project do to help you?

A lot of these micro-blogging systems have their message sizes based on the size of an SMS text message, but the Laconi.ca code doesn't have a way of receiving text messages. The code I wrote allows members of the community to set up their own SMS gateway which, using the most complete Laconi.ca API (which just so happens to be based on the Twitter API) relays the message to any Laconi.ca (or, because it's based on the Twitter API - twitter) instance.

If you want to set up your own smsToLaconica gateway, the code is available from my Subversion Repository, but you will also need a few things.I set up Bluez using the Gnome Bluetooth tools by pairing the phone with the computer, but I know that not everyone has even a desktop on their Linux machines, so I've researched a little and found that everything we need can be done with one tool, hcitool.

Running the command
hcitool scan
will return
Scanning ...
11:22:33:44:55:66 MyDeviceName
where 11:22:33:44:55:66 is the Bluetooth ID of the device. Pair the device with the adaptor using the command
hcitool cc 11:22:33:44:55:66
Once the phone is paired, as root, edit /etc/bluetooth/rfcomm.conf and add the following text:
rfcomm0 {
bind yes;
device 11:22:33:44:55:66
channel 1;
}
again, using your own device's Bluetooth ID instead of 11:22:33:44:55:66. Restart the bluetooth service using
/etc/init.d/bluetooth restart
and then we need to configure Ser2Net.

WARNING: Ser2Net, by default, exposes a serial port as a general access telnet service with no restriction on who can access it. This does have a security implication in that once started, if your instance of the smsToLaconica scripts aren't using the port, then potentially any user of that system could connect to your mobile phone and dial out. This is solved by doing two things - 1) make sure your smsToLaconica script is always running and 2) allow ser2net only to bond to the localhost adaptor, not your ethernet adaptor by prefixing the port number with the IP address as detailed below. This still leaves this service open to local exploit, but ultimately your local users may have had access to the serial ports already.

Install ser2net (which is available in most Linux distributions) and edit the config file (again as root) in /etc/ser2net.conf, deleting the existing lines (unless you're likely to want to share your COM1: for anything else) and add the following line:
127.0.0.1,2000:telnet:600:/dev/rfcomm0:9600 8DATABITS NONE 1STOPBIT
Save this file, then restart the ser2net service with
/etc/init.d/ser2net restart
then telnet to localhost 2000. Confirm it works by sending the AT command to it - you should see a response of "OK", although you may also get a response of
AT

OK
Now you can set up the scripts for your own local copy of smsToLaconica. To make smsToLaconica work, you'll need php with php-curl and php-mysql, which are usually available from your repositories. You'll also need a MySQL server which stores the account details of your users and the messages before processing.

Check out a copy of the Subversion Repository (or just pull the files from the server) and put them in a NON-WEB-DIRECTORY. This is very important! Almost all of these files are not web pages, with the exceptions being ui.php and admin.php. If the only user on this SMS gateway is you, you don't even need to put those into a web directory (see the notes below). Edit the config.php file with appropriate settings and import the SQL table structure to the database configured in config.php, then finally call the run_scripts.sh (which just calls the read_sms.php and process_db.php scripts into the background).

If you put the ui.php and admin.php files into your web host, you will also need a copy of the config.php file. ui.php is where users configure their laconi.ca instance, username and password, and get told the mobile number to send an authorization code to. This is also the same page where they can remove their details from the gateway. The admin page shows how many users are on which Laconi.ca instances and any unhandled messages.

There is currently no index page for the web instance, and no user authentication, so you should probably configure .htaccess files for the admin page, if not remove it completely, or use it to send e-mails to the admin using crontab.

To set up the system without the web interface, you should insert a row into the database table called users, with the following columns completed: base_url, username, password and code. The code column should be something to send to the SMS gateway to associate your number with the service.

If you get stuck with any of this lot, please leave a comment, send me an e-mail or follow me on identi.ca

Labels: , , , ,


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]