System Deleting hci0 bluetooth directory

I am currently working on a system that requires a bluetooth connection, we are using a BLE connection, between the Jetson Xavier NX as a peripheral device and a mobile phone. The mobile phone issues commands to the jetson over the established bluetooth connection. The program on the Jetson is built using React inside Electron and the mobile application is built using React Native. In the application on the Jetson, we are using a package called bleno (GitHub - noble/bleno: A Node.js module for implementing BLE (Bluetooth Low Energy) peripherals), which requires the system bluetooth to be stopped and disabled. Bleno uses hci0 as it’s adapter. After a seemingly random amount of time the bluetooth connection will be dropped.

Prior to the connection being dropped rfkill command returns with ID: 0, TYPE: bluetooth, and DEVICE: hci0. After the bluetooth drops this is missing from the network devices. Also prior to the bluetooth drops ls /sys/class/bluetooth/ returns with hci0, after the bluetooth drops ls /sys/class/bluetooth/ returns with an empty directory. After powercycling the Jetson hci0 is returned to the rfkill list and to /sys/class/bluetooth.

Why is the hci0 directory being removed and how can I stop it from being removed?

Using Jetpack 4.6.3

We don’t have much experiences on bluetooth applications, hope someone can help to provide suggestions.

Hi kayccc,

I appreciate you reaching out. The problem isn’t with the bluetooth necessarily, but an underlying system process that is removing the subdirectories of the bluetooth directory unexpectedly. We have had the system running without user interaction and at some point, the /sys/class/bluetooth/ directory is cleared of its sub-directories. Is there a reason why this would happen and a way to stop it?

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