* ping buffer zeroed now
* ping string change * client name changed on init
This commit is contained in:
parent
e77d494e4d
commit
8755bad974
@ -22,10 +22,11 @@ char * buffer;
|
||||
* 40.115.26.19 - ethinnoday-lwm2m-server.westeurope.cloudapp.azure.com
|
||||
* 5.39.83.206 - leshan.eclipse.org
|
||||
*/
|
||||
ArduinoClient wakaamaClient("coap://5.39.83.206:5683");
|
||||
ArduinoClient wakaamaClient("yvan_arduino_client", "coap://5.39.83.206:5683");
|
||||
|
||||
void setup() {
|
||||
buffer = static_cast<char*>(malloc(250));
|
||||
buffer = static_cast<char*>(malloc(5));
|
||||
memset(buffer, 0, 5);
|
||||
DEBUG_STREAM.begin(DEBUG_STREAM_BAUD);
|
||||
while(!DEBUG_STREAM) {
|
||||
;
|
||||
@ -61,7 +62,7 @@ void loop() {
|
||||
}
|
||||
}
|
||||
|
||||
nbIOT.sendSocket(pingSocket, "87.229.111.223", 1111, (uint8_t*)"asdf", 4);
|
||||
nbIOT.sendSocket(pingSocket, "87.229.111.223", 1111, (uint8_t*)"pong", 4);
|
||||
pending = nbIOT.socketBytesPending(pingSocket);
|
||||
if(pending > 0) {
|
||||
nbIOT.socketReceive(pingSocket, buffer, pending);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user