I am familiar with this and this.

I am trying to send a message from raspberry pi terminal to an android app. I am on Raspbian Stretch headless (NO gui)

Now, I am doing :

sudo bluetoothctl
power on
agent on
discoverable on
pairable on
scan on

then I do :

pair <android phone mac address>

All is fine.

Now, In the App "Bluetooth Terminal" by "one day of code", i can connect to the pi, and send messages.

On the pi side however:

sudo rfcomm bind 0 < phone mac address>
sudo sdptool add --channel 0 sp

work without error


sudo rfcomm listen 0


sudo rfcomm listen hci0 


sudo rfcomm listen <phone mac address>

fails with

Can't bind RFCOMM socket: Address already in use 

I have both /etc/systemd/system/dbus-org.bluez.service and bluetoooth.target.wants/bluetooth.service edited with the -C flag in the execstart line and execstartpost with /usr/bin/sdptool add sp

What shall i do now?

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.