It took some looking, but as it turns out, the issue that broke gnome-obex-send ability to send files to a mobile Bluetooth phone (such as my Cingular 8125) has a very simple fix. So, for those of you on Edgy looking to send files back and forth between your phone and PC, let’s get started.

First, we need to make sure Edgy is ready for some Bluetooth action. You will need to install the tools needed to make your Bluetooth dreams come true . Rather than take the “I want to learn command line” approach offered on the Ubuntu wiki page, we will act like modern PC users and utilize a GUI application instead: Goto System, Administration, then Synaptic. Search for Bluetooth. While ignoring all other Bluetooth options listed, choose “Bluetooth” and then mark it for installation. Now hit “Apply” at the top of Synaptic. Then when the box pops up, hit apply once more. Now it is at this point that I plug in my adapter (pick one up here) and note the info bubble popping up to tell me my device is in “discovery mode.” Cool, now we are ready to go!

Before I get too far ahead of myself, there is a bug in GNOME in Edgy that makes it so that gnome-obex-send does not see my phone which I have set to discoverable. After some research, it looks like a fix has been discovered. Goto Applications, Accessories and then select Terminal. Cut and paste the following into it; realizing that you will need to right click to paste as Ctrl-V will not work in the terminal.

sudo hciconfig hci0 inqmode 0

Enter your password and you are done. Yes, you just fixed a bug, now you are a Linux elite hacker! Okay, that was lame. But I thought it was funny… moving on.

Now at this point, we are going to borrow some tips from a well done tute over at the Ubuntu forums. Basically, follow this to the letter:

  • You’ll need to create a desktop shortcut for this to work:
  • right-click on the desktop and click Create Launcher
  • in the Name field, type something like “Send file via Bluetooth.”
  • in the command field, type gnome-obex-send
  • give it a cool icon if you wish (I like the road icon near the top of the list)
  • Click OK to create the shortcut.

Because I am such a GUI fan, I even went so far as to give my icon a cool Bluetooth icon, provided by the GNOME desktop. Just right click on the icon, goto properties, then click on missing icon – icon. Great, now let’s get ready to pair our Bluetooth devices, shall we?

All righty, as you might remember, your Bluetooth adapter should have made it pretty clear that it was already in “discoverable mode.” So now you need to do the same with your phone.

With my 8125, all I needed to do was set the phone to discoverable mode under Bluetooth settings, then click over to “devices” and choose “new partnership.” After about a minute of the phone searching, it found my notebook as the given “computer name” that I assigned to it a long time ago. Basically, notebook-0. Cool, now I just click on it in the phone and hit next. At this point, it wants my passkey. Unless you have some sort of strange device, chances are good your passkey is 0000 (zeros), hit next. Now you should see an Ubuntu bubble pop-up. Click on the bubble, enter the same passkey again. Now the bubble alert ought to be telling you that it is pairing or something to that effect (isn’t this fun?).

Great, you just paired your devices. Now for goodness sakes, take your phone out of discoverable mode! Also, unless you feel like toggling on and off your discoverable settings from a conf file, unplug your Bluetooth adapter when it’s not being used on your computer. The alert bubble(s) will alert you when you unplug and plug the devices in.

Okay, let’s transfer some files, shall we?

Before we begin, be sure to right-click on the newly created Bluetooth launcher icon you made, choose the permissions tab and then click the toggle named “allow executing of program” (or something like that).

Great, at this point locate a file on your desktop that you want to send to your phone. Drag it over to the new icon and release it. Are you receiving an error? No worries, just go back to Synaptic and install gnome-Bluetooth. I think it should be installed by default, but it may not be and this would cause an error. Now, try the drag and release over the Bluetooth icon once again – success! Choose the name of your phone (generally something like your name or something else like that) and hit OK.

On my phone, it asks me if I would like to hide or cancel an alert that pops up. I choose hide then it asks me to confirm the transfer to my phone. I choose yes. Depending on the size of the file, it should transfer pretty quickly. For my Pocket PC, I discovered the file that was transfer in the My Documents folder. Good deal, now let’s send a separate file from the phone to the PC.

For this attempt, I selected an entry from my address book. Make sure that you have Bluetooth File Sharing running from Applications, Accessories.

Now, I then opened it up my address book on my phone, then clicked on and held down my stylus until the option to “beam” came up. Now you will see the Pocket PC go into searching mode. It will cruise through infrared, then onto unknown which soon changes to the name of my computer – now you are ready to hit “tap to send” on the phone. After a little bit of watching the phone display “pending,” you ought to see a pop-up on your PC giving you the option to open or close a received file. Where is the file being saved to on your PC, most likely either that user’s desktop or in the Home folder.

On to troubleshooting:

Problem: You drag a file onto the Bluetooth icon and it gives an error.

Solution(s): Check the launcher’s permissions; make sure that it is set to allow program execution. Another thing to try is the following:

sudo /etc/init.d/bluez-utils restart

(On some machines it may be sudo /etc/init.d/Bluetooth restart)

If you find that it still will not work, make sure the adapter is plugged in. Goodness knows I have done this often enough myself. And finally, should you still not find that you are having luck, try bouncing over here for some troubleshooting tips. Chances are your device is not being detected, although I have never had this issue with any common brand Bluetooth adapter myself.

[tags]Bluetooth,adapter,wireless,ubuntu,linux[/tags]