IRC and BES and You

I got this wonderful Blackberry device courtesy of work, since I’m on call and people want emails answering quickly etc, etc.

The miracle of BIM and Google Talk is fantastic.. lots of ways to talk to my fellow operations coworkers, but there was something missing. We use good old IRC at Last.fm to communicate, so when something goes a bit wrong its nice to be able to jump in and see what’s gone on (or whether no one is fixing anything and its up to you..!)

On a first search there was plenty of good IRC clients around. Unfortunately I couldn’t get any to work… They just said disconnected from server. Using MidpSSH I telnet’d to the server and got a connection refused.. Then I changed the connection method to “TCP” and it worked fine. Great! But no such option exists in any IRC client (Mobilirc is the best one at the moment it seems).

So, the BES won’t forward the traffic, the BES isn’t even managed by us, and both apps are open source. Let’s delve into the code!

else if ( spec.blackberryConnType == SessionSpec.BLACKBERRY_CONN_TYPE_DEVICESIDE ) {
conn.append(“;deviceside=true”);

References to “deviceside”… basically it proxies via the BES, so that’s deviceside=false, which is the default if not specified. Funnily enough. Mobilirc doesn’t specifiy this, so I jump in and add the line, so it now looks like this:

connector = (StreamConnection) Connector.open(“socket://” + host + “:” + port + “;deviceside=true”, Connector.READ_WRITE);

After a couple of hours of trying to get the Blackberry Development Environment working for me, I managed to get a .jar, .jad, .alx, .cod, and using javaload, got it on my device and SUCCESS! IRC running, backgrounded, highlights, always on. Hurrah!

I don’t know if this affects anyone, or if anyone else really cares, but if you do, let me know and I’ll send you the stuff. At least we’re happy now 😉 and I’m happy that I still vaguely understand Java! 😀