EVDO is like wifi, but works off cell phone towers so you can use it more places. The PC5740 is a card that Verizon Wireless offers for this service. Linux is an operating system. Here are my experiences getting a Verizon Wireless PC5740 EVDO card working in Linux. It’s largely based on a HOWTO for a similar device, the 5220. I had to change lcp-echo settings and also included information on using ifup and ifdown. I also patched usbserial and cdc-acm to get better performance, but that is no longer necessary.
Before we begin
About my Computer
All of this was tested on an IBM Thinkpad T41. Linux kernel 2.6.12-9-386 on Kubuntu 5.10 “Breezy Badger”. Ubuntu and Debian should be about the same if the versions line up.
Install with Windows
I suspect that you need to get the card working in Windows before Linux. There is an “activation” step and it seems like a good idea from a troubleshooting point of view to make sure it works in Windows. It will ask you to download the latest coverage maps. I’m not sure, but I think when you do that it actually reflashes the card with some information about signals to broadcast. The coverage map update is superstition on my part, but I think you do need to activate the card in Windows before it will even work in Linux. Correct me if I’m wrong (or not) on the requirement of Windows activation and setup.
Getting it Working in Linux
First, install the ohci-hcd module with this command:
Now you need usbserial, but to get it to work I had to specify exactly what card I wanted it to find. With my exact model, the vendor id is 0x106c and the product is 0x3701. An easy way to find that out is to look at what devices are installed before you insert the card, and after:
kkinder@garcia:~$ cat /proc/bus/usb/devices > devices Inserting Card kkinder@garcia:~$ diff /proc/bus/usb/devices devices | grep Vendor < P: Vendor=0000 ProdID=0000 Rev= 2.06 < P: Vendor=0000 ProdID=0000 Rev= 2.06 < P: Vendor=106c ProdID=3701 Rev=0.00 kkinder@garcia:~$
So when we inserted the card, the list of devices included one with a vendor ID of 106c and a product ID of 3701. That is my card. If you’re using another similar model, your vendor and product ID should be easy to find. Now, insert usbserial, specifying what card we’re looking for:
modprobe usbserial vendor=0x106c product=0x3701
If all goes well, you should have a file called /dev/ttyACM0:
kkinder@garcia:~$ ls /dev/ttyACM0 /dev/ttyACM0
Create a file called /etc/ppp/peers/1xevdo:
ttyACM0 115200 debug noauth defaultroute usepeerdns connect-delay 10000 user (Your phone number. No spaces or dashes)@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'
LCP ECHOs: You’ll notice the lcp-echo-failure and lcp-echo-interval commands. I found that after a minute or so of connectivity, pppd disconnected after some lcp-echos failed. These solved that problem.
Baud: I set my baud rate to 115200. Others have tried 9600. I don’t think it matters for this device, it’s just there to make the operating system feel like it’s using a modem. (Again, any corrections on that point are welcome.)
ppp chat script
Now create a file called /etc/ppp/peers/1xevdo_chat: (Updated)
# AT$QCMIPGETP "login" name used for MobileIP, which usually matches your MIN. # AT+GSN ESN in hex # AT+GMR firmware revision and build date. # AT+CSQ first number indicates the signal strength above -109 dBm (in # 2 dBm increments). A value of 7 or higher (-95 dBm) can be # considered adequate. 31 is the max. (Possible values in # Audiovox PC5740 are 0, 7, 15, 23, 31.) # AT+CDV=*22899 Update PRL. at+cdv=*22899 | OK | Lost carrier. 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'
My old script was simpler but Ulmo on evdofurms.com provided the above one which actually gets you signal quality. (More on that in a bit.)
pppd call 1xevdo tail -f /var/log/messages
You should see the ppp chat session and connection established in messages. Included in the output is the number of “cell phone bars” you would get in Windows:
Feb 7 18:58:36 localhost chat: send (ATTEV1&F;&D2;&C1;&C2S0;=0S7=60^M) Feb 7 18:58:36 localhost chat: expect (OK) Feb 7 18:58:36 localhost chat: ATTEV1&F;&D2;&C1;&C2S0;=0S7=60^M^M Feb 7 18:58:36 localhost chat: OK Feb 7 18:58:36 localhost chat: -- got it Feb 7 18:58:36 localhost chat: send (AT+CSQ;D#777^M) Feb 7 18:58:36 localhost chat: timeout set to 70 seconds Feb 7 18:58:36 localhost chat: expect (CONNECT) Feb 7 18:58:36 localhost chat: ^M Feb 7 18:58:36 localhost chat: AT+CSQ;D#777^M^M Feb 7 18:58:36 localhost chat: 15, 99^M Feb 7 18:58:40 localhost chat: ^M Feb 7 18:58:40 localhost chat: CONNECT Feb 7 18:58:40 localhost chat: -- got it Feb 7 18:58:40 localhost pppd: Serial connection established. Feb 7 18:58:40 localhost pppd: Using interface ppp0 Feb 7 18:58:40 localhost pppd: Connect: ppp0 <--> /dev/ttyACM0 Feb 7 18:58:41 localhost pppd: local IP address Your Local IP Address Feb 7 18:58:41 localhost pppd: remote IP address Your Internet IP Address Feb 7 18:58:41 localhost pppd: primary DNS address Verizon's DNS Address Feb 7 18:58:41 localhost pppd: secondary DNS address Verizon's DNS Address
Note the 15. That indicates my signal strength. You will get one of the following possible values: 0, 7, 15, 23, 31. These numbers basically map to the number of bars you would get in Verizon’s connection manager.
Using ifup and ifdown
I haven’t quite figured out how to automatically insert the required modules when the card is inserted. If someone else goes through the hassle of adding the hotplug entries, post a comment below.
However, modules aside, just add this line to /etc/network/interfaces (this may vary in your distribution).
iface ppp0 inet ppp provider 1xevdo
Then you should be able to use ifup ppp0 and ifdown ppp0 to bring up and down this interface.
âœ” Get basic configuration working
âœ” PPP Configuration
âœ” Test your bandwidth
Patches for Speed and Reliability
Fortunately, as of the 2.6.20 kernel, patching is no longer necessary. If you have an especially old kernel, this section may be helpful for you.
You should have some basic Linux literacy before you try this, but the gist is this: you download the patches and run the patch command against the patch file and the source file (or, for multiple files, the source tree.) A patch file just shows the changes that need to be made by a file.
This process will vary considerably based on your kernel version, where your kernel is installed, etc. Unless you’re running a completely monolithic kernel, you shouldn’t need to recompile the kernel, just the modules.
If you experience stalling downloads, try this patch for usbserial. Then set your maxSize argument on usbserial to 2048 or 4096 and see how those work. That makes my usbserial probe
modprobe usbserial vendor=0x106c product=0x3701 maxSize=4096
If you’re running a straight up 2.6.12-9-386 kernel on Breezy Badger, you can just download my patched binary of usbserial.ko. (Otherwise, build your own.)
On Windows, you should see the card get between 400 and 700mbps. I was getting about 160 mbps on Linux with the usbserial patch. I was pointed this thread which recommends a patch for cdc-acm. They’ve included a patch for 2.6.14. Based on that patch, I made a patch
for 2.6.12. Again, if you’re running the same kernel I am, you can download my binary. Here’s how to configure it:
modprobe cdc_acm maxszr=16384 maxszw=2048
See the thread for discussion of why this patch works.
- Bandwidth Testing
- General EVDO Information
- Verizon’s marketing page includes a service map but is mostly useless.
- evdoinfo.com has information on supporting non-Windows operating systems, using evdo cards with multi-user routers, etc.
- evdo-coverage.com is along similar lines and they’ll sell you a package they say will give you speeds up to 3000 or 4000mpbs using an external antenna. They also have a blog with generally useful information.
- Wikipedia page on EVDO explains everything you wanted to know.
- EVDO Forums
- Other cards