NimBLE-Arduino
NimBLE-Arduino copied to clipboard
Notification 8 byte data size
Hi,
void notifyCB(NimBLERemoteCharacteristic* pRemoteCharacteristic, uint8_t* pData, size_t length, bool isNotify) { std::string str = (isNotify == true) ? "" : ""; //str += " from "; ///** NimBLEAddress and NimBLEUUID have std::string operators */ //str += std::string(pRemoteCharacteristic->getRemoteService()->getClient()->getPeerAddress()); //str += ": Service = " + std::string(pRemoteCharacteristic->getRemoteService()->getUUID()); //str += ", Characteristic = " + std::string(pRemoteCharacteristic->getUUID()); str += std::string((char*)pData, length); Serial.print(str.c_str()); }
This code only returns 8 bytes of the data package but my data package is lenght is 25 bytes.
So how can I read all data package instead of 8 bytes. Could you please help me?
I've used nrfConnect to see notification data and it showed me whole data package.