Xubuntu: Internet over GPRS via Bluetooth

Setup was a breeze. No wonder the Ubuntu distro family are among the top ranking in Distrowatch. I am using this generic no-name dongle I found at a bargain price in CDR-King Philippines. More on my Xubuntu laptop installation later while I discuss setup bits of the little bluetooth wonder. Note that this mini-howto is (U|Ku|Xu|Edu)buntu specific. Basically this is a duplicate of my previous effort in making this work with my Gentoo desktop box.

Setup

  • Mobile Phone = Nokia 3230
  • OS = Ubuntu Server + xubuntu-desktop 6.06 LTS Dapper Drake
  • Kernel = linux-image-686
  • GSM Network = SMART Philippines Prepaid

The Kernel specifically have compiled in support for ppp and bluetooth, so no worries here. 🙂

My Bluetooth Dongle Device

$ lsusb
Bus 001 Device 003: ID 1131:1001 Integrated System Solution Corp. KY-BT100 Bluetooth Adapter
Bus 001 Device 001: ID 0000:0000

Apparently this is a supported chipset. The commands below are to executed as root.

Install Essential Packages

$ sudo apt-get install bluez-utils ppp
$ sudo /etc/init.d/bluez-utils restart

Test Bluetooth

root@dexter:~# hcitool scan
Scanning ...
00:13:70:1F:B6:CD Decky

root@dexter:~# l2ping 00:13:70:1F:B6:CD
Ping: 00:13:70:1F:B6:CD from 11:11:11:11:11:11 (data size 44) ...
0 bytes from 00:13:70:1F:B6:CD id 0 time 17.39ms
0 bytes from 00:13:70:1F:B6:CD id 1 time 11.37ms
0 bytes from 00:13:70:1F:B6:CD id 2 time 11.13ms
0 bytes from 00:13:70:1F:B6:CD id 3 time 12.76ms
4 sent, 4 received, 0% loss

root@dexter:~# sdptool browse 00:13:70:1F:B6:CD
Browsing 00:13:70:1F:B6:CD ...
Service Name: Hands-Free Audio Gateway
Service RecHandle: 0x10000
Service Class ID List:
"Handfree Audio Gateway" (0x111f)
"Generic Audio" (0x1203)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 1
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Handfree Audio Gateway" (0x111f)
Version: 0x0101
.
Service Name: OBEX File Transfer
Service RecHandle: 0x10001
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 10
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100
.
Service Name: SyncMLClient
Service RecHandle: 0x10002
Service Class ID List:
"Error: This is UUID-128" (0x00000002-0000-1000-8000-0002ee000002)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 11
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Error: This is UUID-128" (0x00000002-0000-1000-8000-0002ee000002)
Version: 0x0100
.
Service Name: Nokia OBEX PC Suite Services
Service RecHandle: 0x10003
Service Class ID List:
"Error: This is UUID-128" (0x00005005-0000-1000-8000-0002ee000001)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 12
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Error: This is UUID-128" (0x00005005-0000-1000-8000-0002ee000001)
Version: 0x0100
.
Service Name: OBEX Object Push
Service RecHandle: 0x10004
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 9
"OBEX" (0x0008)
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100
.
Service Name: Dial-Up Networking
Service RecHandle: 0x10005
Service Class ID List:
"Dialup Networking" (0x1103)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 2
Language Base Attr List:
code_ISO639: 0x454e
encoding: 0x6a
base_offset: 0x100
Profile Descriptor List:
"Dialup Networking" (0x1103)
Version: 0x0100

Here, it is indicated by our service discovery tool that dial-up networking support is on Channel 2.

Setup PIN
echo "1234" > /etc/bluetooth/pin

Setup PIN-Helper
File: /etc/bluetooth/pin-helper

#!/bin/sh
echo -n "PIN:" `cat /etc/bluetooth/pin`

Be sure to make it executable. Mode 755.

Configurations
Using the infomation from sdptool and hciscan, you need to properly edit the contents of the following:

File: /etc/bluetooth/rfcomm.conf

rfcomm0 {
bind yes;
device 00:13:70:1F:B6:CD;
channel 2;
comment "Nokia";
}

File: /etc/ppp/chat-mygprs

'' ATZ OK
AT+CGDCONT=1,"IP","internet"
OK "ATD*99***1#"
CONNECT ''

Note that internet is the apn. In my Nokia 3230, I think this is overridden by the GPRS Config of the phone.

File: /etc/ppp/peers/mygprs

/dev/rfcomm0 115200
connect '/usr/sbin/chat -v -f /etc/ppp/chat-mygprs'
crtscts
modem -detach
noccp
defaultroute
usepeerdns
noauth
ipcp-accept-remote
ipcp-accept-local
noipdefault

Dial and Connect

$ pppd call mygprs
Serial connection established.
Using interface ppp0
Connect: ppp0 /dev/rfcomm0
PAP authentication succeeded
Cannot determine ethernet address for proxy ARP
local IP address 10.157.107.227
remote IP address 10.6.6.6
primary DNS address 203.172.11.25
secondary DNS address 202.57.67.45
Modem hangup
Connect time 47.8 minutes.
Sent 1301495 bytes, received 6024667 bytes.

Pair the devices by entering the PIN if it’s requested by the phone.
Should be a painless process.

YMMV but hopefully you’ll be able to connect and surf then.

If you encounter difficulties, remember to look at the logs (/var/log/ppp.log) and dmesg.

Additional Tips
SMART Network’s dynamically assigned DNS servers are notoriously unreliable. Try to find some public DNS to use. Try opendns.com as well.

Hope this helps. Happy bluetooth gprs internet!

Advertisements

2 thoughts on “Xubuntu: Internet over GPRS via Bluetooth

  1. Pingback: transfer file antara etch - bluetooth - e398 « nrkhlsmjd is not stand for…

  2. Pingback: How-To: Enable bluetooth internet using Ubuntu Karmic 9.10 + Sony Ericsson K770i « mundane idiosyncrasies

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s