OpenBSD Journal

Tether your Treo smartphone with OpenBSD

Contributed by jason on from the geek-on-the-run dept.

I noticed a recent commit to umsm(4), which got me wondering about my Treo 700p. I upgraded to the 700p last year to get the extra throughput offered by Verizon Wireless' EVDO service. The phone has served me well for USB-tethered modem access, albeit using Mac OS X on my MacBook Pro. But a solution that ties me to OS X is really only half a solution. You can imagine my surprise when I discovered how easy it was to connect using my smartphone with OpenBSD!

Because there are still a number of unsupported components with OpenBSD on the MacBook Pro, I run OpenBSD macppc-current on a PowerBook G4. Aside from the Broadcom/Airport Extreme card and firewire, everything works great. The small size and light weight make it an ideal travel system, but having to track down open wireless hotspots for my rum(4) USB adapter has always been a minor annoyance. Until I reviewed umsm(4), I had no idea that OpenBSD supported any EVDO devices. I assumed that even if it was possible, getting my Treo to work with OpenBSD would probably require hours of hacking code and drinking beer (not necessarily in that order).

After booting up the PowerBook, I connected the Treo's sync cable to the laptop and immediately noticed the following in syslog:

uvisor0 at uhub1 port 1
uvisor0: Palm, Inc. Palm Handheld, rev 1.10/1.00, addr 2
ucom0 at uvisor0 portno 0, sync

This was a promising sign. At the very least, I knew I could use OpenBSD to synchronize and backup my Treo using the various Palm utilities in the ports tree. However, since all I had was uvisor(4) access, there was no chance that OpenBSD would see the device as a modem. Fortunately for me, there's a Palm application that allows Treo users to tether their smartphones without paying for a separate tethering package with the carrier. I had purchased it last year to get the phone working with OS X, and it works with both USB and bluetooth connections. As soon as I pressed the "Enable Modem Mode" button in USB Modem, OpenBSD recognized the device properly:

uvisor0: at uhub1 port 1 (addr 2) disconnected
ucom0 detached
uvisor0 detached
umodem0 at uhub1 port 1 configuration 1 interface 0
umodem0: Mobile Stream Treo 700 USB Modem, rev 1.10/1.10, addr 2, iclass 2/2
umodem0: data interface 1, has CM over data, has break
umodem0: status change notification available
ucom0 at umodem0
Now that I had a fully supported hardware modem, I just needed the ppp magic to dial up to Verizon Wireless. Looking back in umsm(4), I saw that a kind developer had already provided a sample configuration for Verizon EVDO service. I created my new /etc/ppp/ppp.conf with the settings, exchanging only my phone number in the set authname directive:
default:
  set device /dev/cuaU0
  set speed 230400
  set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
   \"\" AT OK-AT-OK ATE1Q0s7=60 OK \\dATDT\\T TIMEOUT 40 CONNECT"
  set phone "#777"
  set login
  set authname 4517654321@vzw3g.com
  set authkey vzw
  set timeout 120
  set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
  add default HISADDR
  enable dns
Once the file was saved, I ran ppp(8) to test the connection:
$ sudo ppp -ddial default
Working in ddial mode
Using interface: tun0
Five seconds later, success! I was able to ping external sites and browse the internet. I saw some route warnings in syslog that appear to be related to the set ifaddr directive, but it works fine and at a good speed. Once again, OpenBSD has excelled at providing a simple solution (with excellent documentation) to a modern challenge. I hope that this story helps other users utilize their Treo phones with their OpenBSD systems while they're on the road. If you have any questions about this setup, please post your comments below or email me at jdixon@.

(Comments are closed)


Comments
  1. By Anonymous Coward (65.96.221.40) on

    "Fortunately for me, there's a Palm application that allows Treo users to tether their smartphones without paying for a separate tethering package with the carrier. I had purchased it last year to get the phone working with OS X, and it works with both USB and bluetooth connections"

    So you're praising OpenBSD for this yet it required a 3rd party non-free app to work at all?

    Comments
    1. By Anonymous Coward (143.166.255.42) on

      > "Fortunately for me, there's a Palm application that allows Treo users to tether their smartphones without paying for a separate tethering package with the carrier. I had purchased it last year to get the phone working with OS X, and it works with both USB and bluetooth connections"
      >
      > So you're praising OpenBSD for this yet it required a 3rd party non-free app to work at all?
      >
      >

      Remember that this 3rd party app runs on the phone itself and enables the phone in USB modem mode. While this is a non-free app it is entirely "inside" a non-free phone attached to a non-free network. Everything at OpenBSD and lower is free.

      Comments
      1. By Anonymous Coward (65.96.221.40) on

        > > "Fortunately for me, there's a Palm application that allows Treo users to tether their smartphones without paying for a separate tethering package with the carrier. I had purchased it last year to get the phone working with OS X, and it works with both USB and bluetooth connections"
        > >
        > > So you're praising OpenBSD for this yet it required a 3rd party non-free app to work at all?
        > >
        > >
        >
        > Remember that this 3rd party app runs on the phone itself and enables the phone in USB modem mode. While this is a non-free app it is entirely "inside" a non-free phone attached to a non-free network. Everything at OpenBSD and lower is free.

        Well yeah. Of course it's cool that OpenBSD sees the device and whatnot.

        But.. Is OpenBSD seeing a modem as a modem is really that interesting? It's that 3rd party app that seems to make it possible.

        Comments
        1. By Anonymous Coward (85.211.12.232) on

          > But.. Is OpenBSD seeing a modem as a modem is really that interesting? It's that 3rd party app that seems to make it possible.

          It's seeing it as a ucom0 via the uvisor driver. To me and you thats a serial line, just like a modem. You can access it via /dev/ttyUx (x=0 for the first usb serial line).

          I use the very same driver for pilot-link to my pda. Works great.

        2. By Darrin Chandler (dwc) on http://www.stilyagin.com/darrin/

          > Well yeah. Of course it's cool that OpenBSD sees the device and whatnot.
          >
          > But.. Is OpenBSD seeing a modem as a modem is really that interesting? It's that 3rd party app that seems to make it possible.

          You're making a distinction where none exists. Just because the Treo has a 3rd party app to enable it to work as a modem doesn't have any bearing on this at all.

          I have a moto razr, and I can plug that in via usb and see a modem without doing anything. Is that somehow better? No, it's no different. The razr is closed, proprietary stuff.

          Being able to interface with proprietary systems while remaining completely open and free is a GOOD thing.

          Comments
          1. By mk (85.82.220.84) on

            > I have a moto razr, and I can plug that in via usb and see a modem without doing anything. Is that somehow better? No, it's no different. The razr is closed, proprietary stuff.

            I'm cursed with one of these as well. The only good thing about it is that it allows me to go online in the bus etc. I only need to connect it, sudo ppp, and type `call mobile'. I don't recall if I had to tweak /etc/ppp/ppp.conf, but it can't have been much or I'd remember it.

            Perhaps it's just me, but I like being able to read my email everywhere I can make a phone call.

  2. By dingo (68.30.114.80) on

    I'm using a sprint evdo modem in a pcmcia<->pci card in my router at home.

    Its an extra $10, but my money isn't going to the cable provider (comcast) who has a monopoly here, and treats their customers like shit for it. Its nice to have a US broadband provider treat me with the curtosey $60/mo deserves.

    At least with evdo, there is competition, sprint and verizon mainly.

    I wish sierrawireless and merlin would provide activated hardware and sprint/verizon accounts to a developer. Less than half the evdo cards work here in the US.

    Then again, I thought $60USD/mo would get us alot better bandwidth by now, its 2007....

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]