[ltp] WiFi/GPRS on a T21

Crispian Thorne linux-thinkpad@linux-thinkpad.org
Thu, 14 Apr 2005 00:44:48 -0400


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In case anyone is interested I now have a T-mobile GC79 card in my
Thinkpad T21 working excellently in both wifi & GPRS modes.

GPRS is internet over cell phone service- it's only about 56k, but the
T-mobile plan I got is $29.99 a month for unlimited usage- and for a
connection pretty much anywhere it's great! And this card is a
low-profile combined GPRS/802.11b- best of both worlds and small enough
to leave in even when stowing the laptop in my messenger bag.

It's still a little flaky in Winblo$e, but seems to be rock solid in
Linux! However usual caveats apply- this is only my experience on my
laptop- so don't blame to me if you sign up for a 12 month contract with
T-mobile and you can't make it work on your machine!

Here's what I had to do to get it to work (this worked for me on 2
Debian-based distros- Libranet http://www.libranet.com and Ubuntu
http://www.ubuntulinux.org/, on both a 2.4.26 kernel and a 2.6.8 & 2.6.11)-

For wifi I use ndiswrapper & these drivers
http://www.crispian.org/gc79/Wlan/ (you need to have both files
"bcmwl5.inf" & "bcmwl5.inf" so download them somewhere convenient). You
may find that ndiswrapper is already installed on your system, but
there's a ton of pages out there on setting up ndiswrapper drivers (like
this one-
http://www.builderau.com.au/program/0,39024614,39130404,00.htm) so a
quick Google should help if you need more help (don't forget to issue
"ndiswrapper -m" to make sure the module loads automatically from now on).

Drivers can also be found at
http://www.sonyericsson.com/downloads/V1.1.1.939_WHQL_USA_GC79_Web.zip.

It drove me nuts that the card seemed to be up and showing a good,
strong connection, but just could not get an IP address from my router.
After much Googling I stumbled, quite by chance, on a similar problem
with another card that fixed things when I tried it! Turns out that the
driver.conf file incorrectly sets "radiostate" to 1 (false) when it
should be 0 (true). Editing /etc/ndiwsrapper/bcmwl5/<driver>.conf &
changing radiostate from 1 to 0 fixed it (there are two <driver>.conf
files in my bcmwl5 folder, so I changed it in both of them)- as soon as
I did this a quick "ifup wlan0" and I was on line!

To get the GPRS working I added these 3 files-
http://www.crispian.org/gc79/provider (save it as
/etc/ppp/peers/provider but make a backup of your original first),
http://www.crispian.org/gc79/tmobile-connect (save as
/etc/chatscripts/tmobile-connect),
& http://www.crispian.org/gc79/tmobile-disconnect (save as
/etc/chatscripts/tmobile-disconnect).

I am truly indebted to a certain David A. Patterson for these files- you
can read his experiences setting up this card here-
http://hardware.mcse.ms/archive42-2005-2-110936.html.

In "provider" you will need to change the line "/dev/ttyS4" to match
whatever the card shows up as on your system (check "dmesg" when you
plug in the card, or watch closely as you boot)- it is "/dev/ttyS4" in
one distro & "/dev/ttyS14" in another on my box!

This done a simple "pon" to turn it on, and "poff" to turn it off is all
that's required (sometimes I have to "pon" a coupla times, but it always
comes up within 3 tries)

So there you have it :) work a treat for me!

Coupla last things- I've found the Gnome "Modem Lights" panel applet
really useful to turn on & off the GPRS connection- you just need to
change the Lock file ttyS# in the advanced tab to match whatever your
card shows up as.

I also found it really useful to use sudo (installed by default on
Ubuntu, easily grabbed on others) to give me no password access to /sbin
(do a Google on "visudo" to learn about how to set this up). This lets
me add a coupla panel buttons that do "sudo ifup wlan0" & "sudo ifdown
wlan0" making it really easy to connect to my home or office network or
check if there's an open network available before I fire up the GPRS
connection.

Hope this all makes sense and is helpful to *someone* (if not at least I
can save it for myself)- yell if I can clarify any of it- I don't
pretend to be a guru, but I'll help if I can!

- --
Crispian Thorne
linux@crispian.org
*linux & lovin' it*
Linux User # 329400
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFCXfVAAWT0cB0UVWYRAlMdAJ0SgBTb1i756ghkVS6vwR34KyVOmwCdHgCM
2b0/7kdJTY/qXBdJRTIah18=
=Dcl/
-----END PGP SIGNATURE-----