Setting manufacturer data returns BLE_HS_EMSGSIZE error #462
Unanswered
IanMcCarthy
asked this question in
Q&A
Replies: 1 comment
-
Should anyone come across this later... I needed to specifically call: NimBLEDevice::getAdvertising()->setName(""); Other 2 bytes are reserved for the name block, even if I didn't set one. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I'm implementing a simple server with a simple advertising packet.
Assuming advertising packet size is 31 bytes and my packed struct (advData) is 26 bytes in size (which it is), I should be able to send:
0x02, 0x01, 0x06 (set by nimble)
0x1B, 0xFF, 0x00, (24 more bytes), 0x00 (set by me)
Using: pAdvertising->setManufacturerData(std::string((char *)&advData, sizeof(advData)));
I get an BLE_HS_EMSGSIZE error and no advertising.
If I use: pAdvertising->setManufacturerData(std::string((char *)&advData, sizeof(advData) - 2));
It works and starts advertising.
Can anyone shed some light on what I'm doing wrong, please?
Beta Was this translation helpful? Give feedback.
All reactions