Dialup Networking via Treo 700p and Ubuntu (USB connection)

By | 2007/06/07

This tutorial will outline how to connect your Linux machine (probably not distro-specific, but this was tested and created using Ubuntu 7.04) to dial-up networking via a Treo 700p Smart Phone. This method uses USB connection and requires a data plan with your service provider. I use Sprint as they have the cheapest unlimited data plan.

In speed tests over the last few days here I have achieved ~350+kbps up and down speeds. This actually beats some residential DSL speeds that I’ve seen. Not bad. Now for the good stuff…

There are two sections of this tutorial. The first is preparing the phone to share connection to the computer. The second is telling the computer how to connect to the phone. Neither are terribly complicated, just make sure you follow the steps carefully.

Step 1 : Configuring the Treo 700p

From what I understand Sprint changed something since the Treo 650 and now require you to pay extra to share a data connection to your computer. We, of course, don’t want to do that so we’ll use a small piece of third party software to help us share this connection. This application, which you’ll need to install to your Treo 700p is called USB Modem.

I should note that this is not free software and is for-pay software, neither are points that I’m thrilled about but when there aren’t any other tools for the job… (anyone want to reverse engineer some Palm code?)

There is a free trial of that application that will run for 14 days or 30 connections. I’d suggest using the trial to initially set this up and if you find that its something you use go ahead and pay the $24.95 for the full version.

In any event, you’ll want to download the USB Modem application and install the .prc file to your Treo 700p. This tutorial will not outline installing or syncing your PDA. This assumes you already have a method of doing that. Remember to install the application to your phone itself and not a memory card.

After installing the USB Modem application navigate to it on your phone, but do not yet ‘Enable Modem Mode’. We’ll do that in a minute.

Step 2 : Configuring the Linux machine

I should note before I dive into this section that the USB Modem archive also includes instructions for setting up Linux, OS X and Windows. If you have trouble you might want to double check those instructions for more details.

On Ubuntu 7.04 (yet untested on other distributions) you need to manually add a kernel module for the Smart Phone syncing to be properly recognized. You can do this manually (not persistent) by using the command:

sudo modprobe visor

If you would like to make this persistent, which is something I have done, you will want to append a line “visor” to the end of your /etc/modules file. This way the kernel will be watching for a Smart Phone / PDA connection. If you don’t make it persistent you’ll, of course, need to do it manually each time you plan on connecting.

In my situation, using Sprint and an EVDO network, my connection does not require any kind of username and password to connect to the data network. This simplifies the steps a bit, but if your provider needs such information it isn’t too much different. Please refer to the USB Modem instructions for where to add your username and password.

The first step (and simplest way I found to connect) is to copy the connection script from the USB Modem archive to your /etc/ppp/peers/ directory. I used this command (assuming you’ve unzipped the archive to your Desktop):

sudo cp ~/Desktop/drivers/linux/ppp-script-evdo-template /etc/ppp/peers/ppp-script-treo

After you have copied the EVDO template file to the location above you should be ready to make your connection. note: I had to close existing connections (eth0, wlan0, etc) for this to work. Can anyone else verify this?

At this point you’ll want to reach over to your Treo 700p and “Enable Modem Mode”. If you’d like to see that the machine is recognizing your phone you could take a look at /var/log/messages.

Now that the phone is set to “Modem Mode” run the following command on the Linux machine:

sudo pppd /dev/ttyACM0 call ppp-script-treo

This will post some output to the screen and tell you whether or not you’re connecting. If you are assigned a remote and local IP plus primary and secondary DNS you’re most likely connected. You should get your prompt back at this point. Try pinging a location to verify your connection.

ping -c3 google.com

If your ping works you’re set. Enjoy your ppp connection over your phone. Internet wherever you have phone service. w00t! If it didn’t work please leave a comment and we’ll see what we can do for you. (chances are differences in providers, EVDO vs EDGE, etc).

33 thoughts on “Dialup Networking via Treo 700p and Ubuntu (USB connection)

  1. jh

    It is worth noting.. and this is not me being critical or judgemental.. this is something that violates Sprint’s contract as well as the DMCA in the United States as it is a circumvention technology.

    Just a fair warning.

    Reply
  2. Pingback: Bankruptcy WebLog » Blog Archive » Nationwide 56k and Accelerated Dialup Service - Privacy Policy

  3. happycat

    “this is something that violates Sprint’s contract as well as the DMCA in the United States as it is a circumvention technology”

    WTF are you talking about? If he paid for internet access through his phone then how is he in violation of any law or contract? Use via Linux is not a “circumvention technology”

    Reply
  4. Pingback: SUSE root Blog

  5. Debbie

    Using Verizon, get connected and get ip address and dns server, but never able to ping. Can anyone help? Thanks in advance

    Reply
  6. Daniel

    The link for usb modem no longer is valid and I would love this! I have been trying to help a friend with Ubuntu but without internet access is almost impossible. In the mean time I would like to tether my verizon treo 700p. I do pay for unlimited data usage. can anyone link me to the usb modem program for my treo 700p. thanks

    Reply
  7. admin Post author

    @Daniel – I have updated the link. Thank you for pointing that out.

    Reply
  8. Eric

    Has anyone been able to get this working with Bluetooth? I’ve gotten DUN working with my 755p/Sprint/USB cable, but would really like to use BT. I’ve read dozens of posts at eeeuser.com, but nothing positively works so far.

    Reply
  9. Kinuthia Muchane

    I just stumbled on this USB connection discussion . It is tantalizingly close to what I’ve been trying to do for sometime now, without luck.
    I am trying to dialup through a USB connected Motorola L6i cellphone and a HP 510 laptop, the connection works fine on XP – thats because of the drivers that came with the phone which are – no surprise ! – Windows specific. So how can I connect with the Gibbon? How can I get it to recognise the modem in the cell? I might also add that I am in Kenya.
    Thanks!

    Reply
  10. T. Glover

    I was wondering if you could help me with My Sprint Centro and using Ubuntu 8.04 Hardy Heron Edition…Please
    and thanks alot.

    Reply
  11. Christer Edwards Post author

    @T. Glover – I don’t know why it would be any different between the Treo and the Centro, but I haven’t tried. Does something in these steps not work on the Centro? Have you tried them and get errors?

    Reply
  12. Rae C.

    I’m using a spring 755p and ubuntu Hardy. I can connect and ping through terminal, however, when I try to open firefox, it tells me that I’m offline.

    Reply
  13. Christer Edwards Post author

    @Rae – Firefox will use the system network connection status to assume whether its online or now (integration will be a nice plus, hopefully in 8.10). Go to File > Work Offline and uncheck the box and your connection should likely start working.

    Reply
  14. Matthew Kriebel

    I actually pay for tethering (and I know if costs waaaaay to much) and wondered if anyone had tried this without the software on the palm? I have Verizon. I’ll post again if I get my setup working.

    Reply
  15. stevo

    I followed the instructions but fails to connect. my setup is treo 680 and asus eee900 xandros using att network.

    /home/user/My Documents> sudo pppd /dev/ttyACM0 call treo-connect
    send (AT&F0E0V1S0=0^M)
    expect (OK)
    alarm
    Failed
    Connect script failed can somebody please help?

    Reply
  16. stevo

    ok i found out i had a type in my script. works greate man. true mobility rocks!

    Reply
  17. Micah

    Really want this to work… Please help. The connection always fails and then treo pops up with a Network Operation Failed Message.

    This is a Treo 680 on an Edge connection. My APN is replaced with wap.cingular. Username is [email protected] Password is CINGULAR1.

    Here is a copy of the script….

    460800
    connect ‘/usr/sbin/chat -s -v “” “AT&F0E0V1S0=0″ OK \’AT+CGDCONT=1,”IP”,”wap.cingular”\’ OK ATD*99# CONNECT’
    debug
    updetach
    crtscts
    noipdefault
    novj
    lcp-echo-failure 0
    nobsdcomp
    novjccomp
    nopcomp
    noaccomp
    noauth
    user [email protected]
    modem
    usepeerdns
    defaultroute
    connect-delay 5000

    Reply
  18. Mitch

    Micah – change ATD*99# to ATD*99***1# I was having the exact same problem as you. It works! Good luck!

    Reply
  19. Micah

    Worked! Thanks so much – how did you figure it out?

    Reply
  20. JOhnny

    Hey, can you guys help me out? I’m working on trying this with Sprint, how do I know what the user name and password is for the connection script?

    Thanks!

    Reply
  21. Johnny

    I’m sorry, I’m stupid. I don’t need the user name/password on Sprint.

    I was able to connect and ping google from the command line but unchecking “work offline” isn’t working for me in Firefox.

    What’s the next step to try?

    thanks!

    Reply
  22. Fabio Lima

    Who knows how to get a reverse dun conection with Treo 700p? I have shearched all the Internet and I found a lot of Treo 650 stuff. But nothing related to 700p reverse dun.

    I tryied many different ways to achieve that, but every time in vain. It seems that Sprint disabled/locked network BT conections to use PC’s Internet access.

    Question one:
    Is it (Reverse Dun in 700p) possible?

    Question two:
    Is there any lock to void this in my Sprint branded device?

    Please help me.

    Reply
  23. Todd

    Instructions work fine w/ my centro and Fedora 9 machine…. (Using my phone for bandwith as I type this!)

    Reply
  24. Todd

    Here’s a script I wrote to help the process:

    #!/bin/bash

    # Uses my Centro for bandwidth.
    #
    # Requires the USBModem Palm app from:
    # http://www.mobile-stream.com/usbmodem.html
    # The application must be installed and activated
    # when connecting the Centro to the machine.
    #
    # For this to work (with Sprint Power Vision bandwidth)
    # Follow the directions on this site:
    # http://ubuntu-tutorials.com/2007/06/07/dialup-networking-via-treo-700p-and-ubuntu-usb-connection
    # Namely:
    # 1 – install the ‘visor’ module
    # # modprobe visor
    # 2 – copy the usbmodem ‘edvo’ script template to the ppp ‘peers’ dir
    # # cp {path to usbmodem files}/drivers/linux/ppp-script-evdo-template /etc/ppp/peers/ppp-script-centro
    # 3 – enable the ppp connection
    # # pppd /dev/ttyACM0 call ppp-script-centro
    #
    # This script assumes that step 2 is complete.
    #
    # On enable:
    # NetworkManager is stopped to prevent interference.
    # Steps 1 and 2 are performed. The nameservers are set up.
    #
    # On disable:
    # The visor module is removed and the pppd connetion is killed.
    # NetworkManager is then restarted.
    #

    printUsage() {
    echo -e “Usage: $0 ( enable | disable )”
    echo -e “\tenable – sets up the PPP using the Centro for bandwidth”
    exit
    }

    echo ” ”
    if [ $# -eq 0 ]; then
    printUsage
    fi
    if [ $# -ne 1 ]; then
    echo “Wrong number of parameters”
    echo “”
    printUsage
    fi

    case “$1” in
    enable )
    # Quick check
    if [ ! -c /dev/ttyACM0 ]; then
    echo “/dev/ttyACM0 device does not exist. ”
    echo “Is phone attached and the usbmodem app running/active? …Aborting.”
    echo ” ”
    exit
    fi

    echo “Enabling….”
    /sbin/service NetworkManager stop
    sleep 2
    /sbin/modprobe visor
    /usr/sbin/pppd /dev/ttyACM0 call ppp-script-centro 2>&1 > /dev/null
    /bin/cp /var/run/ppp/resolv.conf /etc/resolv.conf
    echo “….done.”
    ;;

    disable )
    echo “Disabling….”
    kill `cat /var/run/ppp0.pid`
    /sbin/rmmod visor
    /sbin/service NetworkManager start
    echo “….done.”
    echo “You can now disable the usbmodem app.”
    ;;

    * )
    echo “Incorrect parameter”
    echo “”
    printUsage
    esac

    Reply
  25. CVINDC

    Folks…the way I understand, one does need the Shareware USB Modem application for this to work right? Has anyone got it working w/o it?

    Reply
  26. zelut Post author

    I have not been able to get it to work without, but I have heard rumour that it can. If anyone has a solution I\\'d be glad to hear about it so I can publish it here.

    Reply
  27. zelut Post author

    I have not been able to get it to work without, but I have heard rumour that it can. If anyone has a solution I\\'d be glad to hear about it so I can publish it here.

    Reply
  28. zelut Post author

    I have not been able to get it to work without, but I have heard rumour that it can. If anyone has a solution I\\'d be glad to hear about it so I can publish it here.

    Reply
  29. Phil M.

    Newer releases of Ubuntu (and Debian?) recognize the USB connection of a device running USBModem and establish an Internet connection without any of the text file fiddling described here. I installed USBModem on my Treo 650 and 700p. When I plug into my computer running Ubuntu 10.4, the rest just works.

    Reply

Leave a Reply