I am trying to connect to an external bluetooth low energy device using an Asus BT500 USB Bluetooth dongle with my Nvidida Jetson Xavier.
When connecting to the external bluetooth device, the connection is established and sometimes seemingly randomly disconnects immediately after the connection is established. At other times the connection is established successful and is stable.
I am on Jetpack 35.1 with kernel 5.10.104-tegra. # R35 (release), REVISION: 1.0, GCID: 31346300, BOARD: t186ref, EABI: aarch64
This is the output of bluetoothctl (left) and btmon(right).
Why are you using a BT dongle when the Xavier NX comes equipped with WIFI/BT?
That was me who was having the issue with the PS4 gamepad connecting/disconnecting when running JP451 on a Nano 4GB. Installing JP46 on the Nano 4GB cured that issue with the PS4 gamepad.
I am presently using a PS5 gamepad with a Xavier NX 8GB running JP451 and found that I had to use the Ubuntu Desktop BT App to pair and connect the PS5 gamepad to the Xavier NX. After doing so I have had no issues with the PS5 gamepad connecting to the Xavier NX when running headless.
Unfortunately, I am working with a carrier board which does not have built-in bluetooth module. My system has no GUI, though it would be interesting to try whether it could work with a GUI.
I am using this workaround for now in my python program (with bluepy):
def connect(self,mac):
isConnected = False
while not isConnected:
self.device = btle.Peripheral(mac, addrType=btle.ADDR_TYPE_RANDOM)
time.sleep(2.0+random.random()) # Disconnecting appears within 2s
try:
isConnected = self.device.getState() == "conn" # Throws error if device disconnected randomly
except btle.BTLEDisconnectError:
pass
I tried to use the following from the CLI over SSH to pair and connect the PS5 gamepad to NX, but could not get it to stay connected (kept getting yes/no for the connection) that is why I used the Ubuntu Desktop BT App.