Ubuntu Linux & GPRS

I use an HP Ipaq 6315 PocketPC phone as my cell phone/pda and use Tmobile as my provider. I have unlimited Internet via GPRS data and was thinking that it would be cool to get my laptop to connect to the Internet via bluetooth to the phone, using the GPRS connection. Did some research on the Internet and found that the Belkin USB Bluetooth (F8T003) works well with Linux. Also used instructions from this page http://www.niemueller.de/wiki/?GPRSviaBluetooth.
- when you plug in the usb module you can check status by issuing the following command from a terminal window.
phwil@scully:~$ hciconfig -a
hci0: Type: USB
BD Address: 00:0A:3A:56:42:9B ACL MTU: 192:8 SCO MTU: 64:8
UP RUNNING PSCAN ISCAN

- Next run this command to find your phone (make sure your phone's bluetooth is turned on)
phwil@scully:~$ hcitool scan
Scanning ...
08:00:28:93:23:A1 Tmobile

- Then run the following command to determine what services are provided by you phone. You will want to remember the channel number for later configurations:
phwil@scully:~$ sdptool search DUN
Inquiring ...
Searching for DUN on 08:00:28:93:23:A1 ...
Service Name: Dial-up Networking
Service RecHandle: 0x10004
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 3
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

-
Now try pinging your phone with this command.
phwil@scully:~$ sudo l2ping 08:00:28:93:23:A1
Ping: 08:00:28:93:23:A1 from 00:0A:3A:56:42:9B (data size 20) ...
20 bytes from 08:00:28:93:23:A1 id 200 time 42.49ms
20 bytes from 08:00:28:93:23:A1 id 201 time 64.71ms

Next Step is to bind to the phone:
rfcomm bind 0 08:00:28:93:23:A1 3 (channel # from before)

You can set this up for permanent use by editing the following file:
sudo nano /etc/bluetooth/rfcorfcomm0 {
bind yes;
# # Bluetooth address of the device
device 08:00:28:93:23:A1; #
(add your phone mac address)
# # RFCOMM channel for the connection
channel 3;
#(add your channel)
mm.conf

Now you are ready to set up GPRS connection
Create the following file:
sudo nano /etc/wvdial
and then add the following:
[BluetoothMobile]
Modem = /dev/rfcomm0
Baud = 57600
SetVolume = 0
Dial Command = ATDT
Init1 = ATE1
Init2 = AT+CGDCONT=1,"IP","wap.voicestream.com","",0,0
FlowControl = CRTSCTS
[Dialer GPRS]
Username = user
Password = user
Phone = *99#
Stupid Mode = 1
Inherits = BluetoothMobile

Now from terminal window just issue command:
sudo wvdial GPRS
--> WvDial: Internet dialer version 1.54.0
--> Initializing modem.
--> Sending: ATE1
OK
--> Sending: AT+CGDCONT=1,"IP","wap.voicestream.com","",0,0
AT+CGDCONT=1,"IP","wap.voicestream.com","",0,0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
~[7f]}#@!}!}!} }6}!}$}%\}"}&} } } } }'}"}(}"}#}$@#&4~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu May 5 19:05:11 2005
--> pid of pppd: 29665
--> Using interface ppp0
--> local IP address 10.187.220.54
--> remote IP address 192.168.111.111
--> primary DNS address 66.94.25.120
--> secondary DNS address 66.94.9.120

You will see connection in the window and should get assigned IP address and DNS servers. The only problem I have is that /ect/resolv.conf is not updated with DNS. So I had to manually enter DNS for my provider.
to disconnect, ctr-c.

Your done and can now connect to the Internet (slowly) from anywhere you have cell coverage.

1 Response to "Ubuntu Linux & GPRS"

  1. Brad says:

    Hi,

    Just wanted to say thanks for putting together these notes. Believe it or not, someone somewhere (me) is still using an ipaq 6315 on a daily basis in 2008.

    I've tried to get this working before with no success. Your recipe was just what I needed.

    Now when I'm sitting in the front seat of a car 40 miles from the nearest wifi hot spot, I'll be able to get on the intertubes.

    Thanks!

    PS - You're right. It's not fast but it's good enough for ssh.

Powered by Blogger