-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Closed
Labels
Status: SolvedThe issue has been resolved and requires no further action.The issue has been resolved and requires no further action.Type: QuestionOnly questionOnly question
Description
Board
ESP32
Device Description
WROOM32
Hardware Configuration
Nothing else.
Version
latest master (checkout manually)
IDE Name
PlatformIO on VSCode
Operating System
Windows 10
Flash frequency
40Mhz
PSRAM enabled
yes
Upload speed
115200
Description
| void BLEAdvertisementData::setServiceData(BLEUUID uuid, String data) { |
My payload is truncated when it contains 0x0 because expected type of string is a null character terminated type.
Sketch
char buf[3];
buf[0] = 1;
buf[1] = 0;
buf[2] = 1;
pAdvertistmentDataa->setServiceData(BLEUUID(0x181D), buf);
// only 1 character set as payload instead of 3 because buf[1] is nullDebug Message
N/A
Other Steps to Reproduce
Can we please add a length parameter?
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.
Metadata
Metadata
Assignees
Labels
Status: SolvedThe issue has been resolved and requires no further action.The issue has been resolved and requires no further action.Type: QuestionOnly questionOnly question