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.

kernel tweaking

bluez1.png 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

bluez2.png 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[655]: HCI dev 0 registered
Apr  8 19:51:48 sting hcid[655]: HCI dev 0 up
Apr  8 19:51:48 sting hcid[655]: Starting security manager 0

once loaded you can test your device with hcitool

olterman@sting:~$ hcitool dev
Devices:
hci0    00:0D:88:9E:F1:BA

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
Scanning ...
00:0A:D9:9E:EE:BE       Olterman T610

Voila so we can see both sides of the wireless connection.

Filetransfer

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
Inquiring ...
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:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 7
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX File Transfer" (0x1106)
Version: 0x0100

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.

0 0 votes
Article Rating

In:

Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Michael301080

Thanks,

for this little tutorial. 😉

1
0
Would love your thoughts, please comment.x
()
x