You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pull request #4999 added setMTU function to BLEClient.cpp/.h, this line provides implementation of this added functionality to the BLE client example to resolve cases in which data from notifyCallback exceeds 20 characters (3 bytes for command type and attribute ID, 20 bytes for attribute data (char*)pData).
Copy file name to clipboardExpand all lines: libraries/BLE/examples/BLE_client/BLE_client.ino
+2-1
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,8 @@ bool connectToServer() {
54
54
// Connect to the remove BLE Server.
55
55
pClient->connect(myDevice); // if you pass BLEAdvertisedDevice instead of address, it will be recognized type of peer device address (public or private)
56
56
Serial.println(" - Connected to server");
57
-
57
+
pClient->setMTU(517); //set client to request maximum MTU from server (default is 23 otherwise)
58
+
58
59
// Obtain a reference to the service we are after in the remote BLE server.
0 commit comments