Bluetooth device (randomly) disconnects quickly after connection is established

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).

The problem does not occur on another computer.

It could be similar to what is mentioned in this post, PS4 gamepad will connect then disconnect consistently when running JP 4.5.1 on a Nano 4GB, but I am already on the latest Jetpack version.

@max.polzin,

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.

Regards,
TCIII

Thx for your quick answer.

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

@max.polzin,

Bummer.

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.

sudo bluetoothctl

agent on

default-agent

scan on

Turn on PS4 pairing

PS5 MAC_ADDRESS will appear

[NEW] Device XX:XX:XX:XX:XX:XX Wireless Controller

connect PS5_MAC_ADDRESS

Attempting to connect to 00:01:6C:B4:06:7E
[CHG] Device 00:01:6C:B4:06:7E Connected: yes
[CHG] Device 00:01:6C:B4:06:7E UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device 00:01:6C:B4:06:7E UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device 00:01:6C:B4:06:7E ServicesResolved: yes
[CHG] Device 00:01:6C:B4:06:7E Paired: yes
Connection successful

trust PS5_MAC_ADDRESS

TCIII

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.