|
发表于 2004-6-18 09:54:21
|
显示全部楼层
http://www.xmission.com/~bmidgley/tmobile/
兄弟看一下这个。这个网卡应该能解决,资料很多。
T-Mobile Internet on Linux
The wireless data landscape
T-mobile lowered the price on their unlimited data option. It's now $30/month ($20 if you already have a voice plan) whereas all the other guys are at $80/month (Verizon, Sprint) or they don't offer unlimited at all (AT&T).
It should be noted that GPRS (T-Mobile, AT&T) is slower than 1xrtt (Verizon, Sprint). GPRS is rated at a max of 56k but 1xrtt is supposed to reach 144k. I haven't tried 1xrtt but I can tell you that the rates I get with GPRS are well below 56k. T-Mobile may not have a speed advantage, but you have to give it to them for their price advantage.
Verizon is starting to deploy a real 3G network in some cities (Washington DC was one). At some point it may be worth looking into a bluetooth phone from Verizon that can do 1xrtt and also cdma2000 aka 1xEV aka 1xEV-DO once it's deployed in my town... I asked Verizon which phones could do all that and they were basically clueless (maybe because they are resisting bluetooth adoption for some reason).
Verizon sells a PCMCIA card made by Qualcomm ("C 5220" for "CDMA 1xEVDO") that is supposed to handle 3G as well as current technologies. It is not supported in Linux however. It shows up as a USB adapter with an unknown device attached:
06:00.0 USB Controller: Lucent Microelectronics: Unknown device 5802 (rev 10) (prog-if 10 [OHCI])
Subsystem: Lucent Microelectronics: Unknown device 5802
Flags: bus master, medium devsel, latency 64, IRQ 11
Memory at 21000000 (32-bit, non-prefetchable) [size=4K]
Capabilities: [50] Power Management version 2
Sep 17 17:47:25 jab kernel: cs: cb_alloc(bus 6): vendor 0x11c1, device 0x5802
Sep 17 17:47:25 jab kernel: PCI: Enabling device 06:00.0 (0000 -> 0002)
Sep 17 17:58:25 jab kernel: usb-ohci.c: USB OHCI at membase 0xe0947000, IRQ 11
Sep 17 17:58:25 jab kernel: usb-ohci.c: usb-06:00.0, PCI device 11c1:5802
Sep 17 17:58:25 jab kernel: usb.c: new USB bus registered, assigned bus number 2
Sep 17 17:58:25 jab kernel: hub.c: USB hub found
Sep 17 17:58:25 jab kernel: hub.c: 2 ports detected
Sep 17 17:58:27 jab kernel: hub.c: new USB device 06:00.0-1, assigned address 2
Sep 17 17:58:27 jab kernel: usb.c: USB device 2 (vend/prod 0xf3d/0x401) is not claimed by any active driver.
Sierra Wireless plans to have a strikingly similar high-speed card (Aircard 580) out in 2004. No official Linux support, but they may provide hints about how to use it like they do with their other cards.
This is intriguing... GSMTM? http://www.pcclub.com/edge/
Hardware
I originally opted for the Sierra Wireless Aircard 750. I'm not going to use T-Mobile for voice much and I figured I didn't need one more device to keep charged. (Actually, you can make voice calls using this card; under Linux you might be able to use an approach similar to the what one Linux user did on an Aircard 555.)
Set up the windows software and make sure the card works under windows. This registers the card and also updates the firmware.
Driver
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.
Configuration
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 "ro" 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
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
Tmobile's settings page http://www.t-mobile.com/help/services/tz/configother.asp
Sierra Wireless Linux pcmcia and config files http://www.sierrawireless.com/SupportDownload/ac7x0_linux.asp
GPRS-HOWTO (for some other provider) http://turtiainen.dna.fi/GPRS-HOWTO
Aircard 555 Linux Howto http://centerclick.org/aircard555/
Bluetooth solutions with Linux http://www.jepstone.net/index.cgi/Wireless
Bluetooth solution with MacOS X and Nokia 6310i http://www.mengwong.com/misc/tmobile-voicestream-gprs-nokia-6310i-bluetooth-osx.html
Tom's attempts with GPRS+bluetooth log http://www.teaparty.net/technotes/blue-gprs.html |
|