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 fromOpenOBEX 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.