ArduinoBLE
ArduinoBLE copied to clipboard
Data is not shown when received over Notify (+ solution)
Central: ArduinoBLE
Error description Data is sent by peripheral over notify characteristic (0x0804) and data is received. (seen with HCI trace) by ArduinoBLE. In the sketch RxChar.setEventHandler(BLEUpdated, RxChar_Received); has been set, but NO data is received.
Root cause: In ATT, function void ATTClass::handleNotifyOrInd(), the handle is retrieved as 8 bits uint8_t handle = handleNotifyOrInd->handle;
However, a handle is 16 bits (as defined and used on any other place) and thus this should be: uint16_t handle = handleNotifyOrInd->handle;
After changing it all worked as it should. regards, Paul