Tech

Using MSN and ICQ with the built-in Palm Pre Messenger

The Palm Pre is a pretty awesome phone, but there are a few minor drawbacks. One, the built-in IM client only supports AIM and Google Talk at this point. I'm sure others will be added in the future, since the messenger uses the same libpurple that Pidgin does, but until then you're either stuck with those two, or probably trying to find some workaround.

Google talk is really just a jabber (or XMPP) server. Jabber is nice because it can connect to other Jabber servers. There are also plugins that allow Jabber to talk directly to other IM networks, including AOL, MSN, Yahoo, and ICQ. AOL doesn't matter for us, since we have support included with the phone. I do use MSN and ICQ quite a bit, so I that's what I'm going to focus on. There are some public jabber servers out there that already do this, but I'm just a little nervous about storing all of my IM passwords on some random server run by people I don't know.

First off, I need a Jabber server. We use one called Openfire at work, and it seems pretty nice. Unfortunately, it's Java, and my personal server runs FreeBSD. I haven't had much luck getting the two to work together, so I didn't feel like trying. FreeBSD has packages for a couple other jabber servers - jabberd2 and ejabberd. I went with jabberd2, which can be found in ports under net-im/jabberd. I built mine with MySQL support, since I use MySQL for a lot of other things. It supports several other databases if you prefer something else.

Installing jabberd2 was easy with a simple 'make install clean'. From there, follow the official jabberd2 Basic Configuration Guide to set it up. It's very easy, and the configs are straightforward. Doesn't need anything fancy, you just need to be able to connect to it from the internet. Make note of the hostname you set, and you will want to add a DNS entry for it if you don't have one already. Its not 100% required, but you should generate an SSL certificate too.

Then, I installed transports for the other IM protocols I want to use. I chose PyMSNt for MSN and pyicqt for ICQ. These are in ports under net-im/jabber-pymsn and net-im/jabber-pyicq, respectively. To setup the MSN transport to connect to my Jabber server, I opened its only config file (/usr/local/etc/jabber-pymsn.xml on FreeBSD), and changed the following:

<pymsnt>
  <jid>msn.mydomain.com</jid>
  <host>x.x.x.x</host>
  <mainServer>x.x.x.x</mainServer>
</pymsnt>

Where <jid> is a hostname for the transport (make sure it has a valid DNS entry), <host> is your server's public IP address, and <mainServer> is the IP of your jabber server. You can change other stuff if you want, but those are the important ones. The ICQ transport configuration (/usr/local/etc/jabber-pyicq.xml in FreeBSD) was very similar - I made the same changes as above. After all this is done, we can start the services. I added these lines to my /etc/rc.conf:

jabberd_enable="YES"
jabber_pymsn_enable="YES"
jabber_pyicq_enable="YES"

and ran the three startup scripts:

# /usr/local/etc/rc.d/jabberd start
# /usr/local/etc/rc.d/jabber-pymsn-transport start
# /usr/local/etc/rc.d/jabber-pyicq-transport start

Obviously, these will be different if you're on a linux or other server, so refer to each package's documentation to be sure. Once my server is up and running, I need to connect my Google Talk account to my new transports. You will need to do this from a standalone jabber client. For this purpose, I recommend using a client called Psi. First, you will need to set it up to log into your GTalk account. This is pretty straightforward, just follow the walkthrough here.

Once you're connected, right-click on the account in the main window and select Service Discovery:

In the Address: bar, type the hostname of your jabber server. You should then see a list of transports. Right-click on one, and click "Register":

You will then be prompted for your username and password for that network. The Psi client will also ask you to authorize the Transport accounts, as well as all of your contacts from that IM network. And that's just about it. One thing I would recommend is logging into Gmail and cleaning up your contacts list. Each contact from the networks you added will show up on your Gmail contacts as something like "icqnumber@icq.yourjabberserver.com". On my Pre, I prefer to have all profiles for a particular contact merged. To make this happen automatically, edit each jabber buddy's name in your Gmail contacts to match the name you already have set in your Pre's contact list. If you have multiple IM accounts for one person, you can merge the two contacts. I'd also recommend setting the transport accounts (which will show up as just msn.yourjabberserver.com or simlar) to never show up in chat. This will prevent them from appearing in the Messenger app on the Pre. Finally, log into your GTalk from the Pre. Your MSN and ICQ friends will all show up as Google Talk users, but you can see which IM account you're talking to from the conversation window.

And that's it. I'm sure I forgot something, but feel free to leave a comment if you run into any trouble.

Windows 3.1 Speakers

I want everybody to know what Windows 3.1 speakers are.

These are Windows 3.1 speakers. Not to be confused with Windows 95 speakers.

Stalk me!

Using a freeware program for Windows Mobile called TrackMe, I've been able to generate GPS log data and upload it to a web server (stored as a GPX-formatted XML file, and in MySQL). TrackMe includes its own web GUI, which overlays this data over google maps. Creepy, but I don't really care. I do it because I can - as long as I have the TrackMe app running on my phone, you can see where I am and where I've been. You can even see how fast I was driving.

This is great and everything, but I'd really like to be able to tie this in with the rest of the site. I found 3 drupal modules which read GPX. The first, Track, looks promising. It allows you to upload a GPX file, generates a google map, and works exactly as advertised. I uploaded an initial .gpx, and then removed the file and replaced it with a symlink to the one that TrackMe generates. This worked, but the map didn't update its starting location, so although my waypoints and such were on the map, they weren't in view. Obviously that doesn't work for me, but it may be something that can be fixed in the future.

The second module is called Trackfield. This generates a CCK field type for GPS data. Again, works as advertised, but it doesn't like my ever-changing .gpx files. You can see the results of this currently in my right sidebar. The module also supports CSV input - this might actually work really well with Drupal's PHP input format, if I can use it. Something to play around with, at least.

The third, MappingKit, seems to be the most capable. I haven't scratched the surface of yet, and it probably has the steepest learning curve, but it definitely speaks GPX and is very customizable. More to come on this one.

Syndicate content