Hello
I try to search the solution of this issue but is very difficult to resolve.
i have the same error on debug: “Cmd Error” on Arduino mega 2560 + esp8266
I set the bound at 9600 on the Esp8266 with ATcommand and i write a simplest sketch with ONLY One Send every 11 sec to send 0 to Blynk app
(Blynk.virtualWrite(V38, 0)
After 2/3 min there is the same error
Cmd Error and after Blynk disconnect the connection
…
send to blynk[1915808] <[14|01]f[00|07]vw[00]38[00]0
[1920819] Cmd error
The informations are:
Lib v0.6.1 on Arduino Mega
AT version:1.6.2.0(Apr 13 2018 11:10:59)
SDK version:2.2.1(6ab97e9)
/*************************************************************
Download latest Blynk library here:
https://github.com/blynkkk/blynk-library/releases/latest
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator: http://examples.blynk.cc
Blynk community: http://community.blynk.cc
Follow us: http://www.fb.com/blynkapp
http://twitter.com/blynk_app
Blynk library is licensed under MIT license
This example code is in public domain.
*************************************************************
This example shows how to use ESP8266 Shield (with AT commands)
to connect your project to Blynk.
WARNING!
It's very tricky to get it working. Please read this article:
http://help.blynk.cc/hardware-and-libraries/arduino/esp8266-with-at-firmware
Change WiFi ssid, pass, and Blynk auth token to run :)
Feel free to apply it to any other example. It's simple!
*************************************************************/
/* Comment this out to disable prints and save space */
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG // debugga
#include <SimpleTimer.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "xxxxxxxxxxx";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "TP-LINK_Outdoor_871430";
char pass[] = "xxxxxxxxxxxxx";
char server[]= "192.168.1.22";
// Hardware Serial on Mega, Leonardo, Micro...
#define EspSerial Serial1
// or Software Serial on Uno, Nano...
//#include <SoftwareSerial.h>
//SoftwareSerial EspSerial(2, 3); // RX, TX
// Your ESP8266 baud rate:
#define ESP8266_BAUD 9600
ESP8266 wifi(&EspSerial);
SimpleTimer timer;
void setup()
{
// Debug console
Serial.begin(9600);
delay(10);
// Set ESP8266 baud rate
EspSerial.begin(ESP8266_BAUD);
delay(10);
// Blynk.begin(auth, wifi, ssid, pass);
Blynk.begin(auth, wifi, ssid, pass,server,8080);
timer.setInterval(11000L, invia);
}
void loop()
{/* Serial.print("[");
Serial.print(millis());
Serial.print("]");
Serial.println("Run Blynk");
*/
timer.run();
Blynk.run();
}
void invia()
{ Serial.print("send to blynk");
Blynk.virtualWrite(V38, 0);
}
Ready (ping: 58ms)
the server is a blynk server on the same LAN
the connection is on AP (Ubiquiti nano station 2) with channel width at 20 Mhz
i set latest firmware on this AP but there is always cmd error
i get all simple to identify the reason of this errore but is very difficult to understand
There is always the same problem cmd error
i used the simplest sketch on Arduino UNO on serial port 2 and 3 (no serial1)
// or Software Serial on Uno, Nano… #include <SoftwareSerial.h>
SoftwareSerial EspSerial(2,3); // RX, TX
May be i have to use a different ESP like ESP32? Could work fine?
Do you mean replace your entire Arduino + ESP-01 combination with a NodeMCU or ESP32?
If so, then that’s the best approach in my opinion, but which board you choose depends on your requirements.
As the board will be located in a distant location then maybe something that can have an external antenna connected (such as the Wemos D1 Mini Pro) would be a good choice.
On Arduino Mega i manage over 20 pin , don’t belive i can to do with Wemos.
I have to use the Arduino Mega.
I don’t understand, does that mean that Blynk on Arduino (UNO or Mega) and ESP connected together don’t work?
Why is the sketch among the examples in the Arduino IDE on BLynk Example is don’t work?
In your case it sounds like an ESP32 may be the best choice.
No, it works, but isn’t the optimal solution and I’m guessing that your current issues are caused by signal strength or network issues, which a dedicated IoT board may tolerate better - but it’s difficult to say, as you haven’t fed-back on what happens when you take your access point out of the equation.
I’m sorry to contradict but it doesn’t work. i’m sorry to contradict but it doesn’t work. I exactly configured the tabs as expected by Blynk but it doesn’t work. I exactly configured the setup as expected by Blynk but it doesn’t work. This Arduino + ESP01 configuration does not work and should be deleted from the documentation. These tests waste a lot of time.
Fab