Archive for the 'Mobile' Category

UK SMS to Jaiku gateway

Some facts to get started:

  • Sending an SMS to Jaiku from my phone costs me 25p.
  • Sending an SMS to any UK number from my phone is free.

I had a quick go at asking if people were interested, and it seems I’m not the only one that would benefit from a service which can forward UK messages to Jaiku in Finland - especially if it was free.

Who is this for?

This service is designed for UK residents that want to send messages to Jaiku by SMS on their phone without paying the international fee. I don’t guarantee uptime or service or anything like that, so please don’t rely on it working forever. I’ll let people know of any changes.

Instructions:

  1. Sign in to Jaiku.
  2. Visit the API page to find your personal API key.
  3. Register: Send an SMS to +447786202820 with the message “tojaiku register myusername myapikey”. e.g. “tojaiku register davidcarrington 123abc456def”.
  4. Test: Send an SMS to the same number with your message, prefixed “tojaiku”. For example: “tojaiku This is my first test message via Dave’s UK gateway”.
  5. And that’s it!

Costs:

You will pay your usual SMS cost of sending a text message to a UK number for each message sent. I personally get 3000 free texts on Orange, so I don’t worry about it.

General Notes:

  • This service will never send you any messages, including during registration.
  • The “tojaiku” and “register” commands are not case sensitive.
  • I don’t store your messages or any usage stats.
  • I do store your username and API key in a MySQL database (there’s no other way to make it work).
  • I created a Jaiku channel if anyone wants to join that to receive updates

If you have any questions or comments, please add a comment or contact me via Jaiku if you prefer.

Weekend roundup

Scouts on the night hike in reflective jacketsScouts night hike

Our Scouts came joint 7th out of 17 groups from around the district on the night hike on Friday. This is pretty surprising, since we had to rush back by skipping 2 bases with a shortcut. It turns out that very few teams went to all 10 bases, with one team only managing 6. My legs have recovered now, but my sleeping pattern is still a bit off.

Prawns in tikka masala sauce with pilau rice

In an attempt to expand my cooking abilities, I bought a bunch of spices and checked out a recipe for pilau rice. I’m very slowly working on becoming a better cook. Perhaps the next part is making the sauce by myself too - as I’m pretty unlikely to go catch my own prawns.

GSM stumbler failed

My attempts at making my GSM stumbler application run while my phone is sleeping has not gone well. The latest version doesn’t seem to pick up any changes of cell tower at all while the phone is off, and takes a pretty long time to discover that I’ve moved. I’ll have to look into this again.

Discovering background threads on Windows Mobile

This isn’t actually all that amazing to anyone that already knows how to use the .Net Compact Framework on Windows Mobile devices. It’s interesting to me because I’m only recently started on application programming, let alone creating applications for my phone.

My discovery this evening is that it is incredibly simple to make my phone run C# code while it is in sleep mode, by just using threading. This opens up quite a few ideas for me which help me progress towards a better Jaiku-like client for my phone:

  1. I can send “Keep-Alive” packets at regular intervals to make sure my XMPP connection to Jabber didn’t time out.
  2. I can automatically find out the current cell tower I’m connected to at regular intervals - and possibly also send these straight to Jaiku and the web by SMS/GPRS. (Update: this is now implemented in my GSM Stumbler application)
  3. I can scan for nearby bluetooth devices and wireless networks throughout the day.

All that while my phone is looking harmless and the screen is completely off, very handy:

ThreadStart starter = new ThreadStart(this.FindCurrentLocation);
Thread backgroundThread = new Thread(starter);
backgroundThread.Start();

Tracking my phone on Google Earth

After looking through various KML samples on the web during lunch today, I spent a little time experimenting with converting my existing location data into something that Google Earth could read - allowing people to track my location in real time.

Manual labour

About 6 times per day, I press a button on my phone and it sends a text message to my website with my current cell tower ID. My website then takes over and does all the smart stuff by itself. If I’ve traveled somewhere new, it automatically looks up the cell ID in a large UK database using their API to find the latitude and longitude of the cell tower I’m currently connected to. But big decimal numbers showing my current latitude and longitude aren’t all that interesting on their own.

Sidebar widget

The next step in my process was to add the widget on the side of my website to show everyone my current location. It’s not particularly fascinating - either I’m in my home town, at work, or traveling somewhere in between. But I’ve just added something a little more interesting.

Google Earth

Whereas before the link on my current location just took you to the coordinates where I’m currently sat, it will now load up a KML file showing a nice picture of a man standing on my current location, and hopefully a number of little cell towers which will show where I’ve been over the last 7 days.

The historic data isn’t all that interesting in Google Maps, but if you open up My KML file in Google Earth then you’re exposed to seeing the timeline control and you can choose to see where I was at different times and even animate my location over time.

What’s next?

I’ve got a habit of always wanting to do more.  I’ve cleaned up my location database so I could add in other locations (i.e. not just cell towers) and try plotting even more data. I’d like to try the following:

  • Load up GPS data for any hikes I go on
  • Add a few key locations onto the map such as the Scout hut, my brother’s place in Canada, anything relevant to me
  • Add some kind of refresh so that it updates automatically when I’m on the move
  • Create some kind of JavScript timeline interface for Google Maps

Jaiku over GPRS stays active

Tonight I’ve been focusing on creating a Jabber IM client that will connect to Jaiku and receive live updates as and when they happen.

Development

I started off again by looking at the agsXMPP MiniClient code. This covers pretty much everything I was interested in achieving tonight, but I wanted to break it down to a bare-bones application that just showed me my communications with Jaiku and some debugging information.

This was great, and worked well to show me the many #testku messages I was sending. The screenshot on the right shows one of the test messages received.

Going wireless

I unplugged my phone from the computer and turned on the wireless LAN. Again, predictably, I could connect fine and it was pretty cool receiving updates from Jaiku as I walked around the house - yes, I’m that sad.

The problem here was that the moment I touch the power button on my phone, the wireless card turns off and the connection is lost, which definitely doesn’t help me. I had a sneaky feeling that GPRS might be slightly different, so I tried that instead.

Jaiku over GPRS

Like the other day, I had trouble again connecting to Jabber over GPRS. It seems to send a few packets and receive a few back, but then halt when trying to send any more. A handful of attempts later I was able to create a full connection.

GPRS was on, Jabber was connected, and Jaiku was slowly receiving messages. So I turned my phone off.

And turned it back on.

Amazing! I was truly impressed that the message I had sent from the PC while my phone was off was already waiting for me to see when I turned the phone back on. Not only was the connection re-established, but it had never been lost - implying that the Jabber connection was still receiving messages in the background even though the phone looked dead.

What does this mean?

In short, it means I can make a program which stays connected to the internet all day and receives updates about my contacts and their statuses. Jaiku for Windows Mobile could work even better than I thought.

« Previous PageNext Page »