ubports / ubuntu-touch

Ubuntu Touch's issue inbox is now migrated to GitLab.
https://gitlab.com/ubports/ubuntu-touch
1.28k stars 110 forks source link

BLE attributes are not available #2040

Open jihosan opened 2 years ago

jihosan commented 2 years ago

Steps to reproduce

When trying to fetch the battery charging state of the Pinetime in my app, it get an incredibly long number instead of the percent of the remaining battery life. Upon investigating the issue, I noticed that the battery service/attribute is not available and currently the app will use the last selected attribute to read the value (which is causing the long number).

How to reproduce:

  1. Connect to the Pinetime (Infinitime) via system settings
  2. Open a terminal session
  3. Start "bluetoothctl"
  4. Change to the GATT commands by entering "menu gatt"
  5. Execute "list-attributes"

The battery service/attribute is missing for both the Nexus 5 and the Vollaphone.

To rule out errors with the Pinetime, I did the same on my Ubuntu Desktop setup. Ubuntu is able to fetch all available attributes.

Expected behavior

bluetoothctl should be able to fetch all the available services and attributes.

Actual behavior

bluetoothctl is only able to fetch a fraction of the available and advertised services and attributes.

In this case, particularly these two UUIDs are missing: Battery Service: 0000180f-0000-1000-8000-00805f9b34fb Battery Level: 00002a19-0000-1000-8000-00805f9b34fb

Logfiles and additional information

I currently don't know where to look for bluez logs.