Posts RSS Comments RSS 395 Posts and 1,316 Comments till now

Verizon EVDO in Kubuntu Linux

One of the things I did over the 4th of July holiday was get my dad’s Verizon EVDO (cellular broadband service) card to work in Linux. The reason why he got the card in the first place is still a mystery (he has DSL at home and office and never takes his laptop when he travels), but he was nice enough to let me borrow it for a little while so I can decide if I want one of my own.

The card in question is a PC5740 which seems to be one of the widely used/most popular cards in use. It is supported by Linux and just needs some kernel modules installed and a ppp script to connect. I found two websites (site 1, site 2) which helped the most and had very straight forward directions and additional information. As far as I know, the linked directions should work with almost any EVDO card, the major difference are the vendor and product ids which are module options.

Here is the process I went through to get my Verizion PC5740 EVDO card to work in Kubuntu Linux. It is very similar to the two sources I listed, but includes some additional tips to minimize the amount of work to get it up and running. The instructions are also simplified a bit for users who are not as familiar with using Linux.

Setup and Configuration

First log in as root. Kubuntu uses sudo instead of root, and you can “login” by using the -i option instead of typing sudo before every command:

~$ sudo -i

Now load the ohci-hcd module if it is not already installed:

~$ modprobe ohci-hcd

Next, we have to get the vendor and product id of the card so we can load the usbserial module. First cat your USB devices without the card installed:

~$ cat /proc/bus/usb/devices > devices

Now insert the card and diff devices to find the new device information. If you are using a PC5740, your vendor and product id should match my example:

~$ diff /proc/bus/usb/devices devices | grep Vendor
< P: Vendor=106c ProdID=3701 Rev=0.00

Now load the module usbserial with the newly found options:

~$ modprobe usbserial vendor=0x106c product=0x3701

If all goes well you should have the new device ttyACM0:

~$ ls /dev/ttyACM0
/dev/ttyACM0

To simplify things, I added ohci-hcd and usbserial to /etc/modules and added the module options in /etc/modprobe.d/ so everything loads on boot. This way you won’t have to manually load the modules every time you reboot.

Edit /etc/modules:

# /etc/modules: kernel modules to load at boot time.
#
ohci-hcd
usbserial

Create an option file for usbserial. In other distributions, the module options are in /etc/conf.module or /etc/module.conf, but in Kubuntu, the module options are in individual config files in /etc/modprobe.d/ with the same name as the module and a .modprobe ending:

~$ touch /etc/modprobe.d/usbserial.modprobe

Now edit the file and add the module options we found earlier:

# /etc/modprobe.d/usbserial.modprobe
#
options usbserial vendor=0x106c product=0x3701

Now install and update the new module changes:

~$ update-modules

Next time the computer is rebooted, ochi-hcd and usbserial with vendor and product options will be loaded.

Next we have to configure the card options and create a connection script for pppd. First create the configure file:

~$ touch /etc/ppp/peers/1xevdo

Edit /etc/ppp/peers/1xevdo and add the following options. Remember to replace the sample phone number with the phone number assigned to the card:

# /etc/ppp/peers/1xevdo
#
ttyACM0
115200
debug
noauth
defaultroute
usepeerdns
connect-delay 10000
user 1234567890@vzw3g.com
show-password
crtscts
lock
lcp-echo-failure 4
lcp-echo-interval 65535
connect '/usr/sbin/chat -v -t3 -f /etc/ppp/peers/1xevdo_chat'

Next create the chat script file:

~$ touch /etc/ppp/peers/1xevdo_chat

This file can be customized with various options to provide information about the connection. This is the chat script I use from Ken Kinder’s tutorial:

# /etc/ppp/peers/1xevdo_chat
#
ABORT 'NO CARRIER' ABORT ERROR ABORT 'NO DIALTONE' ABORT BUSY ABORT 'NO ANSWER'
'' 'ATTEV1&F&D2&C1&C2S0=0S7=60'
'OK-ATTEV1&F&D2&C1&C2S0=0S7=60-OK-ATTEV1&F&D2&C1&C2S0=0S7=60-OK' 'AT+CSQ;D#777'
TIMEOUT 70
'CONNECT-AT+CSQ;D#777-CONNECT'

A simpler chat script may be a good starting place to first get connected and add options as you go:

ABORT 'NO CARRIER' ABORT 'ERROR' ABORT 'NO DIALTONE' ABORT 'BUSY' ABORT 'NO ANSWER'
'' ATZ
OK-AT-OK ATDT#777
CONNECT \d\c

The first few times I connected with the card, for some reason I could only connect with the simpler chat script. I’m not sure if it was because of my location or if I forgot about an option I updated. EVDO Forums is a good resource for anyone who needs to troubleshoot or wants to customize.

Now we are ready to connect the card to the EVDO network:

~$ pppd call 1xevdo

There is no feedback from pppd and you have to watch messages in order to view the connection status and get information for configuring your gateway:

~$ tail -f /var/log/messages
Jul 9 17:58:01 takochi chat[5531]: send (ATTEV1&F&D2&C1&C2S0=0S7=60^M)
Jul 9 17:58:02 takochi chat[5531]: expect (OK)
Jul 9 17:58:02 takochi chat[5531]: ATTEV1&F&D2&C1&C2S0=0S7=60^M^M
Jul 9 17:58:02 takochi chat[5531]: OK
Jul 9 17:58:02 takochi chat[5531]: -- got it
Jul 9 17:58:02 takochi chat[5531]: send (AT+CSQ;D#777^M)
Jul 9 17:58:02 takochi chat[5531]: timeout set to 70 seconds
Jul 9 17:58:02 takochi chat[5531]: expect (CONNECT)
Jul 9 17:58:02 takochi chat[5531]: ^M
Jul 9 17:58:02 takochi chat[5531]: AT+CSQ;D#777^M^M
Jul 9 17:58:02 takochi chat[5531]: 23, 99^M
Jul 9 17:58:08 takochi chat[5531]: ^M
Jul 9 17:58:08 takochi chat[5531]: CONNECT
Jul 9 17:58:08 takochi chat[5531]: -- got it
Jul 9 17:58:08 takochi pppd[5528]: Serial connection established.
Jul 9 17:58:08 takochi pppd[5528]: Using interface ppp0
Jul 9 17:58:08 takochi pppd[5528]: Connect: ppp0 < --> /dev/ttyACM0

If you are using the simpler chat script, your messages will be a little different, but it will be pretty obvious if you have connected or not. You should also get assigned a local and Verizion IP address as well as receive DNS information:

Jul 9 17:58:18 takochi pppd[5528]: local IP address YOURLOCALIPADDRESS
Jul 9 17:58:18 takochi pppd[5528]: remote IP address YOURVERIZONIPADDRESS
Jul 9 17:58:18 takochi pppd[5528]: primary DNS address PRIMARYDNSIPADDRESS
Jul 9 17:58:18 takochi pppd[5528]: secondary DNS address SECONDARYDNSIPADDRESS

The final step for configuring the connection is to add a gateway to your routing table so you can talk to other computer on the internet. You will need the local IP address listed in /var/log/messages:

~$ route add default gw YOURLOCALIPADDRESS

Now you should have internet access from your EVDO card!

Connecting At A Later Time

Since we configured the necessary kernel modules to load on boot, connecting the EVDO card is down to three steps (as sudo or after logging in as root).

First, make the connection call:

~$ sudo pppd call 1xevdo

Second, view the connection messages and get the local IP address:

~$ tail -f /var/log/messages

Third, add the gateway to the routing table so you can communicate with the internet:

~$ sudo route add default gw YOURLOCALIPADDRESS

Troubleshooting

If for some reason you don’t connect or you get disconnected and you try to reconnect, you may get this error in /var/log/messages (where 123 is replaced by some number):

Jul 9 18:02:26 takochi chat[5531]: Device ttyACM0 is locked by pid 1234

This means the process is still running and you have to cancel it before trying again. You can do this by killing the process:

~$ sudo kill 1234

If for some reason your KDE applications are not able to connect to the internet, but you can do other things like SSH, try unloading the DCOP network module:

dcop kded kded unloadModule networkstatus

If you are using Ken Kinder’s chat script, you can get information about the signal strength of your connection. When watching /var/log/messages, look for this line:

Jul 9 17:58:02 takochi chat[5531]: 23, 99^M

The 23 is the signal strength indicator of my connection (my connection is pretty good). Values can be 0, 7, 15, 23, 31 and are usually represented by the number of bars provided on the phone interface.

KDE also has a GUI interface for pppd called kppp. As far as I know, it does not support configuring EVDO. Besides (and no offense is meant), the kppp interface is pretty scary and I would direct anyone to the CLI instructions to get this working.

By the way, if/when kppp does support configuring EVDO, I will be happy to help fix the interface.

8 Responses to “Verizon EVDO in Kubuntu Linux”

  1. […] Link to Article verizon Verizon EVDO in Kubuntu Linux » Posted at obso1337.org on Monday, […]

  2. […] Verizon EVDO in Kubuntu Linux at obso1337.org Post a comment | Trackback URI […]

  3. on 09 Jul 2007 at 9:59 pmKevin Mark

    What about speed?

  4. on 10 Jul 2007 at 6:09 pmmatthews

    The device must send some kind of signal when roaming I wish we knew what that was and how to use it.

  5. on 20 Jul 2007 at 10:23 pmseele

    @Kevin

    Using the Speakeasy Speed Test I’m getting 429kbs down and 99kbs up with 23 bars from the Washington, D.C. server.

  6. on 20 Jul 2007 at 10:46 pmVerizon EVDO Update at obso1337.org

    […] is an update to my previous post on using high speed cellular cards in […]

  7. […] Verizon EVDO in Kubuntu Linux at obso1337.org Posted by iqag Filed in Linux and free software […]

  8. […] writing a post about this entry http://weblog.obso1337.org/2007/verizon-evdo-in-kubuntu-linux/ Stay […]

Trackback this post |