mqtt callback (char * topic, byte * payload, unsigned int length) esp8266

0

I'm using the mqtt communication protocol with esp8266 and there's this callback function it works great, but when I post a message with +120 characters it does not work, I wonder if I can increase the size of values I get send in this function follows the entire function below:

 void callback(char* topic, byte * payload, unsigned int length) {
  Serial.print("Message arrived [");
  Serial.print(topic);
  Serial.println(length);
  Serial.print("] ");
  for (int i = 0; i < length; i++) {
    Serial.print((char)payload[i]);
  }
  Serial.println();
    
asked by anonymous 16.05.2018 / 20:44

0 answers