Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 03e9e07

Browse filesBrowse files
authored
Fixes BLE data printing (espressif#7699)
* Fixes BLE data printing BLE data has no '\0' terminator, therefore it can't be printed as a regular C string. This fix just prints the BLE data based on its length. * Simplify printing to a single call
1 parent ff4bbc2 commit 03e9e07
Copy full SHA for 03e9e07

File tree

1 file changed

+2
-1
lines changed
Filter options

1 file changed

+2
-1
lines changed

‎libraries/BLE/examples/BLE_client/BLE_client.ino

Copy file name to clipboardExpand all lines: libraries/BLE/examples/BLE_client/BLE_client.ino
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ static void notifyCallback(
2929
Serial.print(" of data length ");
3030
Serial.println(length);
3131
Serial.print("data: ");
32-
Serial.println((char*)pData);
32+
Serial.write(pData, length);
33+
Serial.println();
3334
}
3435

3536
class MyClientCallback : public BLEClientCallbacks {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.