PPP chat scripts for T-Mobile Sony Ericsson T610 GPRS via Bluetooth with Debian
Man, that’s a long title. I need to avoid the use of KPPP. It is a KDE application that I have to run as root in order to use. It allows me to use GPRS connectivity via PPP. It is very handy, because it required minimal configuration after a few pointers from my esteemed colleague and fellow AJUG member Angus Berry. Methods to use it without running it as root (as shown in the KDE docs) have not worked for me. This is a problem, since it screws up a tempfile for the ICE window manager when launching it in Gnome, which prevents me from successfully launching a KDE session without first repairing the file whose permissions have been unfavorably altered.
I have created a set of PPP chat scripts for GPRS over Bluetooth with T-Mobile working. The scripts are based on excerpts from Linux Unwired (thanks guys!) and the O’Reilly article Linux Untethered by Brian Jepson. They are currently a bit suboptimal, though. When I hang up, the Bluetooth connection between the phone and the adapter is sometimes locked in some way and redialing does not work well. To get it to work again, I have to power down the phone and turn it on again. I also periodically get some sort of serial loopback error when trying to initialize the pppd daemon, whose trail of unpleasant spew ends as follows:
…
Serial line is looped back.
sent [LCP TermReq id=0xb “Loopback detected”]
rcvd [LCP TermReq id=0xb “Loopback detected”]
sent [LCP TermAck id=0xb]
rcvd [LCP TermAck id=0xb]
Connection terminated.
Serial link disconnected.
I use an Apple Titanium PowerBook G4 1Ghz with a D-Link DBT-120 USB Bluetooth Adapter and the bluez-utils Debian package. After binding /dev/rfcomm0 with ‘rfcomm bind’ I am ready to run invoke the pppd daemon with ‘pppd call tmobile’. I use the /etc/bluetooth/rfcomm.conf file to avoid entering the specific info for bind each time. It works fairly well, and when a decent phone signal is available I can usually sustain 5.5KBps.
I have posted the current content of these scripts below. If anyone has suggestions for improvement, let me know! Thanks.
/etc/ppp/peers/tmobile:
/dev/rfcomm0 # device bound to T610 phone
230400 # speed
defaultroute # use the network for the default route
usepeerdns # use the DNS servers from the remote network
nodetach # keep pppd in the foreground
crtscts # hardware flow control
lock # lock the serial port
noauth # don’t expect modem to authenticate itself
local # don’t use Carrier Detect or Data Terminal Ready
debug
connect “/usr/sbin/chat -v -f /etc/chatscripts/tmobile-connect”
disconnect “/usr/sbin/chat -v -f /etc/chatscripts/tmobile-disconnect”
/etc/chatscripts/tmobile-connect:
# File: /etc/chatscripts/tmobile-connect
#
# Chat script for GPRS connection
# with T-Mobile t-Zones
TIMEOUT 10
ABORT ‘BUSY’
ABORT ‘NO ANSWER’
ABORT ‘ERROR’
SAY ‘Starting GPRS connect script\n’
# Get the modem’s attention and reset it
“” ‘ATZ’
# EO=No echo, V1=English result codes
#OK ‘ATEOV1′ # not working for me, causes trouble
# Set Access Point Name (APN)
SAY ‘Setting APN\n’
OK ‘AT+CGDCONT=3,”IP”,”wap.voicestream.com”‘
# Dial the number
ABORT ‘NO CARRIER’
SAY ‘Dialing…\n’
OK ‘ATD*99***1#’
CONNECT ”
/etc/chatscripts/tmobile-disconnect:
# File: /etc/chatscripts/tmobile-disconnect
#
# Chat script for disconnecting via GPRS
# from T-Mobile
“” “\K”
“” “+++ATH0″
SAY “GPRS disconnected.”
/etc/bluetooth/rfcomm.conf:
# rfcomm binding for T610
rfcomm0 {
bind yes;
# Bluetooth address
device xx:xx:xx:xx:xx:xx; # (your device address here)
# RFCOMM channel
channel 1;
# Description
comment “Ericsson T610 Bluetooth”;
}
[…] OK, some news about T-Mobile’s GPRS and using it for Linux. A couple of weeks ago, chat stopped working when I was connected via GPRS. Last week, HTML stopped working. As it turns out the ability to use Unlimited t-zones for full GPRS connectivity was a fluke; the result of T-Mobile not having yet blocked the appropriate TCP ports. They apparently have them blocked now. After switching back to the full-rate Internet plan, I continued to have issues with FTP. I called up T-Mobile to figure out what was the matter. Upon stating that I had question about which TCP ports were open, I was transferred from Tier 1 to Tier 2. After stating that I was using Debian Linux to connect to my phone, I was transferred directly to Tier 3 support. The guy was really cool, and I found out a couple of things that are updates to my previous post about GPRS on Linux. […]
Pingback by yep, that’s me - barry at alltc.com » Changes and revelations about T-Mobile GPRS — March 16, 2006 @ 9:43 pm