How to detect and enable a bluetooth adapter?

Viewed 38

I'm developing an embedded Linux with our EVM board and we want to support a USB bluetooth dongle. After insert the dongle, we can use some command to enable it and it's no problem.

For example, #hciconfig hci0 up #hcitool scan

But for user, we need our Linux can detect and enable the dongle automatically. Can anyone provide some information or example how to do this?

I also tried to use inotify to see if can detect usb BT dongle insert or not under /sys/bus/drivers/btusb, but it seems useless.

Thanks.

1 Answers

Linux kernel would log every devices connected to it during startup and you can find them with below command .

dmesg | grep -i blue
Related