Send pictures from Raspberry to smartphone over bluetooth
Hi there!
I wonder if it is possible for a Raspberry Pi to send files to an iPhone or Android Smartphone over Bluetooth. I would like to send pictures I took with the PiCamera to my phone, but am unsure where to start... Will this require interaction from the user, or would it in practice be feasible to create an app that will collect the incoming pictures?
Thanks a lot for the advise!
I wonder if it is possible for a Raspberry Pi to send files to an iPhone or Android Smartphone over Bluetooth. I would like to send pictures I took with the PiCamera to my phone, but am unsure where to start... Will this require interaction from the user, or would it in practice be feasible to create an app that will collect the incoming pictures?
Thanks a lot for the advise!
- DougieLawson
- Posts: 42142
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Send pictures from Raspberry to smartphone over bluetoot
For Android take a look at https://play.google.com/store/apps/deta ... iremotecam
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Send pictures from Raspberry to smartphone over bluetoot
Thanks for the suggestion! Sadly I only have an iPhone... Furthermore, I was looking if there was any information available to create an app that would be able to communicate with a Raspberry Pi module through bluetooth.
I did manage to pair my Raspberry Pi to my iPhone. It was easier than I anticipated
But for now, I'm not doing much with it as I do not have any means to communicate between the two devices...
I did manage to pair my Raspberry Pi to my iPhone. It was easier than I anticipated

- DougieLawson
- Posts: 42142
- Joined: Sun Jun 16, 2013 11:19 pm
- Location: A small cave in deepest darkest Basingstoke, UK
Re: Send pictures from Raspberry to smartphone over bluetoot
If you have the PAN stuff you can do TCP/IP over BlueTooth.
http://www.raspberrypi.org/forums/viewt ... 91&t=36889
https://github.com/Douglas6/pinaple has instructions and code for getting it running with a Nexus.
Can't help with an iPhone.
http://www.raspberrypi.org/forums/viewt ... 91&t=36889
https://github.com/Douglas6/pinaple has instructions and code for getting it running with a Nexus.
Can't help with an iPhone.
Languages using left-hand whitespace for syntax are ridiculous
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
DMs sent on https://twitter.com/DougieLawson or LinkedIn will be answered next month.
Fake doctors - are all on my foes list.
The use of crystal balls and mind reading is prohibited.
Re: Send pictures from Raspberry to smartphone over bluetoot
You probably want to look into OBEX, which should let you push files from the Pi with no intervention on the phone. I've never tried it but it looks easy from a few examples on the web. Google 'raspberry pi obexftp'. The iPhone may be a problem; I too cannot help you there.
Re: Send pictures from Raspberry to smartphone over bluetoot
Ok, I just gave this a go, and it was surprisingly easy. From a clean install of Raspian Wheezy, first install the BlueZ software:
Make sure things went well with which should return with something like Now pair your phone and your Pi. On the Pi, first make the adapter discoverable: then start the pairing agent on the Pi: On your phone, search for Bluetooth devices and start pairing. Follow the prompts on both the phone and the Pi. On the Pi, you should end up with something like exit the agent with Ctrl-C.
Right, we're paired now. Get the Bluetooth address of the phone with:which should produce something like: Now discover what services your phone provides. We're looking for 'OBEX FTP' and/or 'OBEX Object Push'. In my case, only OBEX Object Push is available. Here's the command (use the Bluetooth address that the scan returned): In my case (Nexus 4) the results included You'll need to take note of the channel number. If your phone provides a 'OBEX FTP' service, you can use obexftp, but in my case, I only have 'OBEX Object Push', so I need ussp-push, so let's install that: Now, it's a simple command: substituting your phone's Bluetooth address and channel, and the path to your file to upload, and the name you want it to have on the phone. In my case, it looks like I then received a notification on my phone that a file was being uploaded. I clicked 'accept', and the transfer started, and I got another notification when it was done. The file ended up in a 'bluetooth' directory (next to the Android and Download directories; the full path was something like /storage/emulated/0/bluetooth/)
Hope this helps.
Code: Select all
sudo apt-get install -y --no-install-recommends bluetooth python-gobject
Code: Select all
hciconfig
Code: Select all
hci0: Type: BR/EDR Bus: USB
BD Address: AA:BB:CC:DD:EE:FF ACL MTU: 310:10 SCO MTU: 64:8
UP RUNNING PSCAN
RX bytes:57163 acl:808 sco:0 events:1922 errors:0
TX bytes:679643 acl:3353 sco:0 commands:166 errors:0
Code: Select all
sudo hciconfig 0 piscan
Code: Select all
sudo bluez-simple-agent
Code: Select all
Agent registered
RequestConfirmation (/org/bluez/2683/hci0/dev_11_22_33_44_55_66, 989777)
Confirm passkey (yes/no): yes
Right, we're paired now. Get the Bluetooth address of the phone with:
Code: Select all
hcitool scan
Code: Select all
Scanning ...
11:22:33:44:55:66 Nexus 4
Code: Select all
sdptool browse 11:22:33:44:55:66
Code: Select all
Service Name: OBEX Object Push
Service RecHandle: 0x1000e
Service Class ID List:
"OBEX Object Push" (0x1105)
Protocol Descriptor List:
"L2CAP" (0x0100)
"RFCOMM" (0x0003)
Channel: 12
"OBEX" (0x0008)
Profile Descriptor List:
"OBEX Object Push" (0x1105)
Version: 0x0100
Code: Select all
sudo apt-get install -y ussp-push
Code: Select all
ussp-push <bdaddr>@<channel> </path/name/to/your.jpg> <your.jpg>
Code: Select all
ussp-push 11:22:33:44:55:66@12 /home/pi/my_niece.jpg my_niece.jpg
Hope this helps.
Re: Send pictures from Raspberry to smartphone over bluetoot
thank you, its working perfectly,
how can detect if the image received correctly??(i mean by code??) is there notification or flage??
how can detect if the image received correctly??(i mean by code??) is there notification or flage??
Re: Send pictures from Raspberry to smartphone over bluetoot
Check the return code of the ussp-push command. Google for how to do that in the language of your choice.
Re: Send pictures from Raspberry to smartphone over bluetoot
Hi, is it possible to send a message from the Raspberry PI over Bluetooth to the Smartphone ?
Re: Send pictures from Raspberry to smartphone over bluetoot
"Send a message" is not precise enough. You need to be more clear about what you want to do.vikvik wrote:Hi, is it possible to send a message from the Raspberry PI over Bluetooth to the Smartphone ?
Quis custodiet ipsos custodes?
-
- Posts: 52
- Joined: Mon Dec 14, 2015 1:51 pm
Re: Send pictures from Raspberry to smartphone over bluetoot
However your using Bluetooth dongle for sending images..I need to send images through HC-05 bluetooth module in serial manner..if anyone knows about that please let me know ....
Thanks in advance..
Regards,
Palani K
Thanks in advance..
Regards,
Palani K
Re: Send pictures from Raspberry to smartphone over bluetoot
Just as you would over any other serial device. Read the bytes of the image data, write them to the serial device.
-
- Posts: 52
- Joined: Mon Dec 14, 2015 1:51 pm
Re: Send pictures from Raspberry to smartphone over bluetoot
You are correct ..But in my smartphone i need any specific application to get the images bit by bit and reconstruct it..
Re: Send pictures from Raspberry to smartphone over bluetoot
thank you Douglas6, it worked perfectly. Can we automate this process with a python script?
Re: Send pictures from Raspberry to smartphone over bluetoot
Sure. You can use Python's subprocess library. Something like this (untested) :
Code: Select all
import subprocess
subprocess.call(["ussp-push", "<bdaddr>@<channel>", "</path/name/to/your.jpg>", "<your.jpg>"])
-
- Posts: 10
- Joined: Tue Jun 06, 2017 11:43 am
Re: Send pictures from Raspberry to smartphone over bluetoot
Is it possible to transfer file using ussp-push without mentioning the channel number? Because I found that for each device connected the channel number changes. Is there any way to transfer files only by mentioning the mac-address??
Re: Send pictures from Raspberry to smartphone over bluetoot
Good question. Theoretically, yes. You can determine the channel for example with sdptool or equivalent. I don't know what kind of smarts are built into ussp-push, or if extra coding is required.
Re: Send pictures from Raspberry to smartphone over bluetooth
Hi Douglas and all the others,
thanks for this nice and smooth tutorial.
Everythings is fine except i have a litle question:
Is it possible to send fileS or a Directories with the ussp-push? or at least deasable the "would you like to accept this download" on the phone?
i hope i'm clear enough!
have a nice day
Skaf
thanks for this nice and smooth tutorial.
Everythings is fine except i have a litle question:
Is it possible to send fileS or a Directories with the ussp-push? or at least deasable the "would you like to accept this download" on the phone?
i hope i'm clear enough!
have a nice day
Skaf
Re: Send pictures from Raspberry to smartphone over bluetooth
As I understand it, ussp-push is suitable for sending a single object. You could use it in a program to iterate through a glob and send each file. I don't know how to disable the acceptance on the phone. If you find something, let us know.
Re: Send pictures from Raspberry to smartphone over bluetooth
hi, thanks for your answer.
I finaly just zip the folders i wanted to send and send the .zip file... and it works fine! ( no idea if it's worth or not
)
Didn't find any thing to disable the acceptance on the phone, but i don't need it anymore with the zip file.
Now maybe you will have an idea... when i do your procdure to install ussp-push with my RPi-zero, it works quite well, but when i do the same with my RPi3 i can start the data-transfer but nothing happend...
the both with the "2017-06-21-raspbian-jessie-lite.img"
and in you procedure you said that : "You'll need to take note of the channel number."
but the ussp-push can find the channel automatically if you don't put the channel after the @<>
ussp-push <bdaddr>@<channel> </path/name/to/your.jpg> <your.jpg>
see you!
I finaly just zip the folders i wanted to send and send the .zip file... and it works fine! ( no idea if it's worth or not

Didn't find any thing to disable the acceptance on the phone, but i don't need it anymore with the zip file.
Now maybe you will have an idea... when i do your procdure to install ussp-push with my RPi-zero, it works quite well, but when i do the same with my RPi3 i can start the data-transfer but nothing happend...
the both with the "2017-06-21-raspbian-jessie-lite.img"
and in you procedure you said that : "You'll need to take note of the channel number."
but the ussp-push can find the channel automatically if you don't put the channel after the @<>
ussp-push <bdaddr>@<channel> </path/name/to/your.jpg> <your.jpg>
see you!
Re: Send pictures from Raspberry to smartphone over bluetooth
On the Pi3 you can try the usual troubleshooting steps. Try 'hciconfig -a' to make sure it's finding the adapter. Use 'systemctl status bluetooth' to see if the service is running. In bluetoothctl, try 'info <bdaddr>' to ensure the devices are paired and trusted.
Thanks for the tip on ussp-push. I wasn't sure which version is currently being shipped with Raspbian.
Thanks for the tip on ussp-push. I wasn't sure which version is currently being shipped with Raspbian.
-
- Posts: 51
- Joined: Fri Aug 05, 2016 5:20 am
Re: Send pictures from Raspberry to smartphone over bluetooth
1.How can i check the file transfer from my android mobile to raspberry pi 3?
2. when i pair my mobile to raspberry pi's bluetooth then the pairing is done but when i connect then it was showing mi error that "connection failed: GDBus.Error:org.bluez.Error.Failed:no such file or directory. Try to connect mannually."
3. when i tried to send file from raspberry pi 3 to mobile i get error like "obex-data-server not installed "for that i used command sudo apt-get install obex-data-server but it was showing mi that it is already installed. i used obexpushd -B -n but that also failed.so how can i connect raspberry pi 3 and my mobile via bluetooth?and send file from pi to mobile?
2. when i pair my mobile to raspberry pi's bluetooth then the pairing is done but when i connect then it was showing mi error that "connection failed: GDBus.Error:org.bluez.Error.Failed:no such file or directory. Try to connect mannually."
3. when i tried to send file from raspberry pi 3 to mobile i get error like "obex-data-server not installed "for that i used command sudo apt-get install obex-data-server but it was showing mi that it is already installed. i used obexpushd -B -n but that also failed.so how can i connect raspberry pi 3 and my mobile via bluetooth?and send file from pi to mobile?
-
- Posts: 2
- Joined: Mon Jan 26, 2015 10:47 pm
Re: Send pictures from Raspberry to smartphone over bluetooth
As a ham radio operator. A fellow ham and I were wondering if using SSTV which is sending a picture by sound card to be received over a transceiver. VHF 145.5000 here in North America. We like to run SSTV and use my Iphone (His Android) to send and receive pictures using a sound card to send and receive but use the Bluetooth to see and use the Bluetooth transmit and send over the radio. I hope I'm making sense.
Don va7dgp
Don va7dgp
Re: Send pictures from Raspberry to smartphone over bluetooth
Sure, I can try.