Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification 8 byte data size #653

Open
harunsengul opened this issue Mar 25, 2024 · 0 comments
Open

Notification 8 byte data size #653

harunsengul opened this issue Mar 25, 2024 · 0 comments

Comments

@harunsengul
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant