SimpleBLE icon indicating copy to clipboard operation
SimpleBLE copied to clipboard

Linux: SimpleBLE fails to find services for some peripherals

Open JoeHowse opened this issue 1 year ago • 6 comments

On Linux, SimpleBLE cannot find or use the services of peripherals which are based on the Feasycom FSC-BT986 Bluetooth module (https://www.feasycom.com/fsc-bt986). Peripheral.services() returns an empty list and Peripheral.notify(...) (with known-correct UUIDs) throws RuntimeError: Service with UUID ... not found.

UUIDs for Feasycom modules:

  • Service UUID: 0000fff0-0000-1000-8000-00805f9b34fb
  • Notify UUID: 0000fff1-0000-1000-8000-00805f9b34fb
  • Write or Write without Response UUID: 0000fff2-0000-1000-8000-00805f9b34fb

This is apparently a SimpleBLE issue because both bluetoothctl and Bleak can find and use the services of these peripherals.

Currently, I am unsure of the cause or extent of the issue. SimpleBLE does work on Linux for at least some peripherals based on other hardware.

System specs:

  • SimpleBLE version: Tested with 0.7.3
  • OS: Tested on Debian Bookworm, Debian Trixie, and Manjaro
  • Bluetooth adapter: Tested with several. The issue is present with most adapter chipsets, including Intel AX200, Intel AX201, and Realtek RTL8761BUV. Interestingly, the issue is not present with Broadcom BCM43456, which is used in some ARM systems such as Raspberry Pi 400 and PineBook Pro.

[Edit: Updated bullet point on Bluetooth adapters tested] [Edit: Added UUIDs]

JoeHowse avatar Apr 07 '24 17:04 JoeHowse

Hey @JoeHowse, I think this issue is now solved after landing the following fix https://github.com/OpenBluetoothToolbox/SimpleBLE/pull/321

Feel free to reopen if it's still failing.

kdewald avatar Aug 19 '24 00:08 kdewald

I have re-tested and found that this issue is still present in release 0.8.1. I do not have privileges to re-open the issue but can file a new issue referencing this one if you wish.

JoeHowse avatar Dec 13 '24 16:12 JoeHowse

@JoeHowse thanks for the review. I do have better ways to check this now, so hopefully once I find some time I can take a deeper look.

I have one request that would help:

Using dfeet, could you share a screenshot of the entire DBus tree for that connected device? I have a suspicion that Bluez is rolling this characteristic as a different DBus interface object (similar to what happens with the battery data).

kdewald avatar Dec 28 '24 06:12 kdewald

@kdewald Thanks, here is the screenshot of the tree for one of the Feasycom devices.

d-feet_Feasycom

JoeHowse avatar Jan 02 '25 21:01 JoeHowse

For the DD_0D device, can you show the interfaces for that object? They should look like org.bluez.Device1 or org.bluez.Battery1

kdewald avatar Jan 02 '25 22:01 kdewald

Sure, please find below a series of screenshots showing the interfaces and their methods.

d-feet_Feasycom_Interfaces_01 d-feet_Feasycom_Interfaces_02 d-feet_Feasycom_Interfaces_03 d-feet_Feasycom_Interfaces_04 d-feet_Feasycom_Interfaces_05

JoeHowse avatar Jan 03 '25 15:01 JoeHowse