Saturday February 11, 2012 10:00 AM AEST

Syncing a Bluetooth phone with a Linux box

By Leigh Dyer
10:34 Apr 30, 2008
Tags: Syncing | a | Bluetooth | phone | with | a | Linux | box
« 
Syncing a Bluetooth phone with a Linux box
The key options here are the Bluetooth address, which is the unique hardware ID for the phone, and the Bluetooth channel and “identifier” string, which can change from model to model – the “identifier” used on most Sony-Ericsson phones, for instance, is “Sony Ericss”. You can get the Bluetooth address of your phone by running “hcitool scan”, which lists the names and addresses of any nearby devices. Once you have that, you can determine the proper Bluetooth channel by using “sdptool” to browse the services advertised on your device:

sdptool browse 00:1B:AF:5E:CF:3D


On my 6110, channel 10 is listed as “SyncMLClient”, so hunt through the list for anything similar.

To run the synchronisation, click “Refresh” in the main Multisync-gui window. Manually editing XML configurations can be a bit hit-and-miss, but after a few attempts I completed my first successful synchronisation, and everything has been working happily since, with only one snag: syncing notes. I finally just disabled notes through Multisync-gui and, for good measure, through the device itself (using the PC Suite settings).

It was clear that setting up OpenSync wasn’t as easy as it could have been, but I don’t think it’s too far off: the XML configuration for the SyncML plug-in is the only tricky part, but all it really needs is a good GUI and some hardware autodetection. I can’t wait to see how the next version of OpenSync turns out.

WIRELESS BROADBAND AHOY!

The last feature I wanted to set up was wireless broadband access from my laptop. My old K700i had only GPRS for data networking, but the 6110, and its 3G and HSDPA support, can get broadband speeds.

Setting it up was basically a matter of configuring a serial connection to the phone over Bluetooth, and setting up a PPP link over that. Serial-over-Bluetooth uses a protocol called RFCOMM, and it’s configured in the “/etc/bluetooth/rfcomm.conf” file. Here’s what mine looks like:

rfcomm0 {
bind yes;
device 00:1B:AF:5E:CF:3D;
channel 4;
comment “Bluetooth Dial-Up”;
}



The “device” is the Bluetooth address of the phone, and the “channel” is the Bluetooth channel for the phone’s dial-up connection. As with the OpenSync setup, you can use “sdptool browse” to find the proper channel for your own phone. The “bind yes” option tells the Bluetooth system to start this serial device automatically on boot, but to save me a reboot, I restarted the Bluetooth services: sudo /etc/init.d/bluetooth restart

The PPP configuration consists of two parts: the core configuration, with the device, service, and authentication details, and the “chatscript”, which describes the initial communications between PC, phone, and provider. First, I created the core configuration:

sudo gedit /etc/ppp/peers/bluetooth

Here’s the actual configuration:

debug
noauth
usepeerdns
connect “/usr/sbin/chat -v -f /etc/chatscripts/bluetooth”
/dev/rfcomm0
115200
defaultroute
crtscts
lcp-echo-failure 0

Next came the chatscript, which I saved in to a file at “/etc/chatscripts/bluetooth”:

‘’ \rAT
TIMEOUT 12
OK ATH
OK ATE1
OK ‘AT+CGDCONT=1,”IP”,”telstra.internet”,””,0,0’
OK ATD*99#
TIMEOUT 22
CONNECT “”

The chatscript includes the network APN, which for my Telstra phone is “telstra.internet”. If you use a different provider, Google around to find the proper APN value. With the configuration complete, I can start the connection with a single command:

sudo pon bluetooth

Replace “pon” with “poff” to shut down the connection. If you have troubles with your own setup, check your /var/log/messages log for helpful error messages and debugging information.

 
« 
 
This article appeared in the February 2008 issue of Atomic.

Behind the scenes with Mass Effect 3! GTX 560 VGA round-up! Essential Skyrim tweaks to improve your game! Plus reviews, news, hardware, more games, and easy to following modding guides for PC builders. ON SALE NOW!
 
Latest Competitions
 
Atomic Magazine

Issue: 133 | February, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop
 
 
Close Get the February, 2012 issue of Atomic mailed to you for $8.95, including postage.

Buy nowDigital Version