Sunday, February 25, 2007

Bluetooth on Ubuntu Linux

Recently I borrowed a Bluetooth USB stick from a friend of mine, just to try if I could get it working on Ubuntu. My friend bought this stick at MediaMarkt for 13 euros, it has no brand on the package just the name Qtrek on the stick itself. And it's pretty small.

So I plugged in the stick and typed in "lsusb" on the console to see what kind of chipset it had. On the console it said:
ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

turns out this chipset is well supported on Linux, immediately a red light in the stick started to blink.

How it works now:
The first thing I tried was sending a file with my phone, it found my computer as "zaphod-0", I didn't have to do anything for this, it just was there.
When I wanted to send the file it failed however.
On the blog of Pascal de Bruijn I read about his experience with Bluetooth and also read he installed the "gnome-bluetooth" package. I followed his example and a new application called "Bluetooth File Sharing" appeared in my "Applications -> Accessories" menu.
By starting this application a nice little icon appears in the notification area (system tray). So again I tried to send a picture from my mobile phone, and all of a sudden this dialog popped up:
Since "Arthur Dent" is the bluetooth identification of my phone, I knew it worked, so I pressed the "OK" button and waited. Now the progressbar on my phone started to work and also the icon in the notification area starts an animation, and after a while this dialog appeared:
Then I knew the file was transferred, and there it was on my desktop. Worked like a charm. Well actually there were some humps and bumps, but once I fixed those it works exactly like I told above.

What really happened:
At first when I started the "Bluetooth File Sharing" application and wanted to send a file from my phone it failed. So I grabbed my sister's phone an LG KG800 and from there I tried to send a picture, and immediately it worked.
If you experience problems with this file sharing you can start the "Bluetooth File Sharing" application from the console by using the following command:

/usr/bin/gnome-obex-server

whenever something happens on the bluetooth connection debug messages are printed to the console, a succesfull transfer should look like this:

conn_request: bdaddr 00:17:4B:1D:0B:E9
conn_complete: status 0x00
** Message: Incoming connection from 00:17:4B:1D:0B:E9
** Message: Device 00:17:4B:1D:0B:E9 is about to send an object.
** Message: File arrived from 00:17:4B:1D:0B:E9
** Message: Filename '200702171898.jpg' Length 308934
** Message: Saving to '/home/lgespee/Desktop/200702171898.jpg'

Between the "** Message: Device ..." and "** Message: File arrived ..." the file is actually being transferred, so it can take a while for the lather to show up.
When I tried to send from my phone I only got to "** Message: Device ..." and then my phone told me the transfer failed. Since I am used to problems with my phone I gave it a good old reboot, and that did the trick, now it works like it should.

Tip of the day: Never ever buy a Nokia N70, cause it sucks in everything, bigtime, thanks Nokia.

5 comments:

lgespee said...

I opened a bug report about the first dialog telling the user a transfer is being offered. It does not have a caption/title and two non-descriptive buttons.

https://launchpad.net/ubuntu/+source/gnome-bluetooth/+bug/88066

gour@mail.inet.hr said...

Hi!

I'm interested whether one can use Bitpim (under Linux, of course) with GMS phone over Bluetooth?

Sincerely,
Gour

Andrew said...

I just bought a blue tooth adapter with the name zoom on it from Micro Centre for about $13 USA. When I type lsusb I get the exact same output as you do for yours. The device paired easily enough with my Nokia 5300. I haven't tried to transfer anything as I'm working off of a live cd, installing eeebuntu to an SD card.

Anonymous said...

К стати, лучший способ обезопасить человека от прослушки - приобрести Подавитель связи

Anonymous said...

Great blog as for me. I'd like to read a bit more about this theme. The only thing your blog misses is some photos of any devices.
David Stepman
Phone jammer