Posts: 1
Joined: Wed Apr 17, 2019 2:18 pm

Try to send file from Raspberry Pi Zero W to Android

Wed Apr 17, 2019 2:39 pm

Hello everyone!

In my project i must to sent a txt with some text from Raspberry Pi Zero W to my mobile (Android). I already made it, but only with Blueman GUI (Bluetooth Maneger), with the option "Send a file". And I also received in Raspbreey from the mobile, so I suppose they are connected right (at some point).

But now I need made the same with code, python or cmd. I try it with bluetoothctl and hctool and it work with discover, pair and trust the device. For connected I use:

Code: Select all

sudo rfcomm connect hci0 [MAC Address] [Port]
But it don't allow me to put more code, only if I hangup (Ctrl+C). Before hangup it, I check if the device it's already connected and it is.

Also, I tried to send a file with the code:

Code: Select all

ussp-ush [MAC Address]@[OBEX Port] /home/pi/file.txt file.txt
But it also waits forever and in the mobile doesn't show me anything.

If anyone can help me, I'll be very grateful!

Thank you!

Return to “Android”