Hi,
When using a Uno Wifi developer board and the Ciao library to publishing a Topic using MQTT
, everything works fine as long as the payload has less than 20 characters inside.(=19 or less)
As of 20 characters or more inside the payload, nothing is sent at all.
I have seen This behaviour :
=> in my MQTT-client : Empty payload received
=> Arduino Debug Log window, payload has 20 characters or more :
MQTT: MQTTCMD_PUBLISH topic=....... data_len=0
=> Arduino Debug Log window, payload has 19 characters or more :
MQTT: MQTTCMD_PUBLISH topic=....... data_len=19
The boards' firmware = 0.0.3 and so is the UnoWiFiDevEd library & the code is pretty simple, made it to illustrate the bug.
Don't know how arduino-supports these kinds of issues, can someone patch the library or... what's the solution here?
Needless to say, 19 characters is not enough
The Code :
#include <Wire.h>
#include <UnoWiFiDevEd.h>
#define CONNECTOR "mqtt"
#define TOPIC "iot/...."
void setup() {
Ciao.begin();
}
void loop(){
Ciao.write(CONNECTOR, TOPIC, "0123456789012345678" ); //OK:19 characters maximum... see debug log : data_len=19
Ciao.write(CONNECTOR, TOPIC, "01234567890123456789" ); //NOK:20 characters maximum... see debug log : data_len=0
delay(5000);
}