Open alexz006 opened 1 year ago
+1
Same problem here :)
adding m_batteryLevelCharacteristic->notify();
to the setBatteryLevel function of NimBLE-Arduino worked for me:
(in file NimBLEHIDDevice.cpp)
void NimBLEHIDDevice::setBatteryLevel(uint8_t level) {
m_batteryLevelCharacteristic->setValue(&level, 1);
m_batteryLevelCharacteristic->notify(); // new
}
hope this helps
@jojo-06
Thanks a lot, that was useful and helped me with indication
If you set the battery level to setBatteryLevel() after bigin(), and if NIMBLE is not used, then everything works as it should and the battery level is updated in Windows 11.
If you use NIMBLE, the charge level is not updated in Windows 11.