I'm trying to write code involving MQTT messages to operate an ESP8266 relay ( a Sonoff device ), using PubSub
library.
For some, unknown for me, reason - messages larger than 99 chars are not sent. It this a known limitation ? can it be changed ?
void pub_msg(char *inmsg){
char tmpmsg[255];
// sprintf(tmpmsg,"[Cl:oc:k] [%s] %s",deviceTopic, inmsg); ---> wish to add a time stamp
sprintf(tmpmsg,"[][%s] %s",deviceTopic, inmsg); ---> using this line just to find that 99 chars sent OK
Serial.print("published MSG:");
Serial.println(tmpmsg);
Serial.print("Total chars:");
Serial.println(strlen(tmpmsg));
client.publish(msgTopic, tmpmsg);
}