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

Cant connect to wifi #2008

Closed
6 of 14 tasks
ymoona opened this issue Nov 6, 2018 · 103 comments
Closed
6 of 14 tasks

Cant connect to wifi #2008

ymoona opened this issue Nov 6, 2018 · 103 comments
Labels
Category: Energy Related to reduce power as much as possible. Category: Wifi Related to the network connectivity Type: Bug Considered a bug

Comments

@ymoona
Copy link

ymoona commented Nov 6, 2018

Checklist

  • The title of this issue is "to the point" and descriptive.
  • This issue describes what is happening.
  • This issue describes what components are affected (e.g. name of plugin/controller)
  • This issue describes how to reproduce it.
  • This issue describes when it was introduced (when known) and what version is now showing the problem.

I have...

  • searched the issue tracker or the forum for a similar issue. (include links when applicable)
  • entered a system description using "Copy info to clipboard" on the sysinfo page. (when possible)
  • entered the full filename of the used version (e.g. ESP_Easy_mega-20181001_test_ESP8266_4096_VCC.bin )
  • given a list of active plugins or controllers when applicable.
  • filled out all applicable fields below.

Steps already tried...

  • Tried a clean install (empty .bin files are included in the ZIP)
  • Tested previous/other build (mention which one already tested)
  • Tested on other node to make sure hardware isn't defective.
  • Verified if the problem is limited to a single plugin/controller

Summarize of the problem/feature request

I cannot connect to wifi

Expected behavior

I can connect to wifi

Actual behavior

Output of the terminal:

INIT : Booting version: mega-20181106 (ESP82xx Core 00000000, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3)
109 : INIT : Warm boot #10 - Restart Reason: External System
111 : FS   : Mounting...
136 : FS   : Mount successful, used 75802 bytes of 957314
469 : CRC  : program checksum       ...OK
480 : CRC  : SecuritySettings CRC   ...OK
588 : INIT : Free RAM:29000
589 : INIT : I2C
589 : INIT : SPI not enabled
602 : INFO : Plugins: 46 [Normal] (ESP82xx Core 00000000, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3)
604 : WIFI : Set WiFi to STA
636 : WIFI : Connecting Hans attempt #0
1971 : WD   : Uptime 0 ConnectFailures 0 FreeMem 27320
3496 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2859 ms
4416 : WIFI : Connecting Hans attempt #1
>wifiscan
WIFI : SSID Scan start
WIFI : 8 networks found
WIFI : 1: Ziggo626194E 54:67:51:E4:53:51 Ch:1 (-83dBm) WPA2/PSK
WIFI : 2: FamilievanderPloeg F8:D1:11:4D:C2:44 Ch:1 (-82dBm) WPA/WPA2/PSK
WIFI : 3: HansBoven 38:2C:4A:69:14:28 Ch:5 (-74dBm) WPA2/PSK
WIFI : 4: UPC245144906 F8:04:2E:1C:3D:48 Ch:1 (-83dBm) WPA2/PSK
WIFI : 5: DIRECT-VM-BRAVIA 12:A0:96:F4:FC:0F Ch:10 (-67dBm) WPA2/PSK
WIFI : 6: Hans 00:11:32:50:3C:B7 Ch:10 (-74dBm) WPA2/PSK
WIFI : 7: UPC1840166 C4:27:95:86:EB:C2 Ch:11 (-68dBm) WPA/WPA2/PSK
WIFI : 8: Ziggo C6:27:95:86:EB:C4 Ch:11 (-69dBm)


Ok

I tried to get it connected to my ap, but it states it cant find my ap. But with a wifiscan it can find my AP (Hans)

Steps to reproduce

Install the firmware and configure wifi

It happens all the time

System configuration

Hardware:
NodeMCU from wemos (4mbit)

ESP Easy version: ESP_Easy_mega-20181106_normal_ESP8266_4096

ESP Easy settings/screenshots:

Rules or log data


@TD-er TD-er added Type: Bug Considered a bug Category: Wifi Related to the network connectivity labels Nov 6, 2018
@Grovkillen
Copy link
Member

Just to be sure, no trailing spaces in the name/setting?

@ymoona
Copy link
Author

ymoona commented Nov 7, 2018

Nope. And I'm not sure about casing on the ap name. But I matched that as well.

I upgraded this node MCU from an older version, could it be that it is stuck on some old config? I already erased the flash and did a factory reset. Any thing else I can do?

@Grovkillen
Copy link
Member

You did flash it with a 4MB blank bin file?

@ymoona
Copy link
Author

ymoona commented Nov 7, 2018

Yes, also did that

@Grovkillen
Copy link
Member

Other ESP Easy units, do they connect?

@ymoona
Copy link
Author

ymoona commented Nov 7, 2018

Yes, but they are way older version.

@Grovkillen
Copy link
Member

Any you haven't tried another unit with the a new version? Please do!

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

I have same issue. I've been trying to solve it for several days. It only happens with Wemos NodeMCU modules:
image

Log:
312 : EVENT: System#Wake
333 : WIFI : Set WiFi to STA
365 : WIFI : Connecting lada attempt #0
478 : EVENT: System#Boot
1832 : WD : Uptime 0 ConnectFailures 0 FreeMem 26224

11276 : WIFI : Connecting lada attempt #1

26789 : EVENT: WiFi#Disconnected
26804 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 15 s
27276 : WIFI : Connecting lada1 attempt #2
30133 : EVENT: WiFi#Disconnected
30147 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2856 ms
30276 : WIFI : Connecting lada1 attempt #3
31832 : WD : Uptime 1 ConnectFailures 0 FreeMem 26192
33133 : EVENT: WiFi#Disconnected
33148 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2857 ms
33276 : WIFI : Connecting lada attempt #4
36133 : EVENT: WiFi#Disconnected
36147 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2856 ms
36276 : WIFI : Connecting lada attempt #5
41027 : EVENT: WiFi#Disconnected
41044 : WIFI : Disconnected! Reason: '(4) Assoc expire' Connected for 4751 ms
41276 : WIFI : Set WiFi to AP+STA
42197 : WIFI : AP Mode ssid will be NodeMCU7_47 with address 192.168.4.1
42197 : WIFI : Connecting lada1 attempt #6
45055 : EVENT: WiFi#Disconnected
45075 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2856 ms
45277 : WIFI : AP Mode ssid will be NodeMCU7_47 with address 192.168.4.1
45277 : WIFI : Connecting lada1 attempt #7
48134 : EVENT: WiFi#Disconnected
48150 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2857 ms
48277 : WIFI : AP Mode ssid will be NodeMCU7_47 with address 192.168.4.1
48277 : WIFI : Connecting lada attempt #8

Wemos D1 mini and clone D1 mini modules work well.

@Grovkillen
Copy link
Member

I got that one pictured (at my office) I might be able to test it myself on Friday when I'm back.

@TD-er
Copy link
Member

TD-er commented Nov 7, 2018

Can you give the information from the sysinfo page?
Just to check if there is some difference in the nodes.

@TD-er
Copy link
Member

TD-er commented Nov 7, 2018

Oh and could you maybe try to set the wifi credentials using the (latest) version of @Grovkillen flash tool (included in the zip) and als try to set the IP settings to static. (in a second attempt)

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

I've just upgrade to mega-20181107 (file ESP_Easy_mega-20181107_normal_ESP8266_4096.bin) and set the wifi credentials using the (latest) version of @Grovkillen flash tool (included in the zip) and now it's working.

Sysinfo page:

Unit: 47
Local Time: 2018-11-07 16:15:12
Uptime: 0 days 0 hours 5 minutes
Load: 3.30% (LC=12452)
Free Mem: 17320 (14984 - sendContentBlocking)
Free Stack: 3584 (1728 - ExecuteCommand)
Boot: Manual reboot (7)
Reset Reason: External System
Network ❔
Wifi: 802.11N (RSSI -49 dB)
IP config: DHCP
IP / subnet: 192.168.44.192 / 255.255.255.0
GW: 192.168.44.1
Client IP: 192.168.44.150
DNS: 1.0.0.1 / 1.1.1.1
Allowed IP Range: All Allowed
STA MAC: 60:01:94:35:C8:BC
AP MAC: 62:01:94:35:C8:BC
SSID: lada (06:18:D6:C1:B0:03)
Channel: 1
Connected: 5 m 9 s
Last Disconnect Reason: (1) Unspecified
Number reconnects: 0
Firmware
Build:⋄ 20102 - Mega
Libraries:⋄ ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3
GIT version:⋄ mega-20181107
Plugins:⋄ 46 [Normal]
Build Md5: 9ea46e7428c174166f90298a7ed1a5f2
Md5 check: passed.
Build time:⋄ Nov 7 2018 03:33:40
Binary filename:⋄ ESP_Easy_mega-20181107_normal_ESP8266_4096.bin
System Status
Syslog Log Level: None
Serial Log Level: Debug
Web Log Level: None
ESP board
ESP Chip ID: 3524796 (0x35C8BC)
ESP Chip Freq: 80 MHz
ESP Board Name: PLATFORMIO_ESP12E
Storage
Flash Chip ID: Vendor: 0xEF Device: 0x4016
Flash Chip Real Size: 4096 kB
Flash IDE Size: 4096 kB
Flash IDE speed: 40 MHz
Flash IDE mode: DIO
Flash Writes: 2 daily / 2 boot
Sketch Size: 744 kB (2324 kB free)
SPIFFS Size: 934 kB (860 kB free)

@Grovkillen
Copy link
Member

So we can close this issue then? 👍

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

Yesterday I was testing mega-20181023 version that did not work and mega-20181022 version that did work. Now I'm going to test mega-20181106 version...

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

please, do not close it yet

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

Downgrade to mega-20181106 version via OTA ==> WiFi don't work

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

Flash ESP_Easy_mega-20181106_normal_ESP8266_4096.bin with ESP Easy Flasher ==> WiFi don't work

@Grovkillen
Copy link
Member

So yesterdays release is misbehaving. What have changed between those two releases? Not much?

@TD-er
Copy link
Member

TD-er commented Nov 7, 2018

I changed a lot of strings to reduce amount of space used.

@Grovkillen
Copy link
Member

But you changed it to work?

@TD-er
Copy link
Member

TD-er commented Nov 7, 2018

But you changed it to work?

Yesterday I only merged the commits regarding OTA updates
So it should mainly be string related.

I hope I did proper search/replace queries, but maybe something may have changed, regarding wifi setup.

@Grovkillen
Copy link
Member

Today's release seems to work, yesterdays don't. Weird, build related perhaps.

@TD-er
Copy link
Member

TD-er commented Nov 7, 2018

Ah, maybe I fixed something too in the process ;)
Sorry, those things may happen..

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

ESP_Easy_mega-20181107_normal_ESP8266_4096 flashed via OTA ==> WiFi works OK

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

So today's release seems to work, but no. I've compiled from sources in the zip file and WiFi doesn't work again.
I've flashed my compiled version on D1 mini and WiFi works OK.

@TD-er
Copy link
Member

TD-er commented Nov 7, 2018

Have you tried to compile it twice before flashing? (assuming you're using PlatformIO)
And there seems to be a difference in alignment of data when building on Windows or Linux (according to threads on Tasmota/Espruna issues lists)

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

No, I haven't. I use PlatformIO with VS code on Windows 10.
OK, I'm going to compile twice and try it. I tell you.

@svmac
Copy link
Contributor

svmac commented Nov 7, 2018

@TD-er I 've runned task PlatformIO: Build (normal_ESP8266_4096) twice and get this log. Do you mean this?

Executing task: C:\Users\salva.platformio\penv\Scripts\platformio.exe run --environment normal_ESP8266_4096 <

Processing normal_ESP8266_4096 (framework: arduino; platform: espressif8266@1.8.0; board: esp12e)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 > Espressif ESP8266 ESP-12E
SYSTEM: ESP8266 80MHz 80KB RAM (4MB Flash)
Converting ESPEasy.ino
C:/Users/salva/Documents/GitHub/ESPEasy_mega-20181107/source/src/_P016_IR.ino:72:0: warning: "P016_TIMEOUT" redefined [enabled by default]
#define P016_TIMEOUT 15U // Suits most messages, while not swallowing many repeats.
^
C:/Users/salva/Documents/GitHub/ESPEasy_mega-20181107/source/src/_P016_IR.ino:68:0: note: this is the location of the previous definition
#define P016_TIMEOUT 50U // Some A/C units have gaps in their protocols of ~40ms.
^
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 56 compatible libraries
Scanning dependencies...
Dependency Graph
|-- 1.0
| |-- 1.0
| |-- 1.0
| | |-- 1.0
|-- 2.0.0
| |-- 3.3.1
|-- 1.0
|--
|-- 1.0
|-- 1.0.0
| |-- 1.0
|-- 5.13.2
|-- 1.0.2
|-- <ESP8266_SSD1306> 3.2.7
| |-- 1.0
| |-- 1.0
|-- <LiquidCrystal_I2C>
| |-- 1.0
|-- 1.0
|-- 0.0.1
| |-- 3.3.1
|-- 0.0.1
|-- 1.0
|-- <SD(esp8266)> 1.0.5
| |-- 1.0
|-- 1.0.2
| |-- 1.0.2
| |-- 1.0
|-- 1.0
| |-- 1.0
| |--
| | |-- 1.0
|-- <Servo(esp8266)> 1.0.2
|-- 3.3.1
|-- 1.4.2
| |-- 1.0
|--
| |-- 1.0
|-- 1.0.4
| |-- 1.0
|-- 2.6
|-- 1.0.1
| |-- 1.0
|-- 1.1.0
| |-- 1.0
|--
| |-- 1.0
|--
| |-- 1.0
|-- 1.0.0
|-- 1.0
| |-- 1.0
|-- <AS_BH1750>
| |-- 1.0
|-- 1.0.6
|--
|-- 0.0.1
| |-- 1.0
Compiling .pioenvs\normal_ESP8266_4096\libdc8\pubsubclient\PubSubClient.cpp.o
Compiling .pioenvs\normal_ESP8266_4096\src\ESPEasy.ino.cpp.o
Linking .pioenvs\normal_ESP8266_4096\firmware.elf
Retrieving maximum program size .pioenvs\normal_ESP8266_4096\firmware.elf
Building .pioenvs\normal_ESP8266_4096\firmware.bin
Checking size .pioenvs\normal_ESP8266_4096\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [====== ] 55.4% (used 45376 bytes from 81920 bytes)
PROGRAM: [======= ] 73.2% (used 764896 bytes from 1044464 bytes)
============================================== [SUCCESS] Took 57.89 seconds ==============================================

======================================================= [SUMMARY] =======================================================
Environment esp-wrover-kit_test_1M8_partition [SKIP]
Environment esp32dev [SKIP]
Environment esp32test_1M8_partition [SKIP]
Environment normal_ESP8266_1024 [SKIP]
Environment minimal_ESP8266_1024_OTA [SKIP]
Environment minimal_ESP8285_1024_OTA [SKIP]
Environment normal_core_241_ESP8266_1024 [SKIP]
Environment normal_ESP8285_1024 [SKIP]
Environment normal_WROOM02_2048 [SKIP]
Environment normal_ESP8266_4096 [SUCCESS]
Environment normal_core_241_ESP8266_4096 [SKIP]
Environment normal_IR_ESP8266_4096 [SKIP]
Environment test_ESP8266_1024 [SKIP]
Environment test_ESP8285_1024 [SKIP]
Environment test_WROOM02_2048 [SKIP]
Environment test_ESP8266_4096 [SKIP]
Environment test_ESP8266_4096_VCC [SKIP]
Environment dev_ESP8266_1024 [SKIP]
Environment dev_ESP8285_1024 [SKIP]
Environment dev_WROOM02_2048 [SKIP]
Environment dev_ESP8266_4096 [SKIP]
Environment dev_ESP8266PUYA_1024 [SKIP]
Environment dev_ESP8266PUYA_1024_VCC [SKIP]
Environment hard_SONOFF_POW [SKIP]
Environment hard_SONOFF_POW_R2_4M [SKIP]
Environment hard_Shelly_1 [SKIP]
Environment hard_Ventus_W266 [SKIP]
============================================== [SUCCESS] Took 57.94 seconds ==============================================

Las tareas reutilizarán el terminal, presione cualquier tecla para cerrarlo.

Executing task: C:\Users\salva.platformio\penv\Scripts\platformio.exe run --environment normal_ESP8266_4096 <

Processing normal_ESP8266_4096 (framework: arduino; platform: espressif8266@1.8.0; board: esp12e)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif8266/esp12e.html
PLATFORM: Espressif 8266 > Espressif ESP8266 ESP-12E
SYSTEM: ESP8266 80MHz 80KB RAM (4MB Flash)
Converting ESPEasy.ino
C:/Users/salva/Documents/GitHub/ESPEasy_mega-20181107/source/src/_P016_IR.ino:72:0: warning: "P016_TIMEOUT" redefined [enabled by default]
#define P016_TIMEOUT 15U // Suits most messages, while not swallowing many repeats.
^
C:/Users/salva/Documents/GitHub/ESPEasy_mega-20181107/source/src/_P016_IR.ino:68:0: note: this is the location of the previous definition
#define P016_TIMEOUT 50U // Some A/C units have gaps in their protocols of ~40ms.
^
Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF MODES: FINDER(chain) COMPATIBILITY(soft)
Collected 56 compatible libraries
Scanning dependencies...
Dependency Graph
|--
|-- 1.0
| |-- 1.0
| |-- 1.0
| | |-- 1.0
|-- 1.0
|-- 0.0.1
| |-- 1.0
|-- 1.0.2
| |-- 1.0.2
| |-- 1.0
|-- 1.0.0
| |-- 1.0
|-- 5.13.2
|-- 1.0.2
|-- <ESP8266_SSD1306> 3.2.7
| |-- 1.0
| |-- 1.0
|-- <LiquidCrystal_I2C>
| |-- 1.0
|-- 1.0
|-- 0.0.1
| |-- 3.3.1
|-- 1.0
|-- 0.0.1
|-- 2.0.0
| |-- 3.3.1
|-- 1.0
|-- <SD(esp8266)> 1.0.5
| |-- 1.0
|-- 1.0.6
|-- 1.0
| |-- 1.0
| |--
| | |-- 1.0
|-- <Servo(esp8266)> 1.0.2
|-- 3.3.1
|-- 1.4.2
| |-- 1.0
|--
| |-- 1.0
|-- 1.0.4
| |-- 1.0
|--
|-- 1.0.1
| |-- 1.0
|-- 1.1.0
| |-- 1.0
|--
| |-- 1.0
|--
| |-- 1.0
|-- 1.0.0
|-- 1.0
| |-- 1.0
|-- <AS_BH1750>
| |-- 1.0
|-- 2.6
Compiling .pioenvs\normal_ESP8266_4096\src\ESPEasy.ino.cpp.o
Linking .pioenvs\normal_ESP8266_4096\firmware.elf
Retrieving maximum program size .pioenvs\normal_ESP8266_4096\firmware.elf
Building .pioenvs\normal_ESP8266_4096\firmware.bin
Checking size .pioenvs\normal_ESP8266_4096\firmware.elf
Memory Usage -> http://bit.ly/pio-memory-usage
DATA: [====== ] 55.4% (used 45368 bytes from 81920 bytes)
PROGRAM: [======= ] 73.2% (used 764896 bytes from 1044464 bytes)
============================================== [SUCCESS] Took 55.91 seconds ==============================================

======================================================= [SUMMARY] =======================================================
Environment esp-wrover-kit_test_1M8_partition [SKIP]
Environment esp32dev [SKIP]
Environment esp32test_1M8_partition [SKIP]
Environment normal_ESP8266_1024 [SKIP]
Environment minimal_ESP8266_1024_OTA [SKIP]
Environment minimal_ESP8285_1024_OTA [SKIP]
Environment normal_core_241_ESP8266_1024 [SKIP]
Environment normal_ESP8285_1024 [SKIP]
Environment normal_WROOM02_2048 [SKIP]
Environment normal_ESP8266_4096 [SUCCESS]
Environment normal_core_241_ESP8266_4096 [SKIP]
Environment normal_IR_ESP8266_4096 [SKIP]
Environment test_ESP8266_1024 [SKIP]
Environment test_ESP8285_1024 [SKIP]
Environment test_WROOM02_2048 [SKIP]
Environment test_ESP8266_4096 [SKIP]
Environment test_ESP8266_4096_VCC [SKIP]
Environment dev_ESP8266_1024 [SKIP]
Environment dev_ESP8285_1024 [SKIP]
Environment dev_WROOM02_2048 [SKIP]
Environment dev_ESP8266_4096 [SKIP]
Environment dev_ESP8266PUYA_1024 [SKIP]
Environment dev_ESP8266PUYA_1024_VCC [SKIP]
Environment hard_SONOFF_POW [SKIP]
Environment hard_SONOFF_POW_R2_4M [SKIP]
Environment hard_Shelly_1 [SKIP]
Environment hard_Ventus_W266 [SKIP]
============================================== [SUCCESS] Took 55.96 seconds ==============================================

@redskinhu
Copy link

Yes, sometimes the module needs couple of tries to connect to the AP after start/reboot. But after working fine.

I'll try this multiple AP thing on Tuesday.

@TD-er
Copy link
Member

TD-er commented Nov 24, 2018

I will have a look to see if we can set the BSSID locked.
This has been discussed before.
Do you have multiple access points with the same SSID running?

@TD-er
Copy link
Member

TD-er commented Nov 24, 2018

I just added a build flag to the common section in platformio.ini.
See this commit: 44a23fb

I will make a test build for this so we can test the effect on multiple nodes.

@TD-er
Copy link
Member

TD-er commented Nov 24, 2018

I just made a test build with this flag active.

Can you test it?

@redskinhu
Copy link

Test build tested: NG
mega-20181124: OK (i saw the changelog, nothing has changed since 22)

I have couple of routers hanging around. Could you explain this multiple AP thing? I know the router side. How should i configure the ESPEasy? What is the fallback SSID? Same like the the primary? How can i force the ESPEasy to connect the weaker AP first? I can try it on Tuesday maybe Monday.

@TD-er
Copy link
Member

TD-er commented Nov 24, 2018

There are some circumstances when you may have multiple accesspoints with the same SSID.
For example:

  • Using a repeater
  • WiFi mesh setup

At this moment you can only define the SSID/passwd in ESPeasy, but at initial configuration you can select one from a WiFi scan result.
It is also possible to give the BSSID at connection in the Arduino libraries. So it could very well be possible to differentiate on different access points, even when they have the same SSID.

So there may be the possibility the ESP module is connecting to the weakest one when making the initial connect. But if we add some BSSID to the settings, we can make sure it is only trying to connect to the preferred one.
So if you could try to connect to one accesspoint which is not sharing the SSID with another one, you also know for sure it is only attempting to connect to that only one AP.

@redskinhu
Copy link

Ok, everything is clear now. Test on Tuesday.

mega-20181125 tested: NG

#2088 Looks same issue to me...

@redskinhu
Copy link

redskinhu commented Nov 27, 2018

Hi

Test results of the ESPEasy_mega-20181121-10-g58278ab (and ESPEasy_mega-20181127 too):

  • I can't connect to the "ESP_Easy_0" AP hence the "Authentication error occured" error. WPA key: configesp
  • I tried to change the key using the WifiAPKey command but i got "Unknown command!" error on many releases, i didn't tested all.
  • I tested the always good ESPEasy_mega-20180818, I can connect to the "ESP_Easy_0" AP with the configesp key and after the AP setup everything is working fine. Except the WifiAPKey command.

So i couldn't test this multiple AP thing :-(

I haven't used this EasySetup thing for a long time (serial is easier to me). Meanwhile is the default WPAkey has changed?

Off:
In the docs the "WiFi#ChangedAccesspoint" section is wrong.
The example is:on MQTTimport#Connected do

@nekakvoime
Copy link

hi. the connection to wifi ESP_Easy_mega-20181231_normal_ESP8266_4096 works with post flash action static ip but the ESP_Easy_mega-20181231_normal_IR_ESP8266_4096 and any other ir bin up to xxx09 does not work (even if you flash it over with working bin but if you flash over non working bin with working bin it still will not work). is it posible to replace working wifi bin code to ir bin?

@redskinhu
Copy link

Hi

The latest fw which can connect to the wifi is: 20181124.

I tested the all of which has issued after that: no joy. :(

T

@redskinhu
Copy link

Hi

I saw this new fw with some wifi changes so i tested them 2.4.2 and 2.5.0 too:

Originally installed: 20181124 (working fine)

Results:

Start after OTA ESP_Easy_mega-20190116_test_ESP8266_4096_VCC.bin
Webpage sometimes reachable sometimes not. Mostly not.

Log:

Rebooting...

 ets Jan  8 2013,rst cause:2, boot mode:(3,7)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
vbb28d4a3
@cp:0
     ld
       ▒U11498 :

INIT : Booting version: mega-20190116 (ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support)
11498 : INIT : Cold Boot - Restart Reason: Software/System restart
11501 : FS   : Mounting...
11526 : FS   : Mount successful, used 76555 bytes of 957314
11934 : CRC  : program checksum       ...OK
11971 : CRC  : SecuritySettings CRC   ...OK
11973 : CRC  : binary has changed since last save of Settings

Build changed!
12081 : SaveToFile: free stack: 3696
12159 : FILE : Saved config.dat
12160 : SaveToFile: free stack after: 3696
12163 : SaveToFile: free stack: 3696
12199 : FILE : Saved security.dat
12200 : SaveToFile: free stack after: 3696
12201 : INIT : Free RAM:23656
12203 : INIT : SPI not enabled
12245 : INFO : Plugins: 74 [Normal] [Testing] (ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support)
12246 : EVENT: System#Wake
12311 : WIFI : Set WiFi to STA
12344 : WIFI : Connecting APNAME attempt #0
12345 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
12461 : EVENT: System#Boot
12483 : SW   : State 1.00
12486 : EVENT: Flash#Button=1.00
12546 : SW  : GPIO=0 State=1 Output value=0
12548 : EVENT: Flash#Button=0.00
12739 : SYS  : 0.00,100.00,2.99,20512.00
12743 : EVENT: SysInfo#Uptime=0.00
12759 : EVENT: SysInfo#Load=100.00
12772 : EVENT: SysInfo#VCC=3.40
12787 : EVENT: SysInfo#Free_RAM=20512.00
13809 : WD   : Uptime 0 ConnectFailures 0 FreeMem 20520
17235 : WIFI : Connected! AP: APNAME (XX:XX:79:94:XX:XX) Ch: 1 Duration: 4789 ms
17237 : EVENT: WiFi#ChangedAccesspoint
17254 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
17255 : WIFI : Static IP: 192.168.1.230 (Test30-WMD1-30) GW: 192.168.1.1 SN: 255.255.255.0   duration: 120 ms
17269 : EVENT: WiFi#Connected
17286 : Webserver: start
17316 : NTP  : NTP replied: delay 21 mSec Accuracy increased by 0.272 seconds
17318 : Time adjusted by -1547663626978.76 msec. Wander: -429906563.05 msec/second
17319 : Current Time Zone:  DST time start: 2019-03-31 02:00:00 offset: 60 minSTD time start: 2019-10-27 03:00:00 offset: 0 min
17323 : EVENT: Time#Initialized
17335 : ACT  : TimerSet,1,7
17347 : Command: timerset
17361 : EVENT: Clock#Time=Wed,18:34
17380 : MQTT : Intentional reconnect
17782 : MQTT : Connected to broker with client ID: Test30_WMD1_30
17786 : Subscribed to: home/Test30_WMD1/#
17789 : EVENT: MQTT#Connected
17930 : SW   : State 0.00
17934 : EVENT: Flash#Button=0.00
18318 : SYS  : 0.00,52.10,2.99,14736.00
18323 : EVENT: SysInfo#Uptime=0.00
18339 : EVENT: SysInfo#Load=52.10
18354 : EVENT: SysInfo#VCC=3.40
18369 : EVENT: SysInfo#Free_RAM=14736.00
25253 : EVENT: Rules#Timer=1
25269 : ACT  : Publish home/Test30_WMD1/MACaddress,5C:CF:7F:A4:51:EC
25279 : Command: publish
25287 : ACT  : Publish home/Test30_WMD1/UnitName,Test30_WMD1
25297 : Command: publish
25305 : ACT  : Publish home/Test30_WMD1/UnitNr,30
25315 : Command: publish
25322 : ACT  : Publish home/Test30_WMD1/IPaddress,192.168.1.230
25336 : Command: publish
25340 : ACT  : Notify 1
25350 : Command: notify
25465 : Email: To somebody@somewhere.com
25520 : EMAIL: Connection Closed Successfully
26291 : EVENT: WiFi#Disconnected
26307 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 9055 ms
26326 : MQTT : Connection lost, state: Connection lost
26327 : EVENT: MQTT#Disconnected
26345 : WIFI : Connecting APNAME attempt #0
26347 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
28299 : WIFI : Connected! AP: APNAME (XX:XX:79:94:XX:XX) Ch: 1 Duration: 1852 ms
28301 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
28302 : WIFI : Static IP: 192.168.1.230 (Test30-WMD1-30) GW: 192.168.1.1 SN: 255.255.255.0   duration: 103 ms
28317 : EVENT: WiFi#Connected
28430 : NTP  : NTP replied: delay 90 mSec Accuracy increased by 0.350 seconds
28431 : Time adjusted by -57.78 msec. Wander: -0.02 msec/second
28435 : EVENT: Time#Set
28457 : MQTT : Intentional reconnect
28962 : MQTT : Connected to broker with client ID: Test30_WMD1_30
28966 : Subscribed to: home/Test30_WMD1/#
28969 : EVENT: MQTT#Connected
29296 : SW   : State 0.00
29300 : EVENT: Flash#Button=0.00
29498 : SYS  : 0.00,52.10,2.99,12232.00
29504 : EVENT: SysInfo#Uptime=0.00
29521 : EVENT: SysInfo#Load=52.10
29536 : EVENT: SysInfo#VCC=3.40
29553 : EVENT: SysInfo#Free_RAM=12232.00
37559 : EVENT: WiFi#Disconnected
37575 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 9257 ms
37675 : MQTT : Connection lost, state: Connection lost
37676 : EVENT: MQTT#Disconnected
38254 : WIFI : Connecting APNAME attempt #0
38255 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
38556 : WIFI : Connected! AP: APNAME (XX:XX:79:94:XX:XX) Ch: 1 Duration: 200 ms
38557 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
38559 : WIFI : Static IP: 192.168.1.230 (Test30-WMD1-30) GW: 192.168.1.1 SN: 255.255.255.0   duration: 103 ms
38574 : EVENT: WiFi#Connected
38674 : MQTT : Intentional reconnect
39091 : MQTT : Connected to broker with client ID: Test30_WMD1_30
39095 : Subscribed to: home/Test30_WMD1/#
39098 : EVENT: MQTT#Connected
39239 : SW   : State 0.00
39243 : EVENT: Flash#Button=0.00
39313 : NTP  : NTP replied: delay 20 mSec Accuracy increased by 0.270 seconds
39314 : Time adjusted by -61.77 msec. Wander: -0.02 msec/second
39318 : EVENT: Time#Set
39627 : SYS  : 0.00,52.10,2.99,12288.00
39633 : EVENT: SysInfo#Uptime=0.00
39650 : EVENT: SysInfo#Load=52.10
39665 : EVENT: SysInfo#VCC=3.40
39682 : EVENT: SysInfo#Free_RAM=12288.00
43810 : WD   : Uptime 1 ConnectFailures 0 FreeMem 13128
47901 : EVENT: WiFi#Disconnected
47918 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 9344 ms
48056 : MQTT : Connection lost, state: Connection lost
48057 : EVENT: MQTT#Disconnected
48253 : WIFI : Connecting APNAME attempt #0
48255 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
48479 : EVENT: WiFi#Disconnected
48495 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 122 ms
50253 : WIFI : Connecting APNAME attempt #1
50254 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
54339 : WIFI : Connected! AP: APNAME (XX:XX:79:94:XX:XX) Ch: 1 Duration: 3983 ms
54340 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
54342 : WIFI : Static IP: 192.168.1.230 (Test30-WMD1-30) GW: 192.168.1.1 SN: 255.255.255.0   duration: 103 ms
54357 : EVENT: WiFi#Connected
54449 : NTP  : NTP replied: delay 71 mSec Accuracy increased by 0.398 seconds
54450 : Time adjusted by -65.32 msec. Wander: -0.02 msec/second
54454 : EVENT: Time#Set
54479 : MQTT : Intentional reconnect
54884 : MQTT : Connected to broker with client ID: Test30_WMD1_30
54889 : Subscribed to: home/Test30_WMD1/#
54891 : EVENT: MQTT#Connected
55033 : SW   : State 0.00
55037 : EVENT: Flash#Button=0.00
55421 : SYS  : 1.00,18.10,2.99,11504.00
55426 : EVENT: SysInfo#Uptime=1.00
55443 : EVENT: SysInfo#Load=18.10
55459 : EVENT: SysInfo#VCC=3.40
55475 : EVENT: SysInfo#Free_RAM=11504.00
68069 : EVENT: WiFi#Disconnected
68085 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 13 s
68206 : MQTT : Connection lost, state: Connection lost
68207 : EVENT: MQTT#Disconnected

Start after OTA ESP_Easy_mega-20190116_test_core_250_beta_ESP8266_4096_VCC.bin
No connection.

INIT : Booting version: mega-20190116 (ESP82xx Core 2.5.0-beta2, NONOS SDK 3.0.0-dev(c0f7b44), LWIP: 2.1.2 PUYA support)
11692 : INIT : Cold Boot - Restart Reason: Software/System restart
11696 : FS   : Mounting...
11727 : FS   : Mount successful, used 76555 bytes of 957314
12154 : CRC  : program checksum       ...OK
12167 : CRC  : SecuritySettings CRC   ...OK 
12169 : CRC  : binary has changed since last save of Settings

Build changed!
12278 : SaveToFile: free stack: 3696
12394 : FILE : Saved config.dat
12395 : SaveToFile: free stack after: 3696
12399 : SaveToFile: free stack: 3696
12452 : FILE : Saved security.dat
12453 : SaveToFile: free stack after: 3696
12455 : INIT : Free RAM:20464
12457 : INIT : SPI not enabled
12509 : INFO : Plugins: 74 [Normal] [Testing] (ESP82xx Core 2.5.0-beta2, NONOS SDK 3.0.0-dev(c0f7b44), LWIP: 2.1.2 PUYA support)
12510 : EVENT: System#Wake
12585 : WIFI : Set WiFi to STA
12621 : WIFI : Connecting APNAME attempt #0
12622 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
12741 : EVENT: System#Boot
12779 : SW   : State 1.00
12782 : EVENT: Flash#Button=1.00
12857 : SW  : GPIO=0 State=1 Output value=0
12860 : EVENT: Flash#Button=0.00
12997 : SYS  : 0.00,100.00,2.99,16336.00
13003 : EVENT: SysInfo#Uptime=0.00
13028 : EVENT: SysInfo#Load=100.00
13050 : EVENT: SysInfo#VCC=3.40
13075 : EVENT: SysInfo#Free_RAM=16336.00
14103 : WD   : Uptime 0 ConnectFailures 0 FreeMem 16344
23547 : WIFI : Connecting APNAME attempt #1
23548 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
44101 : WD   : Uptime 1 ConnectFailures 0 FreeMem 16600
45550 : WIFI : Connecting APNAME attempt #2
45551 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
60565 : EVENT: Clock#Time=Thu,00:01
68549 : WIFI : Connecting APNAME attempt #3
68551 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
72607 : SW   : State 0.00
72611 : EVENT: Flash#Button=0.00
74102 : WD   : Uptime 1 ConnectFailures 0 FreeMem 16600
83265 : EVENT: WiFi#Disconnected
83287 : WIFI : Disconnected! Reason: '(7) Not assoced' Connected for 14 s
83546 : WIFI : Connecting APNAME attempt #4
83547 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
84772 : EVENT: WiFi#Disconnected
84794 : WIFI : Disconnected! Reason: '(2) Auth expire' Connected for 1123 ms
86547 : WIFI : Connecting APNAME attempt #5
86548 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
87784 : EVENT: WiFi#Disconnected
87806 : WIFI : Disconnected! Reason: '(4) Assoc expire' Connected for 1134 ms
89547 : WIFI : Set WiFi to AP+STA
90472 : EVENT: WiFi#APmodeEnabled
90501 : WIFI : AP Mode ssid will be Test30_WMD1_30 with address 192.168.4.1
90502 : WIFI : Connecting APNAME attempt #6
90503 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
90728 : EVENT: WiFi#Disconnected
90755 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 122 ms
93546 : WIFI : Connecting APNAME attempt #7
93548 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
96524 : EVENT: WiFi#Disconnected
96547 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2873 ms
96558 : WIFI : Connecting APNAME attempt #8
96559 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
100544 : EVENT: WiFi#Disconnected
100568 : WIFI : Disconnected! Reason: '(4) Assoc expire' Connected for 3883 ms
100580 : WIFI : Connecting APNAME attempt #9
100581 : IP   : Static IP : 192.168.1.230 GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
104102 : WD   : Uptime 2 ConnectFailures 0 FreeMem 14480
104562 : EVENT: WiFi#Disconnected

The ball is on your side now... ;-)

Thanks
T

@TD-er
Copy link
Member

TD-er commented Jan 16, 2019

Hmm too bad :(
I had really good hopes for this one as soon as I saw the commit on the Arduino repository.

@redskinhu
Copy link

Yes the 2.5.0 looks worse than 2.4.2, but i dont give up. I tried every release anyway. The last working release is 20181124.

@redskinhu
Copy link

20190121 2.5.0 / 2.4.2 tested, same like 20190116.

@JanSpacil
Copy link

I found the same problem with the same board .. last working fw , that I found till today, is ESP_Easy_mega-20190212_dev_ESP8266_4096.bin

@AndrySkuridin
Copy link

i have same problem with same board :(

@TD-er
Copy link
Member

TD-er commented Jul 23, 2019

The current code in the mega branch does have issues connecting to WiFi.
I've been working on it for almost the entire Sunday but it is not fixed yet.
It is almost like a very timing critical bug which may prevent it to connect to WiFi.
There is one somewhat unique timing factor in the connection procedure. Some delay is used based on the last byte of the MAC address to introduce some randomness to prevent a DDOS-like attack on a server/broker after the power has been restored for lots of nodes.

But right now it almost feels random whether a node can connect to WiFi. (just pick another core version or number of plugins included and it may fail or succeed)

@wettermann32
Copy link

wettermann32 commented Aug 10, 2019

Just started with ESPEasy, I cant connect to WiFi also.
Using the build 09.08.2019 and one before, flashed blank Image before, tried with or without mesh WiFi (Fritzbox 7590), add WiFi credentials via ESP Easy Flash Tool
Always get the "beacon timeout" every 1000ms in a loop

Is there a older version i could use?

443329 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 8609 ms
443582 : WIFI : Connecting mywifi attempt #0
443587 : WIFI : WiFi.status() = WL_DISCONNECTED  SSID: mywifi
444806 : WIFI : Connected! AP: mywifi (E0:22:6D:44:DC:53) Ch: 11 Duration: 1048 ms
444808 : WIFI : DHCP IP: 192.168.178.129 (PressureESP-0) GW: 192.168.178.1 SN: 255.255.255.0   duration: 170 ms
452116 : WD   : Uptime 8 ConnectFailures 0 FreeMem 23448 WiFiStatus 3

@Grovkillen
Copy link
Member

You may try setting up a AP using your phone and see if the problem still persists.

@TD-er
Copy link
Member

TD-er commented Aug 10, 2019

Things to check: (we should make a link for this somewhere)

  • Power stability (add capacitors, good USB cable, etc), newer modules do have low power voltage regulators.
  • No metal near the WiFi antenna
  • Try sending ping packets to the ESP node from another host

WiFi credentials seem OK, since you do get a connection.

You can try a build from around begin 2018 to be sure the module is OK.
Those versions did not use newer core versions and were not as fast, so less demanding of the ESP at startup.

@wettermann32
Copy link

Thanks for your quick answer. I have tested with 3 different HWs (Wemos NodeMCUs), Used Laptop USB Port as Powersupply but also tried external Power (no debug, but no connect to hotspot also). Tried different cable. Tried to test directly in front of the hotspot. No ping replies received from node MCU.

On Tablet Hotspot I'll get every 2853ms:
3803 : WIFI : Disconnected! Reason: '(201) No AP found' Connected for 2852 ms

will test with older builds

@wettermann32
Copy link

wettermann32 commented Aug 10, 2019

Here is the new Status:
Version from 28.02.2018 works as expected.
Latest Version does not work, WiFi connects and disconnects every second:

connected with mywifi, channel 11
dhcp client start...
82812 : WIFI : Connected! AP: mywifi (E0:26:6F:55:EC:63) Ch: 11 Duration: 1059 ms
ip:192.168.178.116,mask:255.255.255.0,gw:192.168.178.1
84684 : WIFI : DHCP IP: 192.168.178.116 (PressureESP-0) GW: 192.168.178.1 SN: 255.255.255.0   duration: 2001 ms
bcn_timout,ap_probe_send_start
92126 : WD   : Uptime 2 ConnectFailures 0 FreeMem 23160 WiFiStatus 3
pm open,type:2 0
ap_probe_send over, rest wifi status to disassoc
state: 5 -> 0 (1)
rm 0
pm close 7
93210 : WIFI : Disconnected! Reason: '(200) Beacon timeout' Connected for 10 s

@redskinhu
Copy link

Hi

I moved to ESPHome. These boards are works perfectly with it.

If you're using Homeassistant maybe worth it to try.

Bye
T

@Grovkillen
Copy link
Member

I will close this, open if its still a valid issue.

WiFi stability and UX automation moved this from ToDo to Done Oct 11, 2019
Improve Stability automation moved this from Needs triage to Closed Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Energy Related to reduce power as much as possible. Category: Wifi Related to the network connectivity Type: Bug Considered a bug
Projects
Development

No branches or pull requests

10 participants