Mobile Internet on Linux

So much old information!

I've cut out old stuff from this page like pricing plans. Shop around. ;)

It's interesting to review the kinds of data rates I've seen using bluetooth dun as I experiment with phones and carriers:

If you have good UMTS coverage, I think cingular is the king of the hill now. Many of the UMTS phones will let you use the high-speed data while you talk on a voice call. Verizon can't do that currently--they suspend the data while you talk. (Or worse, the data connection hangs and has to be manually restarted from the computer.)

The e815 and cu500 are the only phones that might have been hitting the ceiling for bluetooth throughput. (Sadly neither has bt2.0 to find out if they will go higher.) Don't listen to salespeople who say bluetooth dialup cannot perform well. This myth is in part fueled by the fact that MS has had such poor performance in both its desktop and embedded bluetooth stacks.

Wireless cell cards

To use an EVDO card in linux, one place to look is Linux Airprime 5220 support.

It all gets very complicated when you want to use it with a Linux pda or laptop. Some Sierra Wireless cards are supported on Linux (not well supported in my experience) but none of the others are. So you'll want to look into a bluetooth phone so you don't need no steenking drivers. Good luck.

Verizon and a Motorola V710

I have been watching for the chance to move from the low speed network to *anything* faster. I didn't want to give up the convenience of a bluetooth connection so I had to wait for Verizon or Sprint to come out with a 1xrtt bluetooth phone. The V710 from Verizon does it. It would be even better if it could also do EV-DO but maybe I'll get a new device around the time the faster network is deployed here (Salt Lake).

I also cleaned up the way I was setting up bluetooth rfcomm assignments (you should probably not do it the way I set it up with my Nokia on T-Mobile).

The V710 uses channel 8, not 1, so your /etc/bluetooth/rfcomm.conf should look something like:

rfcomm2 {
 bind yes;
 device 00:0A:28:BB:BB:BB;
 channel 8;
 comment "Motorola v710";
}

my /etc/ppp/peers/verizon contains (with the xxxxxxx replaced with my phone number):

noauth
hide-password
connect "/usr/sbin/chat -v -f /etc/chatscripts/verizon"
debug
230400
defaultroute
noipdefault
user 801xxxxxxx
password vzw
remotename verizon
ipparam verizon
usepeerdns
/dev/rfcomm2

my /etc/chatscripts/verizon contains

ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
'' ATZ
OK-AT-OK ATDT#777
CONNECT \d\c

It works great with a simple pon verizon and is much faster than T-Mobile.

Using the Aircard 750 with T-Mobile

I originally opted for the Sierra Wireless Aircard 750. I'm keeping this ancient stuff around just in case someone needs it for reference.

Set up the windows software and make sure the card works under windows. This registers the card and also updates the firmware.

Get the pcmcia files from Sierra Wireless. They also provide some of the config information below but not specifically for T-Mobile's network. Note that a recent pcmcia package may already have these settings in place.

These are the main places to get the configuration right. I'm calling my configuration tmobile in these examples...

Regarding "internet2" below in the configuration... from a post by MattPackwood@cs.com:

If you have an "Internet Plan" you can access wap.voicestream.com and internet2.voicestream.com.

If you have the "Pro" or "VPN" service (there is no extra cost for this compared to a "regular Internet Plan") you can access internet3.voicestream.com and wap.voicestream.com (but NOT internet2.voicestream.com!).

So use whatever works, but take note that internet2 will give you "private" IP addresses so there may be some network services that don't work.

/etc/ppp/peers/tmobile:
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/tmobile"
debug
/dev/ttyS1
57600
defaultroute
noipdefault 
user ''
remotename tmobile
ipparam tmobile
crtscts
idle 300

/etc/ppp/chatscripts/tmobile:
ABORT ERROR
'' ATZ
OK AT+cgdcont=1,"IP","internet2.voicestream.com"
OK ATD*99#
CONNECT ''

/etc/ppp/pap-secrets:
(none)  *       password
'' tmobile

/etc/ppp/resolv/tmobile:
nameserver  216.155.175.40
nameserver  216.155.165.50
You must hardcode the DNS servers this way when using the Sierra card for some reason. Trying to get PPP to discover the servers always made the connection fail for me. You may want to try your own ISP's DNS servers if this one doesn't work.

I suggest you disable image compression on http://getmorespeed.t-mobile.com. You must be using t-mobile DNS in order for getmorespeed to resolve.

/etc/ppp/options:
You MUST disable the lines that give values for lcp-echo-interval and lcp-echo-failure or your connection will always terminate (eg after two minutes). It appears that GPRS providers do not reply to lcp echo requests but pppd normally uses these to determine if the connection is still good.

/etc/apm/event.d/ppp:
#!/bin/sh

# stop and also restore ppp connection

case "$1" in
suspend)
	/usr/bin/poff
	;;

resume)
	(sleep 15 && /sbin/ifconfig eth0 >/dev/null 2>&1 || pon tmobile) &
	;;

esac

This script ensures that ppp isn't holding onto the port when the laptop is being suspended. This reduced the need to eject and reinsert the card. The connection will be restored at resume time if no ethernet card is present.

Fire it up

On my Debian box, I just issue

pon tmobile

to get it to run. There are significant delays while the chatscript runs, while it's waiting for a reply to modem commands. Actually if it runs without the pauses, something is probably wrong.

I had a lot of trouble whenever a connection failed. I invariably had to either eject the card and reinsert, restart pcmcia services, or both. The Linux driver seems to get in a strange state especially after a failed connection. The card seems to run hot if it's connected for a while and that's often when I see trouble.

When you fire up ssh, use the -C option to enable compression.

Bluetooth and GPRS data

I also have the Socket communications CF "G" model bluetooth adapter and I've set things up with a Nokia N-Gage. This configuration actually works a lot better than the card above. I get much better coverage and basically no connections hanging. Too bad I didn't try this route first.

I installed bluez from cvs, installed pcmcia-cs from unstable.

I set up a resume script in /etc/apm/event.d/bluetooth that starts and stops the bluetooth card:
#!/bin/sh

# stop and also restore bluetooth

case "$1" in
suspend)
    rfcomm release 0
    killall hciattach
    sleep 2
    ;;

resume)
    # this belongs in pcmcia serial script (?)
    hciattach /dev/ttyS1 socket
    hciattach /dev/ttyS3 socket
    rfcomm bind 0 00:60:57:85:BD:5B 1
    ;;

esac

Note this stuff really should be in the pcmcia scripts but I hate to make changes to scripts that will be overwritten when I update the pcmcia package. The only problem I see with this for now is that stuff doesn't come up when I start up the machine, only when I resume it. I rarely have to reboot my laptop so it's not much of an issue.

I use a new config in /etc/ppp/peers/tmobile:
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/tmobile"
debug
/dev/rfcomm0
115200
defaultroute
noipdefault
user ''
remotename tmobile
ipparam tmobile
crtscts

The bluetooth setup is very nice. I never have to think about what card is inserted since I leave the bluetooth card in. Whenever I resume my laptop without an ethernet card inserted, it goes online using my Tmobile connection. I don't even have to think about it any more--it's there when I need it.

References

Brad Midgley