We are using OBEX protocol for sending files over bluetooth. For sending files we need to install obexftp and obexpushd package. I will explain the procedure for installation first. We can use package manager apt for this.
sudo apt-get install obexftp obexpushd
Steps to send a file from your Ubuntu machine
For sending a file to nearby devices we need to find bluetooth device first. We know each and every bluetooth device(s) have unique hardware address. We need to find the hardware address first. Scan the nearby device(s). Open a terminal and type the command below.
This will show the scan result as below.
This is a bluetooth device nearby. Copy the address in displayed in your terminal window. Select the file you want to send. Type the command below to send the file to your nearby bluetooth device. For instance the file name be “icon.gif” and address be “00:17:00:98:39:F2“. (The device is my mobile phone)
obexftp -b 00:17:00:98:39:F2 -p icon.gif
This will send the file icon.gif to the external bluetooth device. I will explain the process of receiving in my next post. Enjoy reading!!!