Welcome, Guest
Username: Password: Remember me

TOPIC: ESP8266 internet connected switch esp-01 bugs

ESP8266 internet connected switch esp-01 bugs 9 months 8 hours ago #3733

  • Nikoloudakis
  • Nikoloudakis's Avatar
  • Offline
  • New Member
  • Posts: 8
  • Thank you received: 2
  • Karma: 0
Hi,
I tried to construct project ESP8266 internet connected switch (EasyIoT Cloud MQTT API V1) - improved with esp-01 and after a lot of effort and debugging, i think i found 2 bugs (only for esp-01).
1)esp-01 doesn't have a BUILTIN_LED ,so in order to run it on the esp-01 I had to comment all the references in the code that was similar to BUILTIN_LED code.
2)After some manual power-down resets ,esp was going in AP-mode and some other times it connected without problem
I think there is a problem with the sketch.
When the esp restarts in my case, it immediately tries to connect to the WiFi.
In the beginning of the code we write WiFi.begin(storage.ssid, storage.pwd);
After debugging I found that sometimes after restart esp connected in the background immediately to WiFi before the code reaches WiFi.begin! Strange and odd! And after the code reaches WiFi.begin, it is already connected, so the connection fails and goes to AP mode
I inserted a statement if (WiFi.status() != WL_CONNECTED) before WiFi.begin and now I don't have a single connection failure. :P Hope someone can replicate these finding's, and i hope I helped someone.
The administrator has disabled public write access.
The following user(s) said Thank You: EasyIoT

ESP8266 internet connected switch esp-01 bugs 8 months 3 weeks ago #3740

  • EasyIoT
  • EasyIoT's Avatar
  • Offline
  • Administrator
  • Posts: 835
  • Thank you received: 258
  • Karma: 25
Nikoloudakis wrote:
Hi,
I tried to construct project ESP8266 internet connected switch (EasyIoT Cloud MQTT API V1) - improved with esp-01 and after a lot of effort and debugging, i think i found 2 bugs (only for esp-01).
1)esp-01 doesn't have a BUILTIN_LED ,so in order to run it on the esp-01 I had to comment all the references in the code that was similar to BUILTIN_LED code.
2)After some manual power-down resets ,esp was going in AP-mode and some other times it connected without problem
I think there is a problem with the sketch.
When the esp restarts in my case, it immediately tries to connect to the WiFi.
In the beginning of the code we write WiFi.begin(storage.ssid, storage.pwd);
After debugging I found that sometimes after restart esp connected in the background immediately to WiFi before the code reaches WiFi.begin! Strange and odd! And after the code reaches WiFi.begin, it is already connected, so the connection fails and goes to AP mode
I inserted a statement if (WiFi.status() != WL_CONNECTED) before WiFi.begin and now I don't have a single connection failure. :P Hope someone can replicate these finding's, and i hope I helped someone.

Thank you for your feedback.
BUILTIN_LED is only for ESP8266 NODEMCU. Also as I tested you can debug only if you are using ESP8266 NODEMCU, but not with ESP-01. ESP8266 NODEMCU is recommend for beginners, because it easy to debug and LED and button is already connected, also power supply is built in.
The administrator has disabled public write access.
Time to create page: 0.163 seconds
Powered by Kunena Forum