March 15, 2006

Get broadband wireless with Verizon EVDO and Linux

Author: Tina Gasperson

Evolution-Data Optimized (EVDO) is a wireless broadband service that offers throughput of up to a theoretical maximum of 2.4Mbps. Verizon's service, which provides the best EVDO coverage in the US, is designed to work only with Windows. However, you can use Verizon's EVDO service to connect to the Internet with Linux with a little bit of tweaking.

I found some invaluable information online about how to get EVDO working in Linux online, mostly from kenkinder.com, www.ka9q.net, and LinuxQuestions.org. With the help of these sites and my own perseverance, I figured out an easy-to-follow, step-by-step guide to connecting to the Internet in Linux with EVDO.

You'll need a Verizon card; Verizon provided me with a PC5740 EVDO card that fits in the PC Card slot of any laptop. You'll also need a Linux distribution running X11 with a working copy of Point-to-Point Protocol daemon (pppd), as well as the ability to gain root access and use a terminal.

First, determine the product and vendor number of your EVDO card so you can call the correct kernel modules. If you're using the PC5740, I'll save you a few steps and tell you the numbers; write them down because you'll need them in the following step:

vendor=0x106c product=0x3701

If you're using another EVDO card, before you insert it, open a terminal window and type the following command as root:

cat /proc/bus/usb/devices devices

Then insert the card and type this command as root:

diff /proc/bus/usb/devices devices | grep Vendor

Your vendor and product numbers should come up in this format:

< P: Vendor=106c ProdID=3701
Rev=0.00

Now it's time to add the proper kernel module to include support for your card. Linux sees EVDO cards as USB/serial modems, so issue this command, again as root, inserting the correct numbers for your card:

modprobe usbserial vendor=0x106c product=0x3701

To verify that things are going as they should, change to the /dev directory and list the files there. You should see a file called ttyACM0; this is the name the computer has given your card.

You can use several different programs to make the device ttyACM0 dial out in Linux, but I'll show you how to use pppd because most Linux distributions include it. You could type the necessary pppd commands every time you want to get online, but it's easier to create a simple script. You'll need to know your Verizon-issued 10-digit number because it acts as your username. All the other data is common to all Verizon wireless broadband accounts.

To write the script, open your favorite text editor as root and type the following, replacing xxxxxxxxx with your number:

ttyACM0
115200
debug
noauth
defaultroute
usepeerdns
connect-delay 10000
user xxxxxxxxxx@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'

Name the file 1xevdo and save it in /etc/ppp/peers/. Check out kenkinder.com for a detailed explanation of what some of these script line items are for.

The last line of the script calls another file that you need to create, called 1evdo_chat. Again, as root in your text editor, create a file that contains the following information:

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

Name it 1xevdo_chat and save it in /etc/ppp/peers. This file contains modem commands, including the number 777, which it needs to dial to reach the Verizon EVDO network.

With your EVDO card plugged in, open pppd and call the scripts you just created. In a terminal as a regular user, type pppd call 1xevdo and press Enter. This command doesn't give you any immediate feedback, but you need to see what IP address Verizon assigns your modem, so type this command:

tail -f /var/log/messages

You should see a series of messages in your terminal similar to this:

Feb 15 20:12:48 localhost chat[7946]: abort on (BUSY)
Feb 15 20:12:48 localhost chat[7946]: abort on (NO ANSWER)
Feb 15 20:12:48 localhost chat[7946]: send (ATZ^M)
Feb 15 20:12:48 localhost chat[7946]: expect (OK)
Feb 15 20:12:48 localhost chat[7946]: ATZ^M^M
Feb 15 20:12:48 localhost chat[7946]: OK
Feb 15 20:12:48 localhost chat[7946]: -- got it
Feb 15 20:12:48 localhost chat[7946]: send (ATDT#777^M)
Feb 15 20:12:48 localhost chat[7946]: expect (CONNECT)
Feb 15 20:12:48 localhost chat[7946]: ^M
Feb 15 20:12:50 localhost chat[7946]: ATDT#777^M^M
Feb 15 20:12:50 localhost chat[7946]: CONNECT
Feb 15 20:12:50 localhost chat[7946]: -- got it
Feb 15 20:12:50 localhost chat[7946]: send (\d)
Feb 15 20:12:51 localhost pppd[7945]: Serial connection established.
Feb 15 20:12:51 localhost pppd[7945]: Using interface ppp0
Feb 15 20:12:51 localhost pppd[7945]: Connect: ppp0 /dev/ttyACM0
Feb 15 20:13:01 localhost pppd[7945]: local IP address
70.197.15.21
Feb 15 20:13:01 localhost pppd[7945]: remote IP address
66.174.38.5
Feb 15 20:13:01 localhost pppd[7945]: primary DNS address
66.174.95.44
Feb 15 20:13:01 localhost pppd[7945]: secondary DNS address
66.174.92.14

If the modem doesn't connect or gets disconnected, try again. Exit from pppd by holding down Ctrl-C. If you try to reconnect and you get this message:

Device ttyACM0 is locked by pid 6396

then become root, go to /var/lock, and delete the file that's locking ttyACM0. Type rm filename and press Enter.

Once you're connected successfully, you need to take one more step before you can surf. Look at your terminal message and find the local IP address that Verizon assigned to your card. Then, as root, open another terminal and type the following, inserting your IP address in place of the xxx.xxx.xxx.xxx:

route add default gw xxx.xxx.xxx.xxx

This command adds the local IP address to your routing table so your computer can communicate with other computers on the Internet. Now you should be ready to surf the Web, check your email, and connect to Internet Relay Chat with your Verizon EVDO subscription and Linux.

Click Here!