Howto Send and Recieve files over Bluetooth with Ubuntu Linux

With advancement of wireless technology, bluetooth has become a de facto standard for transferring files (and synchronizing data) between mobile devices (PDA, smartphone) and personal computer.

In this post I’m going to show you how to send and receive files over bluetooth using obexftp and obexpushd package from OpenOBEX project.

Send files to mobile device
First install obexftp and obexpushd

sudo apt-get install obexftp obexpushd

Insert a bluetooth dongle and activate bluetooth on your mobile phone. Do a scan of nearby bluetooth device (your mobile phone) by executing :

obexftp -b

obexftp then will display the scan result on your screen, like this :

Scanning ...
Using  00:15:A0:53:6F:85   Nokia 6680
Browsing 00:15:A0:53:6F:85 ...
Channel: 10

Pick a file, and try sending it over bluetooth by executing :

obexftp -b 00:15:A0:53:6F:85 -p example.txt

obexftp will then send the file to your bluetooth device (address : 00:15:A0:53:6F:85 – taken from previous command). Make sure that you set the mobile device to accept the file.

How to receive files over bluetooth
Insert bluetooth dongle and turn it into discoverable mode

hciconfig hci0 piscan

Run obexpushd tool and listen to the incoming bluetooth connection

obexpushd -B

You should be able to receive file sent from your mobile device to your Ubuntu pc now. The files will be stored in your /home directory.

Alternatively, you can install gnome-bluetooth to receive files over bluetooth right on your Gnome Desktop.

[tags]obex,bluetooth,mobile,pda,mobile phones, gutsy,ubuntu, feisty fawn, gutsy gibbon, linux,howto,opensource[/tags]

11 Replies to “Howto Send and Recieve files over Bluetooth with Ubuntu Linux”

  1. obexftp -b returned an error message. “Nothing to do. Use –help for help.” When looking at the help, I found that -b is for using or searching a bluetooth device. Not searching FOR, just searching.

  2. Nice one, I’ve been having to reboot in Windows every time I want to transfer a photo from my phone.

    Thanks!

Comments are closed.