Hello guys, I’m getting some “Cmd error” in my debug serial, this’s happening once every minute and it makes my blynk reconnect (sometimes it doesn’t reconnect)
I was using this code for a long time without problem, it start happening after updating Blynk AND probably because I changed my Arduino MEGA + ESP8266 offboard to a Arduino MEGA + ESP8266 onboard.
Here’s 3 parts of my log:
[390280] <[14|00|83|00|0A]vw[00]100[00]390
[400303] Cmd error
// This sends the uptime to my blynk
[442587] <[14|00|03|00|0C]vw[00]14[00]30.179
[452609] Cmd error
// This sends the temperature to my blynk
[781345] <[14|00]![00|08]vw[00]10[00]99
[791367] Cmd error
// This sends the luminosity sensor value to my blynk
Most of times they’re sent sucessfuly, but sometimes they fail and give me a “Cmd Error”
I’m sending the millis once every 3 seconds, temp is once every 10 or 15 seconds (don’t remember exacly)… But I’m not flooding, I also changed in library the max number of sendings…
It’s the only thing that I still did not try, I’ll try to use my old offboard ESP-8266 board at night then I’ll come back with results…
I was paying attention yesterday, I got “Cmd error” in RTC sync too… I mean, it’s random, not especify in virtualwrites…
Ok, I tested another code, a simple one… There was no “Cmd Error”, the code ran OK… The weird is that I’ve not changed anything in my original project, the only thing that changed in that time was the Blynk library was updated
The code:
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG
#define BLYNK_NO_BUILTIN
//#define DEBUG_SERIAL_ENABLE
#include <ESP8266_Lib.h> // (BLYNK)
#include <BlynkSimpleShieldEsp8266.h> // (BLYNK)
char auth[] = "authcode"; // (BLYNK) Código Token
char ssid[] = "mywifi"; // (BLYNK) Nome rede Wifi
char pass[] = "pass"; // (BLYNK) Senha rede WiFi
#define EspSerial Serial3 // (ESP-8266)
#define ESP8266_BAUD 115200 // (ESP-8266)
ESP8266 wifi(&EspSerial); // (ESP-8266)
long previousMillis = 0; // will store last time LED was updated
long interval = 1500; // interval at which to blink (milliseconds)
void setup()
{
Serial.begin(9600);
delay(100);
EspSerial.begin(ESP8266_BAUD);
delay(100);
Blynk.begin(auth, wifi, ssid, pass); // (BLYNK) Iniciar Blynk com Token
}
void loop()
{
Blynk.run(); // (BLYNK)
unsigned long currentMillis = millis();
if (currentMillis - previousMillis > interval)
{
previousMillis = currentMillis;
Blynk.virtualWrite(V100, (millis() / 1000)); // (BLYNK) Uptime do sistema
}
}
I’m going to gym now, after that I’ll try to put my old ESP board.
PROBLEM SOLVED!
The problem was my onboard ESP, I don’t know if it came with deffect or there’s a config which is limiting it, that’s not the right forum to ask help for this problem, I’ll go to Robotdyn forum!
I wanna to thank you Gunner for reading my topic and reply it, thanks a lot!