Question

I have been using pyudev to look for bluetooth devices and then used the "features" attribute to determine if the device has LE support. However, just recently in the latest version of Ubuntu, udev no longer reports anything for "features".

Here's what details I do get:

$ udevadm info --attribute-walk /sys/class/bluetooth/hci0

  looking at device '/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.4/1-1.4:1.0/bluetooth/hci0':
    KERNEL=="hci0"
    SUBSYSTEM=="bluetooth"
    DRIVER==""
    ATTR{name}=="ubuntu-0"
    ATTR{type}=="BR/EDR"
    ATTR{address}=="08:3e:8e:xx:xx:xx"

And then on another device that is continuing to work as I expected I get:

$ udevadm info --attribute-walk /sys/class/bluetooth/hci0

  looking at device '/devices/platform/sw-ohci.1/usb3/3-1/3-1:1.0/bluetooth/hci0':
    KERNEL=="hci0"
    SUBSYSTEM=="bluetooth"
    DRIVER==""
    ATTR{bus}=="USB"
    ATTR{sniff_min_interval}=="80"
    ATTR{name}=="linaro-nano-0"
    ATTR{type}=="BR/EDR"
    ATTR{hci_version}=="6"
    ATTR{class}=="0x000000"
    ATTR{idle_timeout}=="0"
    ATTR{address}=="00:02:72:xx:xx:xx"
    ATTR{features}=="0xbffecffedbff7b87"
    ATTR{sniff_max_interval}=="800"
    ATTR{manufacturer}=="15"
    ATTR{hci_revision}=="4096"

Is there some sort of configuration change somewhere that causes the difference in responses?

EDIT I've found that most of those missing values are now in /sys/kernel/debug/bluetooth/hci0/ but I have no idea why that's so. However the format of the features file is different. Is this controlled by a configuration file, compiler options, or something else?

Was it helpful?

Solution

I think changes have been made in the kernel code to use debugfs instead of sysfs for several bits of information. So, I'll just have to rethink how I get that information now.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top