Get Informed out of Data

Full width home advertisement

Raspbian

DataScience

Post Page Advertisement [Top]

Raspberry Pi Bluetooth File Transfer - Android and iOS

Raspberry Pi Bluetooth File Transfer - Android and iOS


Raspberry Pi has changed various facets of the computing environment, with multiple protocols under ARM architecture.

Raspberry Pi nearly all round sectors of Desktop and mobile form factors.

Here, we are going to see how to transfer files via Bluetooth from all devices to raspberry pi and vice-versa.

Install the bluez software on iOS/Android

sudo apt-get install -y --no-install-recommends 

Now pair your phone and your Pi. On the Pi, first make the adapter discoverable

sudo hciconfig 0 piscan

then start the pairing agent on the Pi

sudo bluez-simple-agent

On your phone, search for Bluetooth devices and start pairing. Follow the prompts on both the phone and the Pi

exit the agent with Ctrl+C.

Now get the Bluetooth address of the phone with

hcitool scan

Now discover what services your phone provides. We're looking for 'OBEX FTP' and/or 'OBEX Object Push'. (use the Bluetooth address that the scan returned)

If your phone provides a 'OBEX FTP' service, you can use obexftp. If you have 'OBEX Object Push' then use ussp-push

sudo apt-get install -y obexftp 

OR

sudo apt-get install -y ussp-push

ussp-push <YOUR BLUETOOTH ADDRESS> </path/name/to/filename 

OR

obexftp <YOUR BLUETOOTH ADDRESS> </path/name/to/filename

That's it. Now you will get a notification of the file in your phone.

No comments:

Post a Comment

Bottom Ad [Post Page]