Page 1 of 1

WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 18 Sep 2019, 21:51
by mitya
Hi, I have a problem with my NodeMCU v3. I tried different releases starting from 2019-06-30 to 2019-09-03 with no luck. Every time I set WiFI mode to connect to my existing WiFi network my device stop responding.

Code: Select all

239961 : WIFI : Connecting IoTNet attempt #7
242519 : WD   : Uptime 4 ConnectFailures 0 FreeMem 19736 WiFiStatus 6
243068 : WIFI : Connected! AP: IoTNet (80:2A:A8:97:76:EC) Ch: 11 Duration: 2894 ms
243071 : WIFI : DHCP IP: 192.168.10.122 (ESP-Easy-0) GW: 192.168.10.1 SN: 255.255.255.0   duration: 120 ms
251672 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8712 ms
251701 : WIFI : Connecting IoTNet attempt #0
252038 : WIFI : Connected! AP: IoTNet (80:2A:A8:97:76:EC) Ch: 11 Duration: 152 ms
252041 : WIFI : DHCP IP: 192.168.10.122 (ESP-Easy-0) GW: 192.168.10.1 SN: 255.255.255.0   duration: 125 ms
260574 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8617 ms
260591 : WIFI : Connecting IoTNet attempt #0
261819 : WIFI : Connected! AP: IoTNet (80:2A:A8:97:76:EC) Ch: 11 Duration: 1034 ms
261823 : WIFI : DHCP IP: 192.168.10.122 (ESP-Easy-0) GW: 192.168.10.1 SN: 255.255.255.0   duration: 74 ms
..............................
813383 : WD   : Uptime 14 ConnectFailures 0 FreeMem 19248 WiFiStatus 3
821953 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8661 ms
821970 : WIFI : Connecting IoTNet attempt #0
822320 : WIFI : Connected! AP: IoTNet (80:2A:A8:97:76:EC) Ch: 11 Duration: 156 ms
822324 : WIFI : DHCP IP: 192.168.10.122 (ESP-Easy-0) GW: 192.168.10.1 SN: 255.255.255.0   duration: 25 ms
830857 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8626 ms
830874 : WIFI : Connecting IoTNet attempt #0
832090 : WIFI : Connected! AP: IoTNet (80:2A:A8:97:76:EC) Ch: 11 Duration: 1031 ms
832093 : WIFI : DHCP IP: 192.168.10.122 (ESP-Easy-0) GW: 192.168.10.1 SN: 255
the ping looks like this

Code: Select all

Request timed out.
Request timed out.
Reply from 192.168.10.122: bytes=32 time=465ms TTL=255
Request timed out.
Request timed out.
Request timed out.
to check that hardware works correctly I tried to flash Tosmata and it works with no issues. Also I tried other WiFi AP also with no luck and It work without issues in AP mode with default address 192.168.4.1

If someone can help how to troubleshoot the issue I would really appreciate it.

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 18 Sep 2019, 23:12
by TD-er
Can you try to set it to B/G mode (given you have enough time for that)?
Also can you try to run one of the last builds running core 2.6.0 SDK 222?
Or maybe even from this test build: https://www.dropbox.com/s/68u55dhvayhok ... 7.zip?dl=0

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 19 Sep 2019, 08:17
by mitya
Thanks for reply, I tried firmware from the provided file:
ESP_Easy_mega-20190910-6-PR_2617_test_ESP8266_4M_VCC and one from older release ESP_Easy_mega-20190830_normal_core_260_sdk222_alpha_ESP8266_4M but with no luck.
It again works normally in AP mode until I connect module to WiFi network.
After connecting to WiFi, the connection become not stable to make proposed changes like B/G mode, but I manually set AP mode via serial connection and force B/G mode from there. Also I tried to set flag to send gratuitous arp but it didn't fix the problem with " WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8611 ms" messages.

I also tried ESP_Easy_mega-20190910-6-PR_2617_normal_core_242_ESP8266_1M but it didn't run.

May be some ideas how to get more debug info?
Later I will try to collect raw WiFi traffic to find if there any beacon sent from Wifi AP to ESP module

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 19 Sep 2019, 15:24
by TD-er
Have you also tested the "Force WiFi No Sleep:" option?
If STA+AP mode does seem to work, then it looks like there is some issue with respect to the ESP WiFi going into sleep mode.

By the way, "ESP_Easy_mega-20190910-6-PR_2617_test_ESP8266_4M_VCC" is based on core 2.5.2.
There should also be a core 2.6.0 SDK 2.2.2 build in there, or is it not included?

This ESP, does it have a metal cap over the ESP, or is it not shielded?
Can you share a picture of the WiFi antenna?
Is there metal near the antenna?

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 19 Sep 2019, 22:20
by mitya
Yes, I tried "Force WiFi No Sleep", "Force WiFi B/G" and "Periodical send Gratuitous ARP" but with no effect.
There is no suitable 4M firmware bin file in 20190910 release, but I tried core 2.6.0 SDK 2.2.2 from 20190830 and it didn't help.
I also noticed that there is the same issue even in AP mode, I can not connect http://192.168.4.1/setup after flashing firware from the first time and I need many attempt to make initial WiFi setup. the previous time I was lucky to do from a few attempts and didn't consider it as a problem.
There is no metal cap on my NodeMCU and the chip marked as ESP8266EX https://ibb.co/6JrvSpS
while on the similar NodeMCU device with metal cap(it marked as ESP 8266MOD on metal cap) I have NOT had any issues with EASY ESP release starting from 20190607 to the most current 20190903. So might be it is a different chip that causes the issues, but it works quite stable with Tosmata firware that I used to ensure that it is not a hardware problem.
Image

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 20 Sep 2019, 09:41
by TD-er
I think it may be the missing cap is causing undefined behavior on the module when the antenna is broadcasting.
Maybe Tasmota is lowering the TX power of the WiFi module?

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 20 Sep 2019, 13:17
by mitya
It can't be related to the antenna TX/RX power as device works up to 15 meters in AP mode with Tasmota fw, and it can't work even within a few cm distance to WiFi AP or device connected to it.
I also checked raw WiFi bandwidth with AirPcap NX and I see no big difference in traffic between Tasmota and EASY ESP.

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 20 Sep 2019, 18:38
by TD-er
mitya wrote:
20 Sep 2019, 13:17
It can't be related to the antenna TX/RX power as device works up to 15 meters in AP mode with Tasmota fw, and it can't work even within a few cm distance to WiFi AP or device connected to it.
I also checked raw WiFi bandwidth with AirPcap NX and I see no big difference in traffic between Tasmota and EASY ESP.
I don't know what Tasmota is doing to the TX power settings.
I do know that about a week ago there was an issue on esp8266/Arduino about strange issues which appeared to be related to TX power causing strange issues on an ESP without a shield.
Using external antenna or reducing TX power did solve all those issues.

WiFi devices can also be too close to eachother.

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 13 Nov 2019, 18:19
by ruAnimus
mitya wrote:
20 Sep 2019, 13:17
It can't be related to the antenna TX/RX power as device works up to 15 meters in AP mode with Tasmota fw, and it can't work even within a few cm distance to WiFi AP or device connected to it.
I also checked raw WiFi bandwidth with AirPcap NX and I see no big difference in traffic between Tasmota and EASY ESP.
I am experiencing exactly the same problem with a very similar device. I flashed the device with this firmware using the included flasher (FlashESP8266.exe), and the problem ceased to appear:
https://github.com/letscontrolit/ESPEas ... a-20180410

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 27 Nov 2019, 20:00
by ruAnimus
The latest working version for me is "ESPEasy_mega-20181231".

Starting with the version "ESPEasy_mega-20190106" the connection is terminated on the error "(201) No AP found".

Code: Select all

INIT : Booting version: mega-20190116 (ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support)
104 : INIT : Warm boot #3 - Restart Reason: Software/System restart
107 : FS   : Mounting...
133 : FS   : Mount successful, used 75802 bytes of 957314
478 : CRC  : program checksum       ...OK
489 : CRC  : SecuritySettings CRC   ...OK 
597 : INIT : Free RAM:27928
599 : INIT : I2C
600 : INIT : SPI not enabled
613 : INFO : Plugins: 46 [Normal] (ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support)
615 : WIFI : Set WiFi to STA
648 : WIFI : Connecting MyWifiSSID attempt #0
1983 : WD   : Uptime 0 ConnectFailures 0 FreeMem 26088
3602 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2853 ms
4430 : WIFI : Connecting MyWifiSSID attempt #1
And starting with the version "ESPEasy_mega-20190121" is "(200) Beacon timeout"

Code: Select all

connected with MyWifiSSID, channel 11
dhcp client start...
ip:192.168.100.11,mask:255.255.255.0,gw:192.168.100.1
121577 : WIFI : Connected! AP: MyWifiSSID (C8:D3:A3:54:CD:E4) Ch: 11 Duration: 156 ms
121579 : WIFI  : Arduino wifi status: WL_CONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_GOT_IP
121580 : WIFI : DHCP IP: 192.168.100.11 (ESP-Easy-0) GW: 192.168.100.1 SN: 255.255.255.0   duration: 29 ms
121581 : WIFI  : Arduino wifi status: WL_CONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_SERVICES_INITIALIZED
122873 : WD   : Uptime 2 ConnectFailures 0 FreeMem 21960 WiFiStatus 3
123763 : LoopStats: shortestLoop: 105 longestLoop: 886806 avgLoopDuration: 120.77 loopCounterMax: 285714 loopCounterLast: 237920 countFindPluginId: 0
123763 : Scheduler stats: (called/tasks/max_length/idle%) 237920/2073/6/96.70
bcn_timout,ap_probe_send_start
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
130153 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8575 ms
130154 : WIFI  : Arduino wifi status: WL_IDLE_STATUS ESPeasy internal wifi status: ESPEASY_WIFI_DISCONNECTED
130320 : WIFI : Connecting MyWifiSSID attempt #0
130324 : WIFI  : Arduino wifi status: WL_DISCONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_DISCONNECTED
130325 : WIFI : Not configured in Station Mode!!: MyWifiSSID
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 4
cnt 

connected with MyWifiSSID, channel 11
Device:

Code: Select all

ESP board
ESP Chip ID:	7802118 (0x770D06)
ESP Chip Freq:	80 MHz
ESP Board Name:	PLATFORMIO_ESP12E

Storage
Flash Chip ID:	Vendor: 0xC8 Device: 0x4016
Flash Chip Real Size:	4096 kB
Flash IDE Size:	4096 kB
Flash IDE speed:	40 MHz
Flash IDE mode:	DIO
Flash Writes:	5 daily / 5 boot
Sketch Size:	773 kB (2296 kB free)
SPIFFS Size:	934 kB (860 kB free)

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 28 Nov 2019, 12:33
by rxrx
I have the exact same issue with the latest image ESP_Easy_mega-20191127_normal_ESP8266_4M1M.

This same device has been working perfectly fine for years with the R147 version.. so definitely not a hardware issue.. going back to R147 for now.

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 28 Nov 2019, 14:25
by TD-er
Of the more recent nightly builds, which version (exact build file name of the binary) have the both of you tested?
Can you backup your settings and start with a blank setting file? Just to make sure the settings have nothing to do with it?

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 28 Nov 2019, 19:11
by ruAnimus
The latest version that I installed is "ESP_Easy_mega-20191127_normal_ESP8266_4M1M.bin", error was repeated "(200) Beacon timeout". Each time after firmware, I performed a "reset" and settings:

Code: Select all

Debug 4
WifiSSID
Wifikey
Save
Wificonnect

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 03 Jan 2020, 06:45
by kum512
I do have a same problem with the same board. Currently using R147 which is stable. Awaiting fix for this. Thanks Team

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 03 Jan 2020, 10:04
by grovkillen
Have you tried the latest release?

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 06 Jan 2020, 18:59
by Maxx850
Hi, I have two nodemcu modules working in my basement. One is connected to the watermeter (pulse counter), the other has two ds18b20 connected and a 2x20 lcd display. The first module is mega-20180224, the second worked with mega-20180802. The module connected to the water meter has a rssi level of -84dB and works great. Uptime about 100 days is not a problem. The second module has a rssi level of -74dB and worked equally well. Until I upgraded to the mega-20191123 version (later mega-20191127, mega-20191130 and the latest 20191208). After the upgrade I experienced all the problems described on github: beacon timeout, no www interface, p2p udp not working, no wifi after restart etc. (sometimes there was no www interface, the router did not see the module, the network scanner showed that the module is offline but ... domoticz was still receiving data from the module!). I bought a second router and set up the Mesch network (asus routers, AI Mesch). After a few experiments with beacon time and location of the additional router rssi increased to -67dB and all the problem almost disappeared (unless someone stops for more than 30 seconds between the module and the router). To sum up, mega-20180224 and mega-20180802 were able to cope with one router for over 1 year, 10 meters away, 40cm thick brick wall and wooden ceiling without reconects, resets and without losing a single packet of data (water meter never had to be corrected in domoticz). For me, the key turned out to be a signal level higher than -70dB, but this is not the right way, since the earlier firmware works with a much weaker signal.
Of course, I've done all the wifi settings: Force WiFi B / G,
Restart WiFi Lost Conn, Force WiFi No Sleep, Periodical send Gratuitous ARP, CPU Eco Mode.

Best regards and thank you for a great job!

MaxX

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 14 Mar 2020, 15:24
by demonchok
have anyone solved this ? im getting the same error on some of my older Nodemcus :(

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 14 Mar 2020, 16:21
by TD-er
demonchok wrote:
14 Mar 2020, 15:24
have anyone solved this ? im getting the same error on some of my older Nodemcus :(
How often does this happen?
Have you tried setting the WiFi to "No Sleep" and/or enabling Gratuitous ARP?
Also make sure you set the WiFi to a fixed channel. (if possible)

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 16 Mar 2020, 14:11
by demonchok
at once :/ i can't even get to the menu, it happens when i reflashed the units :(

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 16 Mar 2020, 15:08
by TD-er
Reflashed as in it was running something other than a version of ESPEasy?
Or a version of ESPEasy over ~2 years old?

If so, then please wipe the entire flash with a blank file of the size of your flash memory and try again.
Some firmware and example sketches do write WiFi settings to a part of the flash we don't use (or erase) in ESPEasy, but that may still affect WiFI performance.

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 29 Apr 2020, 18:13
by livello
I've also faced with this problem.
I wrote 16mb empty file to device. After that you can write firmware.
No disconnects. Works perfect.

INIT : Booting version: mega-20200426 (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
71 : Info : INIT : Free RAM:31136
72 : Info : INIT : Warm boot #6 Last Task: Background Task Last systime: 12339 - Restart Reason: External System
73 : Info : FS : Mounting...
98 : Info : FS : Mount successful, used 75802 bytes of 957314
576 : Info : CRC : program checksum ...OK
585 : Info : CRC : SecuritySettings CRC ...OK
696 : Info : INIT : Free RAM:28456
697 : Info : INIT : I2C
697 : Info : INIT : SPI not enabled
981 : Info : INFO : Plugins: 84 [Normal] [Testing] [Development] (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
1086 : Info : WIFI : Set WiFi to STA
1189 : Info : WIFI : Connecting vent attempt #0
1194 : Info : Webserver: start
1195 : Info : Time set to 12339.000 Time adjusted by 12337805.00 msec. Wander: 3427.17 msec/second
1197 : Info : Current Time Zone: STD time start: 1970-10-25 03:00:00 offset: 0 min
1199 : Info : Local time: 1970-01-01 03:25:39
2401 : Info : WIFI : Connected! AP: vent (EC:41:18:50:AB:09) Ch: 13 Duration: 1028 ms
2403 : Info : WIFI : DHCP IP: 10.20.0.248 (ESP-Easy) GW: 10.20.0.1 SN: 255.255.255.0 duration: 135 ms
2406 : Info : firstLoopConnectionsEstablished
2533 : Info : WD : Uptime 0 ConnectFailures 0 FreeMem 20400 WiFiStatus 3
32533 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
62533 : Info : WD : Uptime 1 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
92533 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
122533 : Info : WD : Uptime 2 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
152533 : Info : WD : Uptime 3 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
182533 : Info : WD : Uptime 3 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
212533 : Info : WD : Uptime 4 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
242533 : Info : WD : Uptime 4 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
272533 : Info : WD : Uptime 5 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
302533 : Info : WD : Uptime 5 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
332533 : Info : WD : Uptime 6 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
362533 : Info : WD : Uptime 6 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
392533 : Info : WD : Uptime 7 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
422533 : Info : WD : Uptime 7 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
452533 : Info : WD : Uptime 8 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
482533 : Info : WD : Uptime 8 ConnectFailures 0 FreeMem 19896 WiFiStatus 3
512533 : Info : WD : Uptime 9 ConnectFailures 0 FreeMem 19640 WiFiStatus 3
542533 : Info : WD : Uptime 9 ConnectFailures 0 FreeMem 19640 WiFiStatus 3
572533 : Info : WD : Uptime 10 ConnectFailures 0 FreeMem 19640 WiFiStatus 3
602533 : Info : WD : Uptime 10 ConnectFailures 0 FreeMem 19640 WiFiStatus 3
632533 : Info : WD : Uptime 11 ConnectFailures 0 FreeMem 19640 WiFiStatus 3
662533 : Info : WD : Uptime 11 ConnectFailures 0 FreeMem 19640 WiFiStatus 3

Re: WIFI : Disconnected! Reason: '(200) Beacon timeout'

Posted: 30 Apr 2020, 20:25
by livello
Image
Unfortunately, i still have problems with nodemcu v3. The only way is to use firmware near mega-20181111.