h2zero / esp-nimble-cpp

C++ library for the esp32 NimBLE stack based on and mostly compatible with @nkolban cpp_utils BLE library.
https://h2zero.github.io/esp-nimble-cpp/
Apache License 2.0
181 stars 62 forks source link

Fix NimBLEUtils::dataToHexString returned string, must resize str. #225

Closed thekurtovic closed 1 week ago

thekurtovic commented 1 week ago

Commit 84f4d4f897963559dbb92ca73d1b68402b914c94 has broken NimBLEUtils::dataToHexString(). Manufacturing data is no longer visible when printing NimBLEAdvertisedDevice::toString(). Before I [ 7210][main.cpp:198] BLE adv (-81 db, phy 1 0) Name: SHIELD, Address: 53:6f:93:26:6e:e7, manufacturer data: , serviceUUID: 0x3456, txPower: -15

After I [ 7238][main.cpp:198] BLE adv (-81 db, phy 1 0) Name: SHIELD, Address: 53:6f:93:26:6e:e7, manufacturer data: ffff65636635323533326465643734323730, serviceUUID: 0x3456, txPower: -15

h2zero commented 1 week ago

Thanks! Weird that it works in local testing but not on esp32.