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.
hcitool scan
This will show the scan result as below.
Inquiring ...
00:17:00:98:39:E2 clock offset: 0x75a5 class: 0x522204
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!!!
Hi!,
even though i tried this
hcitool scan command gives a message called
hogsmate@hogsmate-laptop ~ $ hcitool scan
Device is not available: No such device
wat can i do?