Wednesday, November 28, 2007

How to connect to the internet using T-Mobile and bluetooth

I have a laptop with Debian, cell phone (Nokia N70) with bluetooth and this howto describes how to connect to the internet.

Connect USB bluetooth dongle to the laptop and check it:

$ hciconfig
hci0: Type: USB
BD Address: 00:02:72:D2:23:12 ACL MTU: 310:10 SCO MTU: 64:8
RX bytes:686 acl:0 sco:0 events:22 errors:0
TX bytes:337 acl:0 sco:0 commands:21 errors:0

Scan for the phone:

$ hcitool scan
Scanning ...
00:19:79:86:EB:BC Nokia N70

Create a serial device for communicating with the modem in the phone:

$ rfcomm connect /dev/rfcomm0 00:19:79:86:EB:BC 3
Connected /dev/rfcomm0 to 00:19:79:86:EB:BC on channel 3
Press CTRL-C for hangup

(A dialog will popup on the phone asking me to allow the laptop to connect.)

Connect using wvdial:

$ wvdial
--> WvDial: Internet dialer version 1.56
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}"}&} }*} } g}%~
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Wed Nov 28 12:58:55 2007
--> Pid of pppd: 4378
--> Using interface ppp0
--> pppd: �[08][06][08]�[10][06][08]
--> pppd: �[08][06][08]�[10][06][08]
--> pppd: �[08][06][08]�[10][06][08]
--> pppd: �[08][06][08]�[10][06][08]
--> local IP address
--> pppd: �[08][06][08]�[10][06][08]
--> remote IP address
--> pppd: �[08][06][08]�[10][06][08]
--> primary DNS address
--> pppd: �[08][06][08]�[10][06][08]
--> secondary DNS address
--> pppd: �[08][06][08]�[10][06][08]

And that's it, I am connected.


$ wajig install wvdial bluez-utils

And setup the /etc/wvdial.conf file:

$ cat /etc/wvdial.conf
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/rfcomm0
ISDN = 0
Phone = *99***1#
Password = doesnt_matter
Username = doesnt_matter
Stupid Mode = 1


Unknown said...

I have a similar guide:

'Desktop System Setup with Debian GNU/Linux 4.0 'Etch'' - 'Internet access through a GPRS or 3G / W-CDMA phone from a computer over Bluetooth':

Pete Boyd

Unknown said...

Thanks for the link.

Either one can use wvdial as I do, or the way you do it.