A Bluetooth Gateway Of My Own

I may have mentioned to you that I got a new phone a few weeks ago (or perhaps months ago, by now.) No, it’s not a Blackberry Storm, nor is it an Android or even an iPhone. It’s an AT&T Tilt, also known as the HTC Kaiser or P4550. It’s not so much a phone with lots of features as it is a pocket PC that you can talk on. It’s got practically everything: Bluetooth, 802.11, GPS, touch screen, a slide-out keyboard, Micro-SD, and a decent camera.

One thing I’ve been wanting to do with it is use it as an Internet gateway for my notebook when I’m in a Wi-Fi dead zone or a moving vehicle. One small complication, though: my notebook is an Inspiron 1525n running Ubuntu. Can it be done? Why, yes it can.

Fortunately, when I ordered my notebook, I ordered the pre-installed Linux option. The drivers for everything (including the DVD player) were pre-configured. So, Bluetooth was already working, and I was able to use the Gnome Bluetooth Applet to create an association between the Tilt and the notebook. But, when I tried to browse the phone from the Applet, there was a problem: "Couldn’t display obex://…." Fortunately, it turned out that this message isn’t important to using the phone as an Internet gateway, nor is the Bluetooth Applet itself.

The next step was to start Internet Sharing on the Kaiser. There’s a bit of a trick to this.

  1. Using the File Explorer, browse to the phone’s Windows directory.
  2. Locate and copy the file called "Internet Sharing"
  3. Browse into the Start Menu folder.
  4. Paste Shortcut.

And now, Internet Sharing can be launched conveniently from the Start menu. I configured the Internet Sharing application to connect via Bluetooth to the PC, and to connect to the MEdia Net network (since that’s what the phone chooses when I launch its own Web browser.) I clicked Connect and the phone began to wait for the PC to connect.

To get the PC to connect to the phone, many guides will tell you that you must patch your kernel, install a PPP client, create a bunch of config files, and a bunch of other bologna. I’ll tell you now that all of that is not necessary with this phone. What was necessary? One command. Seriously.

/usr/bin/pand --role PANU --search --persist --encrypt

This command creates an ad-hoc Bluetooth network between the PC and the phone. It also creates the bnep0 network interface device, which can be treated exactly the same as your typical eth0 device. This is fortunate, since when the device first appeared in my ifconfig listing, it had no IP address. DHCP to the rescue!

/sbin/dhclient bnep0

I did have to disable my 802.11 network interface before I could send traffic through the Bluetooth interface (obviously, it had preferential routing, as it well should have had.) Once I did that, it worked surprisingly well.

Additional Resources:

Related Posts Plugin for WordPress, Blogger...

One thought on “A Bluetooth Gateway Of My Own”

  1. Very cool sir! :] It’s funny… I’m a Linux admin by profession… but there are a lot of cool hacky desktoppy kinda things that I wouldn’t have the first clue how to do. This being one of them :]

Comments are closed.