I am trying to connect raspberry pi to my galaxy note to use it for serial communication. I have somewhat succeeded at that.
First I paired it and trusted through
bluetoothctl. Then I run
sudo rfcomm watch hci0 and opened with
cat /dev/rfcomm. I was able to connect to raspberry pi using bluetooth terminal (only this app, every other one failed) and strings sent from galaxy would be shown in the
I have somehow messed up later and now running
sudo rfcomm watch hci0 gives me
Can't bind RFCOMM socket: Address already in use. I can't release it with
sudo rfcomm release hci0 or
sudo rfcomm release 0 as it then gives me
Can't release device: No such device. Likewise
cat /dev/rfcomm0 too now gives me
No such file or directory.
I killed the process listed with
sudo lsof | grep /dev/rfcomm0, this had no effect on my ability to use RFCOMM. Reloading with
systemctl daemon-reload and restarting with
service bluetooth restart too has had no effect.
I can still scan for other bluetooth devices, and I can connect to raspberry pi with bluetooth terminal, but it seems rfcomm is gone. I am aware that rebooting can solve this, though I would like to do that programatically if possible without having to resort to power-cycling.
I have seen similar issue pop up on this stack, but have not found an answer that would solve this issue.
Thanks for your help.