Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'(200) Beacon timeout' & '(201) No AP found' #1312

Closed
Oxyandy opened this issue Apr 24, 2018 · 180 comments
Closed

'(200) Beacon timeout' & '(201) No AP found' #1312

Oxyandy opened this issue Apr 24, 2018 · 180 comments
Labels
Category: Stabiliy Things that work, but not as long as desired Category: Wifi Related to the network connectivity Status: Fixed Commit has been made, ready for testing

Comments

@Oxyandy
Copy link

Oxyandy commented Apr 24, 2018

Summarize of the problem/feature request

'(200) Beacon timeout' & '(201) No AP found'
Make using the recent firmwares useless, it happens so quickly I can never load a web page.
I happens straight away.
Tried virgin devices, Erase_Flash, nothing changes the outcome.
Tried 2 routers & even my mobile Android hotspot & restarting routers.
Always the same, always instantly a problem.
Simply setting Wifissid & Wifikey, save - problem starts, so using DHCP, not tried static etc

System configuration

Sonoff Basic units with 1M flash PCB dated 2017-5-5 TH_V1.1
ESP8266EX
I can back track this if it helps ?
Not going to back track without being asked to.
Last firmware tried mega-20180424 (ESP82xx Core 2_4_0)

@TD-er
Copy link
Member

TD-er commented Apr 24, 2018

I just (minutes ago) added some quick fix to do a bit more active reconnects.

However, if you're getting them Beacon timeout so quickly and so often, there may be some other issue here.
The beacon timeout is a common reason to disconnect. But common as in a few times a week maybe a few times per day. Not as frequent as you describe them.
The "No AP found" is something else I just found out yesterday.
ESP32 has an event to signal "STAstart", which will fire when the wifi module is online and stable.
On the ESP32 this will take between 30 and 450 msec (on my test node).
If you're trying to so some wifi related stuff inbetween starting wifi mode and doing something with the wifi, it will result in strange issues.
For example:

  • connected but no traffic possible
  • infinite timeouts on connections started before the wifi STA mode was stable.
  • No AP found errors.

The ESP8266 does not have such a STAstart event. But you could add some delay in the function that actually sets the mode to WIFI_STA
A delay of 250 msec is almost always fine.

There are other new insights into wifi that I should use and the wifi code has become too complex in the last few weeks.
So there should be a simple redesign (or redesign to simplicity) to the wifi code.
I will work on that for the next couple of days and then release it.

So please test the last version of the code (or wait 3 hours and you'll have the fresh 025 build)

And sometimes it also helps to restart the accesspoint, since beacon timeout should not happen that often, even though there is some logic error in the current code.

@Oxyandy
Copy link
Author

Oxyandy commented Apr 24, 2018

I will try the 025 build..
I can back track this error ???
Introduced somewhere in the last month...
Is an instant issue, as soon as setting up Wifi
tried different makes & model routers & my Android phone's hotspot, consistent problem all routers
Downgrade firmware to pre-CRC fail, this issue is gone, Wifi works fine.

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

ESP_Easy_mega-20180425_normal_ESP8266_1024.bin
Full erase before flash
Opened Serial Monitor, cold booted..
AP is not showing anywhere, tried my PC, Routers & Mobile Phone..
Cold boot & tried again, no AP "ESP_Easy_0" found to configure Wifi
Tried again, waited.... Confirmed enough times, no access point visible
Time for step 2, see log below this one - Serial Setup

INIT : Booting version: mega-20180425 (ESP82xx Core 2_4_0)
73 : INIT : Warm boot #2
75 : FS   : Mounting...
81 : FS   : Mount successful, used 75802 bytes of 113201
379 : CRC  : program checksum       ...OK
386 : CRC  : SecuritySettings CRC   ...OK
404 : INIT : Free RAM:20400
405 : INIT : I2C

405 : INIT : SPI not enabled
419 : INFO : Plugins: 47 [Normal] (ESP82xx Core 2_4_0)
419 : WIFI : Switch on WiFi
420 : WIFI : Set WiFi to STA
422 : WIFI : No valid wifi settings
423 : WIFI : Connection Failed
525 : WIFI : Set WiFi to AP
1415 : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
1422 : WD   : Uptime 0 ConnectFailures 0 FreeMem 18144
31421 : WD   : Uptime 1 ConnectFailures 0 FreeMem 18376
61421 : WD   : Uptime 1 ConnectFailures 0 FreeMem 18376

Serial WiFi setup

>wifissid MAD_MOB

Ok
361421 : WD   : Uptime 6 ConnectFailures 0 FreeMem 18376

>wifikey 12345676

Ok
>save
383973 : FILE : Saved config.dat
384274 : FILE : Saved security.dat

Ok
384275 : WIFI : Set WiFi to AP+STA
384402 : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
391421 : WD   : Uptime 7 ConnectFailures 0 FreeMem 17240

Wifidisconnect
Wificonnect
does nothing, just serial response OK
Time for Cold Boot

Cold Boot

INIT : Booting version: mega-20180425 (ESP82xx Core 2_4_0)
76 : RTC  : Checksum error on reading RTC user var
76 : INIT : Warm boot #2147483657
78 : FS   : Mounting...
85 : FS   : Mount successful, used 75802 bytes of 113201
380 : CRC  : program checksum       ...OK
387 : CRC  : SecuritySettings CRC   ...OK
404 : INIT : Free RAM:20416

404 : INIT : I2C
405 : INIT : SPI not enabled
418 : INFO : Plugins: 47 [Normal] (ESP82xx Core 2_4_0)
419 : WIFI : Switch on WiFi
419 : WIFI : Set WiFi to STA
426 : WD   : Uptime 0 ConnectFailures 0 FreeMem 19744
427 : WIFI : Connecting MAD_MOB attempt #0
2568 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2140 ms
2568 : WIFI : Connection Failed
2669 : WIFI : Set WiFi to AP
3558 : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1

Serial "Reset" - Try again
No AP visible

Using second router Set Wifi via serial & save

Wifidisconnect & Wificonnect
Even Cold boot -- Nothing changed

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

Ok, may patch may have broken things regarding the AP mode.
About the errors reported. I just added the reason of disconnect to get more insight on what is happening.
Before there may have been WiFi issues, but never logged

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

Took another known working perfectly module with existing firmware, set as static IP
Flashed 0425 over the top
Connected differently, not better, could post whole log but quickly I spotted:

Wifi  : Detected strange behavior, reset wifi.
WIFI : Disconnected! Reason: '(2) Auth expire' Connected for 1131 ms
WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 10 s
WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2146 ms

@svde
Copy link

svde commented Apr 25, 2018

Trying ESP_Easy_mega-20180425_normal_ESP8266_4096, I setup the wifi via serial, and am seeing this:

520 : WD : Uptime 0 ConnectFailures 0 FreeMem 19728
521 : WIFI : Connecting nl5658az49 attempt #0
2658 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2136 ms
2658 : WIFI : Connection Failed
2759 : WIFI : Set WiFi to AP
3648 : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1

The ESP_Easy_0 AP is not visible to my laptops or phones.

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

OK, what was the last version of ESPeasy that simply worked with wifi?
Then I will merge that version of wifi code into ESPeasy and will have a look at the event based wifi later on. This is really taking way too much time and it is just leading to more issues.

There is a patch for the static IP issues, which I will use of course. and some other issues that have been bugging ESPeasy for over a month already.

So please, what version did just work?

@melwinek
Copy link

The best version on my nodes is mega-20180410

@Grovkillen
Copy link
Member

Still, that recent? That's after event based wifi, right @TD-er ?

Please report back here more suggestions on releases to pick for the async wifi.

@melwinek
Copy link

The web interface works very fast so surely the event based wifi.
But this version is on core 2.3.0.
Maybe it's really one problem 2.4.0 and not event based wifi?

@sassod
Copy link

sassod commented Apr 25, 2018 via email

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

If you back-stepped and tried merging 'important' fixes over the top why not
ESP_Easy_mega-20180403_normal_ESP8266_1024.bin <- CRC : Settings CRC ...OK #1272
As far as answering the question
"OK, what was the last version of ESPeasy that simply worked with wifi?"
I would need to test carefully to supply an answer.. Can do..
mega-20180403 Wifi is great, server is super strong
(repeatedly pressing F5 on devices page, never crashes or lags)

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

@sassod You may want to hold the "flash" button during flashing.
So press and hold flash, press reset shortly, start writing the firmware while still holding the flash button.
After writing firmware, release flash button and press reset.

At least, that's the method I use for NodeMCU. I assume the Wemos D1 also has a reset and a flash button?

@clumsy-stefan
Copy link
Contributor

I tried a multitude (about 20) of different combinations in the last weeks, all self-compiled, all on Wemos D1 Mini's (about 15 units with different sensors, relays, etc. attached).
Combinatiosn I tried included switchign between core versions (2.3.0, 2.4.0, GIT master) and different versions of lwIP (1.4, 1.4 self compiled, 2.0High Bandwith, 2.0 self compiled, 2.0 High memory).

The observations I did were, that the most resent version of ESPEasy (from tonight) with core 2.3.0 and lwIP 1.4 seems to work stable.

Switching to core from GIT or 2.4.0 and using lwIP 2 has issues (does not reconnect / goes directly into AP mode). Switching to lwIP 1.4 self compiled does improve the situation slightly (connects to the network but switches to AP mode 2min. later)

so as far as I can tell it seems to be more related to the core version and lwIP and not the ESPEasy event based Wifi. However these are just not really sophisticated observations from a beginner... but probably it helps to narrow down the issues.

Let me knwo if I can help and/or provide more information! And keep up the grat work!! Really appreciate it!!

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

Could you also check if it is possible to connect to the setup page and continue the whole process of setup wifi access, when using core 2.3.0 ? (you probably need clean settings for that)

If that's working right now, I will switch back to 2.3.0

@TD-er TD-er added Category: Stabiliy Things that work, but not as long as desired Category: Wifi Related to the network connectivity labels Apr 25, 2018
@clumsy-stefan
Copy link
Contributor

clumsy-stefan commented Apr 25, 2018

as I'm in the office I don't have physical access to the devices right now, but as far as I could see the last days, that worked. switchign to 2.4.0 or git will not bring up the page anymore.

connecting to the setup-page of a running unit (2.3.0 ESPEasy from tonight) work also fine and shows me the actual connected IP.

Clearing and flashing a unit I could try tonight thoug...

PS: what I'm also seeing on my ESP Server (FHEM) is that the messages received often are incomplete when using GIT or 2.4.0 with lwIP 2.0 (Invalid content length (462 != 410))

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

OK, that's a big help. I will try to get a 'quick and stable' build this evening.
This wifi stuff must become stable again asap.

Improvements in speed can always be done later, since I now know what is causing the delays.

@clumsy-stefan
Copy link
Contributor

I'm flashing a cpuple of units just now with my Core 2.3.0 build from this morning (and ESPEasy master) and see if they run stable throughout the day...

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

ESPeasy master.... I hope you mean "mega" branch?
Master has been renamed to 'legacy' a few days ago.

@clumsy-stefan
Copy link
Contributor

yes, sure, sorry... told you I'm a beginner ;)

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

ESP_Easy_mega-20180410_normal_ESP8266_1024 (the last 2.3 core)
Access Point shows & connects but is at http://192.168.244.1/setup
not the usual http://192.168.4.1
haven't had much time to test it yet...

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

So what is the plan ? Take mega-20180425 and change compile settings ?

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

I'm not sure there is already a plan :)
But you could try that to see if it helps. Sounds like a good start.

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

Had problems with AP, Page Title loaded.. not much else, then seemed to lock-up even via serial
Cold Boot - Manually set wifi via serial - connected
Web server responds & wifi stays connected (now 53 m 21 s)
Overall is not as fast as 0403, web-server working OK, but has moments it seems to 'pause'
changing state on GPIO14,
seems to lag with the display of that state change on serial console
For fun I checked the GPIO wrong state, my friendly bug is still there

@Oxyandy
Copy link
Author

Oxyandy commented Apr 25, 2018

0425 compiled in platformIO with 2.3.0 Core

Even though I have tortured the device, trying to crash it, it has stayed UP (1 hour 30 min)
Not one wifi error as I have previously reported
UP time = Wifi connect time..
So the change from 2.4 down to core 2.3 = a huge difference

@clumsy-stefan
Copy link
Contributor

Just for information:
I have flashed 6 units about four hours ago. Except one, all of them still up and running (with 2.4.0 or GIT it was less than 5min.). One stopped responding after 2h, but this one I use for HW-Tests (sensors, relaiys, etc), so It's likely an issue of the device and not the SW.

The others are running a build from this morning with core 2.3.0 built wirh Arduino on a Mac with a custom plugin set enabled (32 plugins).

hope this helps...

@TD-er
Copy link
Member

TD-er commented Apr 25, 2018

It helps a lot.
At least it somewhat proves my code isn't that horrible ;)
And tomorrows build will be 2.3.0 based for sure.

@melwinek
Copy link

Does the compilation in PlatformIO require any additional settings in current versions?
In the past, everything worked without a problem.
Now after uploading and resetting, it does not save wifi settings.
I give the data, then the countdown, and the button return to the settings.
In logs it looks like this:
23059 : WIFI : Set WiFi to AP
31518 : WIFI : Set WiFi to AP+STA
31520 : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
31520 : WIFI : Credentials Changed, retry connection. SSID: lipowo
31606 : WD : Uptime 1 ConnectFailures 0 FreeMem 11640
61606 : WD : Uptime 1 ConnectFailures 0 FreeMem 12560

@Oxyandy
Copy link
Author

Oxyandy commented May 1, 2018

0429 flashed over the top, perfect, first try 👍

194 : WIFI : Connecting MAD_MOB attempt #0
195 : WIFI  : SDK station status differs from Arduino status. SDK-status: 1 Arduino status: 6
XXXX : Here 0066
207 : EVENT: System#Boot
210 : SW   : Switch state 1 Output value 1
XXXX : Here 0066
214 : EVENT: Float_SW#Switch=1.00
AAAA : Here
1021 : WD   : Uptime 0 ConnectFailures 0 FreeMem 22152
scandone

state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 5
cnt

connected with MAD_MOB, channel 7
dhcp client start...
4983 : WIFI : Connected! AP: MAD_MOB (18:90:D8:AC:0F:D8) Ch: 7 Duration: 4788 ms
XXXX : Here 0066
4984 : EVENT: WiFi#ChangedAccesspoint
4990 : WIFI  : SDK station status differs from Arduino status. SDK-status: 1 Arduino status: 6
ip:192.168.0.108,mask:255.255.255.0,gw:192.168.0.254
10942 : WIFI : DHCP IP: 192.168.0.108 (ESP-Easy-0) GW: 192.168.0.254 SN: 255.255.255.0   duration: 5958 ms
11082 : Current Time Zone:  DST time start: 2018-10-07 01:00:00 offset: 660 minSTD time start: 2018-04-01 01:00:00 offset: 60
0 min
XXXX : Here 0066
11084 : EVENT: Time#Initialized
XXXX : Here 0066
11089 : EVENT: WiFi#Connected
11095 : Webserver: start
11095 : WIFI  : SDK station status differs from Arduino status. SDK-status: 5 Arduino status: 3
11101 : WIFI  : Arduino wifi status: WL_CONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_SERVICES_INITIALIZED
XXXX : Here 0066
11120 : EVENT: Clock#Time=Tue,12:52
11123 : EVENT: Clock#Time=Tue,12:52 Processing time:4 milliSeconds
11188 : MQTT : Intentional reconnect
11286 : MQTT : Connected to broker with client ID: ESPClient_5C:CF:7F:72:96:EC
11287 : Subscribed to: domoticz/out
XXXX : Here 0066
11289 : EVENT: MQTT#Connected
11293 : EVENT: MQTT#Connected Processing time:4 milliSeconds

@TD-er
Copy link
Member

TD-er commented May 1, 2018

Nothing really changed with 0501.
So given that, it's good to know nothing changed on the WiFi side of your tests.

@Barracuda09
Copy link

Barracuda09 commented May 1, 2018

Hello,

I also had problems with build 0430 to get it to running on the SONOFF Basic. Reverted back to the one that I flashed before, but that made it not better. The WebIf was very slow and 1 out of 50 request returned nothing. After a while I managed to do a factory reset from WebIf and AP came up again. And after that I configured it again. Now it seems OK again.

I can confirm with @Oxyandy that there is some issue with build 0430.

@Oxyandy
Copy link
Author

Oxyandy commented May 1, 2018

@Barracuda09
Another Sonoff user 👍 excellent
Can you tell me the date and version on your PCB ?
Have you tried 0429 ?

@Barracuda09
Copy link

Barracuda09 commented May 1, 2018 via email

@Oxyandy
Copy link
Author

Oxyandy commented May 1, 2018

PCB dated 5-5-2017 ? If so same revision as me..
As a Sonoff User I can recommend 0429.
I just tried restarting my routers to test reconnect,
I have done this previously - but just confirmed for you, all OK 👍
reconnects perfectly, please try 0429

@Barracuda09
Copy link

@Oxyandy, OK I will try it again, thanks for the tip

@giig1967g
Copy link
Contributor

For my hardware (WEMOS D1), version MEGA-20180501 works as expected.
Wifi connects and reconnects correctly after router reboot.
MQTT import works
MQTT with Openhab works.
Will kepp in testing for few days.

@TD-er
Copy link
Member

TD-er commented May 1, 2018

@Oxyandy What Sonoff device? A basic?
I may have a few laying around.

It must be something in these changes:
mega-20180429...mega-20180430

@Oxyandy
Copy link
Author

Oxyandy commented May 1, 2018

Yep, is all I use, I have 40 Sonoff Basics
(ah another cool feature of Github, thanks for example)

@TD-er
Copy link
Member

TD-er commented May 1, 2018

You can even compare forks :)

@TD-er
Copy link
Member

TD-er commented May 1, 2018

@Oxyandy Could you please test the latest version? I changed LWIP from 2.0 to 1.4 due to a bug in the HTTP POST (large rules got mangled when > 1520 Bytes)
And after that I flashed a couple of Sonoff Basic units.
All work just fine over here. So maybe...... ;)

@Oxyandy
Copy link
Author

Oxyandy commented May 1, 2018

INIT : Booting version: (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2)
It connected after 32 attempts. you can do better..
That me just awake now.. 7.20AM,, need ..coffee

@TD-er
Copy link
Member

TD-er commented May 1, 2018

I really don't get it...
I'm working here with a Sonoff TH16 and also a Sonoff Basic and all show the same speedy connections:

INIT : Booting version:  (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2)
100 : INIT : Warm boot #1
102 : FS   : Mounting...
107 : FS   : Mount successful, used 75802 bytes of 113201
110 : CRC  : No program memory checksum found. Check output of crc2.py
122 : CRC  : SecuritySettings CRC   ...OK
140 : INIT : Free RAM:21896
141 : INIT : I2C
141 : INIT : SPI not enabled
155 : INFO : Plugins: 47 [Normal] (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2)
156 : WIFI : Set WiFi to STA
187 : WIFI : Connecting Lurch2 attempt #0
305 : WD   : Uptime 0 ConnectFailures 0 FreeMem 21168
3952 : WIFI : Connected! AP: Lurch2 (5C:49:79:4D:7B:39) Ch: 6 Duration: 3763 ms
4656 : WIFI : DHCP IP: 192.168.1.97 (ESP-Easy-0) GW: 192.168.1.1 SN: 255.255.255.0   duration: 704 ms
4670 : Webserver: start
5048 : Current Time Zone:  DST time start: 2018-03-25 02:00:00 offset: 120 minSTD time start: 2018-10-28 03:00:00 offset: 60 min

@TD-er
Copy link
Member

TD-er commented May 1, 2018

32 attempts, that's about close to 65 seconds, I guess?
Is it right after the SoftAP gets disabled?

@Oxyandy
Copy link
Author

Oxyandy commented May 1, 2018

Helps ?

97047 : WIFI : Connecting MAD_IOT attempt #31
scandone
99909 : EVENT: WiFi#Disconnected
99912 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2862 ms
100046 : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
100047 : WIFI : Connecting MAD_MOB attempt #32
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 4
cnt

connected with MAD_MOB, channel 7

dhcp client start...
105814 : WIFI : Connected! AP: MAD_MOB (18:90:D8:AC:0F:D8) Ch: 7 Duration: 5764 ms
105815 : EVENT: WiFi#ChangedAccesspoint
bcn_timout,ap_probe_send_start
ip:192.168.0.107,mask:255.255.255.0,gw:192.168.0.254
110799 : WIFI : DHCP IP: 192.168.0.107 (ESP-Easy-0) GW: 192.168.0.254 SN: 255.255.255.0   duration: 4986 ms
110810 : EVENT: WiFi#Connected
110816 : Webserver: start
110816 : WIFI  : Arduino wifi status: WL_CONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_SERVICES_INITIALIZED
110936 : NTP  : NTP host au.pool.ntp.org (27.124.125.251) queried
111007 : NTP  : NTP replied: 70 mSec
111009 : Current Time Zone:  DST time start: 2018-10-07 01:00:00 offset: 660 minSTD time start: 2018-04-01 01:00:00 offset: 6

@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

Github release,
ESP_Easy_mega-20180502_normal_ESP8266_1024.bin
no time - more testing required later

INIT : Booting version: mega-20180502 (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2)
104 : INIT : Cold Boot
106 : FS   : Mounting...
112 : FS   : Mount successful, used 75802 bytes of 113201
413 : CRC  : program checksum       ...OK
421 : CRC  : SecuritySettings CRC   ...OK 
422 : CRC  : binary has changed since last save of Settings
440 : INIT : Free RAM:22528
440 : INIT : I2C
440 : INIT : SPI not enabled
455 : INFO : Plugins: 47 [Normal] (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 1.4.0-RC2)
455 : EVENT: System#Wake
459 : WIFI : Set WiFi to STA
mode : sta(5c:cf:7f:72:96:ec)
add if0
492 : WIFI : Connecting MAD_MOB attempt #0
493 : IP   : Static IP : 192.168.0.225 GW: 192.168.0.254 SN: 255.255.255.0 DNS: 8.8.8.8
506 : EVENT: System#Boot
509 : SW   : Switch state 1 Output value 1
512 : EVENT: Float_SW#Switch=1.00
1005 : WD   : Uptime 0 ConnectFailures 0 FreeMem 21776
scandone
state: 0 -> 2 (b0)
state: 2 -> 3 (0)
state: 3 -> 5 (10)
add 0
aid 2
cnt 

connected with MAD_MOB, channel 7
ip:192.168.0.225,mask:255.255.255.0,gw:192.168.0.254
4283 : WIFI : Connected! AP: MAD_MOB (18:90:D8:AC:0F:D8) Ch: 7 Duration: 3789 ms
4286 : EVENT: WiFi#ChangedAccesspoint
4291 : IP   : Static IP : 192.168.0.225 GW: 192.168.0.254 SN: 255.255.255.0 DNS: 8.8.8.8
4297 : WIFI : Static IP: 192.168.0.225 (ESP-Easy-0) GW: 192.168.0.254 SN: 255.255.255.0   duration: 14 ms
4316 : EVENT: WiFi#Connected
4322 : Webserver: start
4322 : WIFI  : Arduino wifi status: WL_CONNECTED ESPeasy internal wifi status: ESPEASY_WIFI_SERVICES_INITIALIZED
4416 : MQTT : Intentional reconnect
4559 : MQTT : Connected to broker with client ID: ESPClient_5C:CF:7F:72:96:EC
4560 : Subscribed to: domoticz/out
4562 : EVENT: MQTT#Connected
4565 : EVENT: MQTT#Connected Processing time:3 milliSeconds
4658 : NTP  : NTP host au.pool.ntp.org (203.122.222.149) queried
4700 : NTP  : NTP replied: 40 mSec
4701 : Current Time Zone:  DST time start: 2018-10-07 01:00:00 offset: 660 minSTD time start: 2018-04-01 01:00:00 offset: 600 min
4704 : EVENT: Time#Initialized
4708 : EVENT: Time#Initialized Processing time:3 milliSeconds
4712 : EVENT: Clock#Time=Wed,13:13
4715 : EVENT: Clock#Time=Wed,13:13 Processing time:3 milliSeconds

@TD-er
Copy link
Member

TD-er commented May 2, 2018

That's faster reconnect, right?

@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

Faster than the self-compiled one before the release, yes & looks stable
No complaint from me, yet..
Not really tested much, but is staying connected while I get my lawnmower rebuilt.
If I find issue, I'll report back, otherwise nothing further posted from me means is doing well.
Thanks !

Load | 9% (LC=12576)
Free Mem | 13040 (12256 - sendContentBlocking)

@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

@TD-er Feedback time, I can click the webpage links (deliberately fast) jumping from page to page,
hit F5 abusively, this means constantly as fast as I can.. never lags, always loads
I don't like 0403 anymore...

@Grovkillen
Copy link
Member

We're super happy to hear that! :) Our plan is to make this the expected level of responsiveness, and only make it better from here 👍

@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

I broke it, yay

  • tried a few quick F5's with device page open to impress myself with response time...

Excuse the discombobulated timestamps
I let it run for a while, looks like it was never going to recover itself, sorry
Serial responded with: maybe it helps

5963508 : IP blocked: 0.0.0.0 Allowed: 192.168.0.0 - 192.168.0.255
5963687 : Ram usage: Webserver only: 0 including Core: 0
5963716 : WD   : Uptime 99 ConnectFailures 0 FreeMem 13536
5963859 : Ram usage: Webserver only: 0 including Core: 0
17:09:00: LmacRxBlk:1
17:09:01: LmacRxBlk:1
LmacRxBlk:1
17:09:03: LmacRxBlk:1
LmacRxBlk:1
17:09:05: LmacRxBlk:1
LmacRxBlk:1
17:09:07: LmacRxBlk:1
17:09:08: LmacRxBlk:1
LmacRxBlk:1
17:09:10: LmacRxBlk:1
LmacRxBlk:1
17:09:12: LmacRxBlk:1
LmacRxBlk:1
17:09:14: LmacRxBlk:1
LmacRxBlk:1
17:09:16: LmacRxBlk:1
LmacRxBlk:1
17:09:18: LmacRxBlk:1
LmacRxBlk:1
17:09:20: LmacRxBlk:1
bcn_timout,ap_probe_send_start
LmacRxBlk:1
17:09:22: LmacRxBlk:1
LmacRxBlk:1
17:09:23: ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
pm close 7
LmacRxBlk:1
17:09:25: LmacRxBlk:1
LmacRxBlk:1
17:09:27: LmacRxBlk:1
17:09:28: LmacRxBlk:1
LmacRxBlk:1
17:09:30: LmacRxBlk:1
LmacRxBlk:1
17:09:32: LmacRxBlk:1
LmacRxBlk:1
17:09:34: LmacRxBlk:1
17:09:35: LmacRxBlk:1
LmacRxBlk:1
17:09:37: LmacRxBlk:1
LmacRxBlk:1
17:09:39: LmacRxBlk:1
LmacRxBlk:1
17:09:41: LmacRxBlk:1
LmacRxBlk:1
17:09:43: LmacRxBlk:1
LmacRxBlk:1
17:09:45: LmacRxBlk:1
LmacRxBlk:1
17:09:47: LmacRxBlk:1
17:09:48: LmacRxBlk:1
LmacRxBlk:1
17:09:50: LmacRxBlk:1
LmacRxBlk:1
17:09:52: LmacRxBlk:1
LmacRxBlk:1
17:09:54: LmacRxBlk:1
LmacRxBlk:1
17:09:56: LmacRxBlk:1
LmacRxBlk:1
17:09:58: LmacRxBlk:1
LmacRxBlk:1
17:10:00: LmacRxBlk:1
LmacRxBlk:1
17:10:02: LmacRxBlk:1
LmacRxBlk:1
17:10:04: LmacRxBlk:1
LmacRxBlk:1
17:10:06: LmacRxBlk:1
LmacRxBlk:1

@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

So LmacRxBlk:1 is something to do with the SDK..
Anyway was clear abuse & proof of how lightning fast the web server runs now,
the sad part is it can not recover, wonder if there is a way to catch it, so it can. ?

@ghtester
Copy link

ghtester commented May 2, 2018

Links2004/arduinoWebSockets#220

@TD-er
Copy link
Member

TD-er commented May 2, 2018

Good to hear quite some abuse is needed to get it to break ;)

There is indeed some limit to the number of connections and as far as I know the function to keep track of the timers can be called more often. But it is a pity it is not recovering on its own.
Maybe we should add some software watchdog kind of feature to reboot on such occasions.

I saw some similar issue myself last night, when the template parse function could fill up all memory. That's also non-recoverable, so there are more use cases for such an auto reboot feature.

@TD-er TD-er added the Status: Fixed Commit has been made, ready for testing label May 2, 2018
@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

Hey a 5 minute fix ? Is there a branch ?
Another read: Links2004/arduinoWebSockets#57

@TD-er
Copy link
Member

TD-er commented May 2, 2018

No not a fix, it was just a label to state the wifi is fixed. I guess trying to fix overflowing buffers due to abuse is a different issue ;)
This one has already taken way more time than anticipated, so let's consider this one fixed to give me the feeling some progress has been made :)

Can you open a new issue with the links about this buffer overflow + hang?

@Oxyandy
Copy link
Author

Oxyandy commented May 2, 2018

Yep, no problem ;)

@Oxyandy Oxyandy closed this as completed May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Stabiliy Things that work, but not as long as desired Category: Wifi Related to the network connectivity Status: Fixed Commit has been made, ready for testing
Projects
None yet
Development

No branches or pull requests