1

I tried to read battery service (0x180F) using pydbus and also via term but unable to find, setNotify or read the value.

I tried to register-service under Menu GATT in Terminal running Bluetoothctl but i kind of stuck on the next move.

How to read this service (including through pydbus).I have successfully read other services (Automation IO) but this seems a but different? Correct me if im wrong.

Thank you

*BlueZ-5.50 *Raspbian Stretch

12
  • Isn't this the same as raspberrypi.stackexchange.com/questions/114150/… ? The only difference is the UUID of the characteristic? Can you show a minimal example of the code you are trying and I'll see if I can spot the issue. – ukBaz Sep 15 '20 at 8:17
  • Hi uKBaz.Once again thanks for the help. For the sake of clarification i used ESP32 ` #define BatteryService BLEUUID((uint16_t)0x180F) BLECharacteristic BatteryLevelCharacteristic(BLEUUID((uint16_t)0x2A19), BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY); ' BLEDescriptor BatteryLevelDescriptor(BLEUUID((uint16_t)0x2901)); ` – R.M.S.Sundram Sep 15 '20 at 16:06
  • Have you tried reading the Battery Service from the ESP32 with nRF Connect (nordicsemi.com/Software-and-tools/Development-Tools/…)? You need to prove the ESP32 server is working first before you start writing the RPi end. Put the code snippets in your question using the edit button. The formatting doesn't work in the comments. – ukBaz Sep 15 '20 at 16:16
  • Yes i have triend with the nRF Connect. And the answer was it is working – R.M.S.Sundram Sep 15 '20 at 18:36
  • Excellent! So what does your pydbus code look like? And what error messages are you getting? – ukBaz Sep 15 '20 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.