I’ve been scouring the internet looking for fixes on this and seem to be coming up short. My goal is to get Serial over Bluetooth working so that I can configure the nano’s WiFi adapter via a phone app connected by bluetooth. I have tried the following:
vi /etc/systemd/system/dbus-org.bluez.service
changed line “ExecStart=/usr/lib/bluetooth/bluetoothd” to “ExecStart=/usr/lib/bluetooth/bluetoothd --compat”
systemctl daemon-reload
systemctl restart bluetooth
sdptool add SP
then when I run my python script it gives me the following output
root@chuck-desktop:/home/chuck/Documents# python3 ./run.py
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/bluetooth/bluez.py", line 273, in advertise_service
protocols)
_bluetooth.error: (2, 'No such file or directory')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./run.py", line 135, in <module>
profiles = [ SERIAL_PORT_PROFILE ])
File "/usr/local/lib/python3.6/dist-packages/bluetooth/bluez.py", line 275, in advertise_service
raise BluetoothError (*e.args)
bluetooth.btcommon.BluetoothError: [Errno 2] No such file or directory
Now, I believe this is because it’s looking for the file /var/run/sdp - and from what I understand that file is created by running the last command - “sdptool add SP”. I could be mistaken, i’m really grasping at straws here. I’m pretty sure whatever sdptool add SP does though, isn’t working. When I run an sdptool get SP - get the following
root@chuck-desktop:/home/chuck/Documents# sdptool get SP
Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory
I have recompiled the kernel and followed all links you suggested.
I am able to pair my android device, and create rfcomm0 and chmod 777 /dev/rfcomm0
After this point, I am unable to establish any connection between the jetson and android.
I have tried minicom on jetson and serialbluetooth terminal on android as well as a python program and BT Terminal on android AND my own App Inventor send a 1 or 0 program on android.
I get Error 507: Unable to connect, is the device turned on? from BT Terminal and my App Inventor program.
From serialbluetooth terminal, I get connection failed, socket might be closed or timeout, read ret =-1.
Jetson desktop shows the phone paired.
I have tried everything I can find online but cannot establish a serial connection.
I did build the kernel with RFCOMM support.
I can pair an android device to the Nano, I can create RFCOMM0, but any attempt to create a server and connect results in Error 507: Unable to connect, is the device turned on?
This error shows when I try to connect using any terminal application on Android.
I’m having the same exact issue as chuckgreve2012, and I was wondering if anyone’s found a solution?
I’ve recompiled the kernel as yxqlamb suggested (followed the tutorial link), and enabled “RFCOMM_TTY support”. That allows me to now bind a connection with “sudo rf comm bind 0 xx:xx:xx:xx:xx:xx”.
I then follow the exact commands as chuckgreve2012 posted in the original message to add the compatibility feature, and I am still receiving the exact error he is, as if the “sdptool add SP” did nothing.
Has someone managed to create a Serial Connection by now?
I am trying everything, but from serialbluetooth terminal, I also get connection failed, socket might be closed or timeout, read ret =-1…