BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

Packet Too Big Error

#1

I am using an ARDUINO UNO WiFi REV2 and have the sketch below running perfectly except I randomly get “Packet Too Big” error. Once that error gets thrown it won’t reconnect to the blynk server without restarting the Arduino. I have tried to research this error and have tried increasing READBYTES which didn’t work. I have also tried changing the CheckConnect from 11 seconds to 60 seconds which did seem to help but the error will still appear over time.

Error:

20:54:12.527 -> [759] WiFi firmware: 1.0.0
20:54:12.561 -> [760] Connecting to Riddle
20:54:16.582 -> [4828] IP: 192.168.1.83
20:54:16.616 -> [4829] 
20:54:16.616 ->     ___  __          __
20:54:16.650 ->    / _ )/ /_ _____  / /__
20:54:16.650 ->   / _  / / // / _ \/  '_/
20:54:16.683 ->  /____/_/\_, /_//_/_/\_\
20:54:16.717 ->         /___/ v0.6.1 on Arduino UNO WiFi Rev2
20:54:16.751 -> 
20:54:16.785 -> [4956] Connecting to blynk-cloud.com:80
20:54:16.886 -> [5127] <[1D|00|01|00]  ***
20:54:16.954 -> [5194] >[00|00|01|00|C8]
20:54:16.954 -> [5194] Ready (ping: 11ms).
20:54:16.988 -> [5195] Free RAM: 5234
20:54:17.021 -> [5250] >[14|00|01|00|0E]
20:54:17.055 -> [5286] >pm[00]3[00]out[00]6[00]out
20:54:17.089 -> [5338] <[11|00|02|00]cver[00]0.6.1[00]h-beat[00]10[00]buff-in[00]1024[00]dev[00]Arduino UNO WiFi Rev2[00]con[00]WiFiNINA[00]build[00]Jul  1 2019 20:53:54[00]
20:54:17.498 -> [5752] >[00|00|02|00|C8]
20:54:22.703 -> Connected to server
20:54:27.195 -> [15509] <[06|00|03|00|00]
20:54:27.229 -> [15572] >[00|00|03|00|C8]
20:54:33.623 -> Connected to server
20:54:37.127 -> [25539] <[06|00|04|00|00]
20:54:37.195 -> [25594] >[00|00|04|00|C8]
20:54:37.434 -> [25854] >[14|00|07|00|06]
20:54:37.468 -> [25856] >vw[00]6[00]0
20:54:37.502 -> Relay enabled
20:54:37.502 -> [25920] >[14|00|08|00|06]
20:54:37.537 -> [25921] >vw[00]6[00]1
20:54:37.571 -> Relay enabled
20:54:44.539 -> Connected to server
20:54:47.091 -> [35569] <[06|00|05|00|00]
20:54:47.125 -> [35628] >[00|00|05|00|C8]
20:54:50.387 -> [38893] <[14|00|06|00|06]vw[00]6[00]1
20:54:50.421 -> Relay disabled
20:54:50.488 -> [39000] <[14|00|07|00|06]vw[00]6[00]1
20:54:50.522 -> Relay disabled
20:54:55.462 -> Connected to server
20:54:57.052 -> [45631] <[06|00|08|00|00]
20:54:57.119 -> [45691] >[00|00|08|00|C8]
20:55:06.349 -> Connected to server
20:55:07.029 -> [55661] <[06|00|09|00|00]
20:55:07.063 -> [55719] >[00|00|09|00|C8]
20:55:16.984 -> [65689] <[06|00|0A|00|00]
20:55:17.017 -> [65752] >[00|00|0A|00|C8]
20:55:17.292 -> Connected to server
20:55:26.922 -> [75717] <[06|00|0B|00|00]
20:55:26.989 -> [75784] >[00|00|0B|00|C8]
20:55:28.182 -> Connected to server
20:55:36.854 -> [85749] <[06|00|0C|00|00]
20:55:36.922 -> [85812] >[00|00|0C|00|C8]
20:55:39.107 -> Connected to server
20:55:46.805 -> [95779] <[06|00|0D|00|00]
20:55:46.874 -> [95849] >[00|00|0D|00|C8]
20:55:50.003 -> Connected to server
20:55:56.774 -> [105809] <[06|00|0E|00|00]
20:55:56.808 -> [105868] >[00|00|0E|00|C8]
20:56:00.926 -> Connected to server
20:56:06.711 -> [115841] <[06|00|0F|00|00]
20:56:06.778 -> [115899] >[00|00|0F|00|C8]
20:56:11.848 -> Connected to server
20:56:16.653 -> [125869] <[06|00|10|00|00]
20:56:16.721 -> [125925] >[00|00|10|00|C8]
20:56:16.755 -> [125958] >[00|00|10|00|C8]
20:56:16.789 -> [125959] >vw[00]6[00]
20:56:16.789 -> [125985] Packet too big: 13824
20:56:22.752 -> Not connected to server
20:56:22.787 -> [132000] Connecting to blynk-cloud.com:80
20:56:27.708 -> [137001] Connecting to blynk-cloud.com:80
20:56:33.662 -> Not connected to server
20:56:33.696 -> [143000] Connecting to blynk-cloud.com:80
20:56:38.606 -> [148001] Connecting to blynk-cloud.com:80
20:56:44.560 -> Not connected to server

Error Again:

20:42:34.525 -> Connected to server
20:42:36.413 -> [155902] <[06|00|11|00|00]
20:42:36.481 -> [155960] >[00|00|11|00|C8]
20:42:36.515 -> [155986] >[00|00|11|00|C8]
20:42:36.550 -> [156004] >[14|00|01|00|0E]
20:42:36.584 -> [156038] >pm[00]3[00]out[00]6[00]out
20:42:36.619 -> [156076] >[DB]/[DF]?7
20:42:36.619 -> [156077] Packet too big: 16183
20:42:45.463 -> Not connected to server
20:42:45.496 -> [165000] Connecting to blynk-cloud.com:80
20:42:50.432 -> [170001] Connecting to blynk-cloud.com:80
20:42:56.353 -> Not connected to server

Sketch:

#define BLYNK_DEBUG
#define BLYNK_PRINT Serial
#define BLYNK_MAX_READBYTES 1024

#include <SPI.h>
#include <WiFiNINA.h>
#include <BlynkSimpleWiFiNINA.h>
#include <SimpleTimer.h>

char auth[] = "***";
char ssid[] = "***";
char pass[] = "***";
SimpleTimer timer;


void setup()
{
  // Debug console
  Serial.begin(9600);
  pinMode(3, OUTPUT);
  pinMode(6, OUTPUT);
  digitalWrite(3, HIGH); 
  digitalWrite(6, HIGH);

  timer.setInterval(11000L, CheckConnection); // check if still connected every 60s  

    Blynk.begin(auth, ssid, pass);

}

void CheckConnection(){    // check every 60s if connected to Blynk server
  if(!Blynk.connected()){
    Serial.println("Not connected to server"); 
    Blynk.connect();  // try to connect to server with default timeout
  }
  else{
    Serial.println("Connected to server");     
  }
}

BLYNK_WRITE(V6) { 
  Serial.println("Relay enabled");
  digitalWrite(3, LOW);
  digitalWrite(6, HIGH);
  timer.setTimeout(13000, turnRelayOff);
}

void turnRelayOff() {
    digitalWrite(3, HIGH);
    Blynk.virtualWrite(V6, HIGH);
    Serial.println("Relay disabled");
}

BLYNK_WRITE(V7) { 
  Serial.println("Relay enabled");
  digitalWrite(3, HIGH);
  digitalWrite(6, LOW);
  timer.setTimeout(13000, turnRelayOff2);
}

void turnRelayOff2() {
    digitalWrite(6, HIGH);
    Blynk.virtualWrite(V7, HIGH);
    Serial.println("Relay disabled");
}


void loop() {
  if(Blynk.connected()){
    Blynk.run();
  }
  timer.run();
}

0 Likes

#2

The latest firmware appears to be 1.2.1
https://forum.arduino.cc/index.php?topic=579469.0

I have no idea if that will help, and as always you upgrade at your own risk, but that’s where I’d start.

Actually, that’s not where I’d start. I’d start by ordering a NodeMCU or Wemos D1 Mini and consigning the Uno WiFi thingy to the junk box :open_mouth:

Pete.

0 Likes