VOIP Cisco 7940

Well, my Cisco 7940 IP phone arrived yeaterday, and I spent a while poking around on the web trying to upgrade it to SIP firmware to work with the asterisk exchange.

It arrived with me with version 3 SCCP firmware, and I had downloaded the Version 8 SIP firmware from the Cisco site – it’s available there for free, you just have to get it from an anonymous ftp server.

It appears though that you cannot do a single stage upgrade from version 3 to version 8, and that I was pretty stuck unless I could find an intermediate firmware – a version 6 sounded like the best bet. Now I don’t have a Cisco support contract for this – I believe from what I was reading that it’s not very expensive for one of these phones, but still, it goes against my better judgement. A little bit more poking around in various places, and I found voip-info.org a really useful source of information about voip of all sorts.

So I eventually managed to follow some of the instructions I found there, and got the phone upgraded to SIP version 6, then I had to get it integrated with the rest off the network.

I’ve already got a couple of PAP2’s hooked into an asterisk exchange, so I was already pretty familiar with that end of things, and it just needed me to add an entry for each line on the phone.

Then comes the fun bit, customising the graphics and services menu with xml served off a local web server, so now I’ve got tux on my 7940, and I’m writing some scripts for the web server to output XML for the phone.

iCal web publishing

iCal is a great application, but there are some things about it that bug me.

Apple really want you to pay money for their .mac service, and as such if you want to publish your calendars, it’s either that or set up WebDAV. Now I run my own server, and I could probably install WebDAV, but I’m really not that inclined to, so I decided to use a more portable way to publish my iCal files on the web server, and do it automatically in the background.

I was chatting with James today about the solution that I use that pushes the calendar from this laptop, which I regard as the “master” up to the web server, which runs PHP iCalendar. Of course, I use iSync to synchronise with my mobile phone, and I can make appointments on the phone and they will be imported into iCal at next sync, then to be pushed up onto the web at the next update.

But how to send the file to the web server? Personally I love ssh and especially when I have public key authentication set up properly so I don’t need to type my passwords, so I thought that it would seem sensible to use scp to push the files – I already have a hole in the university firewall for ssh into the box, so it will work from anywhere in the world, even without using VPN to connect to the University network.

So I dusted off my slightly rusty Perl skills and started lookiing at the files that iCal produces. I should probably explain that I used Sunbird for a while, but it was just too buggy to be used as a day-to-day application, so I switched to iCal.

So I now have a perl script which runs from my crontab every 15 minutes, and finds the title of the iCal file from inside the file, because iCal uses a unique name for each file, which is not very user friendly. It then compares each file title with a list of calendars to upload to the server and uses scp to copy the file onto the web server.

It’s currently pretty messy, still has a load of commented out debug code, and really needs a tidy up and a little more intelligence adding, but it works, and works well.

You can’t just copy this into a directory and run it – you really have to understand Perl to be able to customise it for your own use, but please feel free to use it as a starting point for your own development, and if you find it useful, please drop me a line.

You can find the perl program file, and my example data file in this directory.

LED Badges again

It’s visit day tomorrow, and I’ll be wearing my LED Badge.

I just had a comment on my last post from Brian, who would like a look at my source code, so I’ve put it in a directory for you all to download.

It’s a couple of java source files, which I have packaged into a jar file for you to download – there’s no compiled code in there only the source, I’ve only used the jar file to preserve the directory structure.

Anyway, it uses the serial comms libraries from rxtx.org, so you’ll have to download those, and install the runtime libraries in the correct place for your platform, but the program is in java, so change the serial port name in the code, compile it and run it.

Again, it’s not the prettiest of code at this point, but it serves the purpose at the moment, and when I get the time, I’ll try to improve and enhance the code.

Enjoy – you can download the code here: LED Badge java program code.

TomTom again

Erk!

I turned the TomTom back on in navigation mode this morning, and it had lost all my preferences – including the pairing to the hands free kit.

I’m back to using the Garmin for wardriving until the blutooth gps stuff is a little better sorted – at least I’ve got that option for now, and at least I can use the naviagation at the same time.

It seemed too good to be true when it was as easy as it first appeared.

TomTom as a Bluetooth GPS

I was chatting with Steve Kingston earlier today, and it came up that he had managed to hack his TomTom Go to deliver NMEA GPS data through bluetooth to his Mac laptop. I’ve currently got 2 GPS receivers in the car – one in the TomTom for directions, and the second wired to a serial port on the laptop for when I’m wardriving and doing other GPS related stuff on the laptop.

I was only thinking the other day how much nicer it would be to be able to connect to the TomTom through bluetooth, 1. it would get rid of a gadget in the car, and 2. it would get rid of the cable connection to the laptop.

So I took a look at Steve’s post and Roberto Piola’s site and managed to get it working. The only gripe I have is that when you use the TomTom in Bluetooth GPS mode, you lose all the route finding functionality – basically you just get a black screen with a few status lines. You can’t have everything at once, and I’ll take a look at some of the scripts and see if it’s possible to run this in the background while the navigation continues. Oh, and the fact that you have to hard-reset to get out of the application – just leaves a little to be desired.

Waiting for a Wii

Make a Mii even if you haven’t got a Wii yet.

I’m still waiting for them to come back into stock in Aber, or somewhere nearby so I can get hold of one. Why didn’t I preorder one – well long story that I’m not going into here, but I will be getting one as soon as I can now.

Free router firmware

I finally got around to upgrading the firmware on my Linksys WRT-54G wireless router. I debated a year or two ago about installing the SVEAsoft firmware, but as that cost money, I decided aginst it.

Whilst there’s nothing hugely wrong with the original firmware, the new dd-wrt.com firmware is just so much more flexible, and allows QoS, WDS and a few other funky options.

The thing that got me started on this one again was the article on lifehacker linked from the makezine which made me seem so very easy.

A couple of things caught me out on the way, and I had to do a hard reset after installing the initial minimal firmware, and as I was using the v23 SP2 version it messed up the passwords and needed the hard reset to allow me to log in, as password files changed, but apart from that it was pretty plain sailing.

I now have a nice Version 2.0 WRT54G running DD-WRT V23 SP2 and it all works fine.

LED Badges

I just bought a little LED badge off ebay, that displays programmable messages scrolling across it. It was relavitely cheap as an output device that could be attached to a server, and might provide some fun on visit days.

Of course I knew that the software that came with it would be only for Microsoft windows, and although it is possible to use the surface mounted buttons on the back to reprogram the messages, it would be rather long-winded.

So when it arrived today, the first thing that I did with it was load the software onto a windows machine and play with it to find out what the communications requirements were.

A quick test with the software determined that even with no device plugged in, the software worked – indicating that it was just “fire and forget”, there was no hand shaking going on – would make life a lot easier.

Out came the data analyzer, and after a couple of false starts, the baud rate was found to be 1200, 8 data bits, 1 stop bit, and no parity. Nice and straight forward.

Fire up the mac laptop, with a null modem cable to the keyspan USB to serial adapter, and quick edit of some WellyWanger comms code, and I can capture the data that the software is sending.

Now for the interesting bit, the data is not just an ASCII message being sent, so I have to capture the data as something other than ASCII – I prefer to look at it in decimal, besides it’s a little easier to present the data in decimal in Java than it is in Hex.

The software allows for 10 different messages to be stored on the badge, so I try sending a single character ‘A’ to channel 0 and channel 1:
The data stream captured is:

251 243 89 254 251 246 1 16 2 0 254 = 'A' channel 1
251 243 89 254 251 246 0 16 2 0 254 = 'A' channel 0

Try sending character ‘B’
251 243 89 254 251 246 0 16 2 1 254 = 'B' channel 0

Try sending ‘AB’ to see if there is a char count:
251 243 89 254 251 246 0 1 2 0 1 254 = "AB" channel 0 (no char count!)

Changing the other options and logging the output takes about 1/2 hour, and gives me a bunch of data to work with – I’ve worked out most of the protocol.

A little programming work this evening in Java has resulted in a couple of classes which run from the command line and allow programming of the badge from Mac OS X.
A GUI might have to come later on, but for now I’ve got a command line program that has a number of options, allows you to program all 10 channels, has the first 96 characters mapped out in the conversion. This gives me the ability to use the badge as a status display on a server when I’m not using it as a badge.

Chicago and Indianapolis trip

album391/DSC_2140.jpg
I’ve just been to visit a student doing his placement in Indianapolis in the US at the end of last week, and I had a really good time.

Apart from the Spiderman 3 trailer, I also got to visit the Indianapolis Speedway,
as well as the 103rd floor on the Sears Tower, the bar on the 95th floor of the John Hancock Tower, album391/DSC_2214.jpgWrigley Field,
Millennium Park, Navy Pier, as well as riding on the ‘L’ train. We also managed to visit the Voodoo lounge in the Redfish restaurant and listen to some pretty cool R&B as well as looking around the water tower.

Phew, now that I write it down, I did do quite a lot, with only 2 days in Indianapolis, and less than 24 hours in Chicago.

album391/DSC_2234.jpg

The whole gallery of 195 photos are here for you to look at, some of them are parts of panoramas that I’m going to stitch together and put up later.