Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4829

Beginners • Re: Please help me connect phone to Pi 5 via Bluetooth.

$
0
0
To send files the other way from a Pi to a phone, the Pi needs to be an OBEX client. The program btferret.c is set up to do file transfers this way (and it will also run as an OBEX server like obex_server.c.)

https://github.com/petzval/btferret

Code:

Download  btferret.c  btlib.c  btlib.h  devices.txt  Compile  gcc btferret.c btlib.c -o btferret  Run  sudo ./btferretEnable Bluetooth on the phone and make sure it is discoverableFrom btferret command line:  a - Run a classic scan to find the phone  c - Connect to phone - select "Read services to choose channel"       A list of phone services will be displayed       Enter channel number of OBEX service  f - Send file - choose "Send file to OBEX" option       Enter node of phone (probably 1000)       Enter file name       Phone will probably prompt for permission to accept file               To run an OBEX server from btferret  s - Become a server - choose OBEX server option     Input node of client = 0 for Any device     Set client's security = 3  key on, passkey off  -  which is the option that obex_server.c uses       It may be necessary to experiment with this security setting, depending of whether the phone requires a passkey

Statistics: Posted by petzval — Tue Jul 30, 2024 3:03 pm



Viewing all articles
Browse latest Browse all 4829

Trending Articles