Sony-Ericcson GC79 GPRS card with T-Mobile Service


06.23.2005: It ain't the worlds fastest wireless choice but the price is right. Since I have a T-mobile voice plan, my GPRS service costs only $20 per month. Without the voice plan, it would cost $30. Initial speed tests indicate a throughput of about 30K. But for roughly universal coverage, I am absolutely delighted.


Getting to work with Linux was not too difficult – and that comes from a rookie. I am committing myself to a life without Windows... After doing quite a bit or research and reading what others did, I got it up and running. What worked for me is presented below.


If this helps at least one person, then writing this log will be well worth it. My implementation will likely improve as my skills grow. I am always open to suggestions.


Basic Environment

IBM T40 / Fedora Core 3


Device

/var/log/messages indicates that my card is ttyS14:


[root@localhost ~]# tail -n 3 /var/log/messages

Jun 23 19:08:51 localhost kernel: PCI: Enabling device 0000:07:00.1 (0000 -> 0001)

Jun 23 19:08:51 localhost kernel: ACPI: PCI interrupt 0000:07:00.1[A] -> GSI 11 (level, low) -> IRQ 11

Jun 23 19:08:51 localhost kernel: ttyS14 at I/O 0x4800 (irq = 11) is a 16550A


Configuration

I created the following scripts in /etc/ppp/peers: t-mobile, t-mobile-connect, t-mobile-disconnect. They are presented below. I do not think that t-mobile-disconnect is necessary for me because I terminate my connection by simply hitting ctrl-C. From what I can tell, the disconnect script never gets run.


Here is /etc/ppp/peers/t-mobile. You can read what all these things mean in the man page for ppp:


[root@localhost ~]# more /etc/ppp/peers/t-mobile

/dev/ttyS14

115200

defaultroute

usepeerdns

nodetach

crtscts

lock

noauth

local

noipdefault

#debug

connect "/usr/sbin/chat -v -f /etc/ppp/peers/t-mobile-connect"

disconnect "/usr/sbin/chat -v -f /etc/ppp/peers/t-mobile-disconnect"


Here is /etc/ppp/peers/t-mobile-connect – forgive my debugging messages. I like having them there:


[root@localhost ~]# more /etc/ppp/peers/t-mobile-connect

TIMEOUT 10

ABORT 'BUSY'

ABORT 'NO ANSWER'

ABORT 'ERROR'

SAY 'Starting GPRS connect script\n'


# Get the modem's attention and reset it

#SAY 'Doing ATZ\n'

#"" 'ATZ'


# Open the modem

"" 'AT+CFUN=1,1'


# E0=No echo, V1=English results codes

SAY 'ATE...\n'

OK 'ATE0V1'


# Set Access Point Name (APN)

SAY 'Setting APN\n'

OK 'AT+CGDCONT=1,"IP","internet2.voicestream.com"'


# Dial the number

SAY 'Attempting to dial ...\n'

ABORT 'NO CARRIER'

SAY 'Dialing...\n'

OK 'ATD*99***1#'

SAY 'Doing ispconnect...\n'

CONNECT ''


Here is /etc/ppp/peers/t-mobile-disconnect:


[root@localhost ~]# more /etc/ppp/peers/t-mobile-disconnect

"" "\K"

"" "+++ATH0"

SAY "GPRS disconnected."


DNS

I could not connect until I input the following DNS servers into /etc/resolv.conf: 216.155.175.105 and 216.155.175.106. I got these addresses from various sources on the Internet. When I used these values in resolv.conf, my connection would go through and I'd be assigned an IP address. But DNS queries would go unanswered. I could see this through my packet sniffer. But I also observed that T-mobile reported to me the correct DNS servers: 66.94.9.120 and 66.94.25.120. I changed resolv.conf ... and now it works like a charm:


[root@localhost ~]# more /etc/resolv.conf

; generated by /sbin/dhclient-script

;search cust.hotspot.t-mobile.com

#nameserver 216.155.175.105

#nameserver 216.155.175.106

nameserver 66.94.9.120

nameserver 66.94.25.120


How to Connect

To connect, as root I type:


pppd call t-mobile


Here is what I get:


[root@localhost ~]# pppd call t-mobile

Starting GPRS connect script

ATE...

Setting APN

Attempting to dial ...

Dialing...

Doing ispconnect...

Serial connection established.

Using interface ppp0

Connect: ppp0 <--> /dev/ttyS14

local IP address 10.172.210.232

remote IP address 10.172.210.0

primary DNS address 66.94.9.120

secondary DNS address 66.94.25.120


At this point, my command line just hangs. The connection is established and I can surf or whatever. Depending on signal strength, I sometimes have to try a few times. So far I have noticed a direct correlation with the signal strength indicator on my T-mobile phone. When the phone says there is a good signal, my ppp connection goes right through. When the signal is wek, I sometimes have to try several times.


To close the connection, I hit cntr-C. This is what I get:


Terminating on signal 2.

Connection terminated.

Connect time 24.2 minutes.

Sent 86326 bytes, received 332221 bytes.

Serial link disconnected.

Connect time 24.2 minutes.

Sent 86326 bytes, received 332221 bytes.


Note: A lot of what I read recommended that I use ip-up.local and ip-down.local scripts. I tried to use these to swap out my resolv.conf file “manually” upon connect/disconnect. But the scripts did not run upon the establishment of the ppp connection. From I read, this happens automatically, but clearly I do not understand the process sufficiently well. As it is now, I use the resolv.conf file provided above. When I connect to the Internet using another interface (Ethernet, Wi-Fi), my resolv.conf file automatically gets over written. When I close the connection, the original gets put back automatically. I only mention this in case you are as new to Linux as I am.



Update: 02.18.2006

All this works AS IS if you get your hands on an unlocked GC83 EDGE card. Just swap the SIM card ... check /var/log/messages to see what tty “port” is activated when you plug it in, change the first line of the t-mobile script accordingly, and off you go at 3 times the speed.


Also, when I switched to UBUNTU linux, I started getting error messages about echo replies not being received. After four such attempts, my machine would assume that its peer (i.e. T-Mobile) was dead and disconnect me. To fix this, follow the advice given at http://gehennom.net/~tool/tiki-view_blog_post.php?blogId=3&postId=22 which I cut and paste here:


Update: I had to edit /etc/ppp/options to comment out these two lines in order to prevent some echo failure errors.:
#lcp-echo-interval 30
#lcp-echo-failure 4