Search found 2 matches

by sahbin
Fri Mar 01, 2019 8:17 pm
Forum: ESP32 Arduino
Topic: Payload issue
Replies: 3
Views: 7405

Re: Payload issue

Thank you very much

this piece of code worked
char new_payload[len+1];
new_payload[len] = '\0';
strncpy(new_payload, payload, len);
by sahbin
Fri Mar 01, 2019 2:40 pm
Forum: ESP32 Arduino
Topic: Payload issue
Replies: 3
Views: 7405

Payload issue

Hello everyone, I am using the async-mqtt-client library but I keep getting different payloads each time I test the mqtt. Instead of getting the ON payload, the message is followed by characters and so the esp32 does not recognise the payload. How can I fix this issue? Thanks for helping ** Message ...