So I decided to get with the program and set up bluetooth on my laptop to sync my phone (Ericsson T610) and to just be cooler than the next dude.
It turned out that it was a whole lot to fix for bluez … but when it works, it was time well spent.
so to start with I am running the 2.4.25 kernel since my machine dies when I load airo.o driver for my wlan card with 2.6.x
I started looking at what kernel tweaks I nedded, The first mistake I made was to add the bluetooth support under the USB options, later I found the bluetooth subsystem. At first I only added the bluetooth subsystem and none of the extra drivers this turned out to be another mistake. Most important apart from the bluetooth subsystem is the rfcomm since almost all (I still havent found any who doesnt) Blue apps use an rfcomm link between your bluetooth devices
I only added the SCO driver so that I could use the laptop as a headset to my phone. still working on this.
User space apps
To be able to control my bluetooth device and to find other devices I need some userspace tools. the easiest way to get these is to (on a debian system)
apt-get install bluez-*
If you know exactly what you are getting start your bluez demons and plug in the bluetooth device, if not just reboot and let init start the bluetooth services. Check with /var/log/syslog that your device registers as you stick it in it should look something like the cut out below, if you get no driver assigned either you dont have the right stuff in your kernel or you have a new bluetooth device the kernel doesnt recognize.
Apr 8 19:51:47 sting kernel: hub.c: new USB device 00:07.2-1, assigned address 4 Apr 8 19:51:48 sting hcid: HCI dev 0 registered Apr 8 19:51:48 sting hcid: HCI dev 0 up Apr 8 19:51:48 sting hcid: Starting security manager 0
once loaded you can test your device with hcitool
olterman@sting:~$ hcitool dev
This means your device is working fine. The hexcode there is the id of your device and it works much lice the mac adress on your nic. So how about finding your precious phone or pda now…
olterman@sting:~$ hcitool scan
00:0A:D9:9E:EE:BE Olterman T610
Voila so we can see both sides of the wireless connection.
Time to send something over. The first thing to do is to set up a serial connection between your computer and the handheld. One nifty little app for this is obexftp (the debian package has the same name). but first we must find out what channel to send on (channels in bluetooth work like ports, and you have different services listening on diffent ports/channels)
olterman@sting:~$ sdptool search FTRN
Searching for FTRN on 00:0A:D9:9E:EE:BE ...
Service Name: OBEX File Transfer
Service RecHandle: 0x1000f
Service Class ID List:
"OBEX File Transfer" (0x1106)
Protocol Descriptor List:
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Here we see that Obex File transfer listens on channel 7 on device 00:0A:D9:9E:EE:BE So to send a file I run the following command (notice the 7 and the hexcode)
obexftp -b 00:0A:D9:9E:EE:BE -B 7 -p mycutepic.jpg
Using sdptool browse you can get all the services and their channels. Now if I want to receive something on the phone the easiest way to do it if on a gnome system is to install openobex-apps and obexserver the run obex server if you send a pic from your phone it will be received by the server and put in your homedir.
Synching contacts & calender with Evolution
Synching with evolution is very simple if you have your device up and running just download multisync with the irmc, irmc-bluetooth and evolution plugins and set up a syncronisation between evolution and irmc in irmc choose your bluetooth device.