ArduinoBLE icon indicating copy to clipboard operation
ArduinoBLE copied to clipboard

Data is not shown when received over Notify (+ solution)

Open paulvha opened this issue 4 years ago • 0 comments

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

paulvha avatar Jan 11 '21 14:01 paulvha