h2zero / NimBLE-Arduino

A fork of the NimBLE library structured for compilation with Arduino, for use with ESP32, nRF5x.
https://h2zero.github.io/NimBLE-Arduino/
Apache License 2.0
667 stars 138 forks source link

notify not updating values in nRF Connect #658

Closed Gibbz closed 3 weeks ago

Gibbz commented 2 months ago

I'm trying to get my ble notifications to auto update on nRF Connect android app. Ive selected the button to subscribe to notifications in the app.

I'm unsure if this is a bug with the app, my code, or the library. Basically I have the following snips of code. I assume this is all I need to do to get it to work?

Set characteristic

  trip_duration_characteristic = user_data_service->createCharacteristic(
                                         (uint16_t) 0x2BF2,
                                         NIMBLE_PROPERTY::READ |
                                         NIMBLE_PROPERTY::NOTIFY);

Apply a value, and notify

    trip_duration_characteristic->setValue(value);
    trip_duration_characteristic->notify();
h2zero commented 2 months ago

Your code looks fine, could you set the log level to debug and share logs of the notification being sent?

h2zero commented 3 weeks ago

Closing this as there has been no response, please reopen if still an issue.