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

flash sonoff basic r2 after connect to wifi net, is impossible to see online #2931

Closed
2 tasks done
megamarco833 opened this issue Mar 7, 2020 · 297 comments · Fixed by #3148 or #3179
Closed
2 tasks done

flash sonoff basic r2 after connect to wifi net, is impossible to see online #2931

megamarco833 opened this issue Mar 7, 2020 · 297 comments · Fixed by #3148 or #3179
Labels
Category: Stabiliy Things that work, but not as long as desired Category: Wifi Related to the network connectivity Type: Bug Considered a bug

Comments

@megamarco833
Copy link

megamarco833 commented Mar 7, 2020

Checklist

  • The title of this issue is "to the point" and descriptive.
  • This issue describes what is happening.
    i have some sonoff basic R2 V1 and i try to flash with new version of espeasy.
    i used DOUT
    and i succeeed. i see the ESP_Easy net, i connect to it ad i give my password and SSID of internal net.
    when ESP reboot it's impossible to ping and open the sonoff on the internal net and ESP_Easy net desappear.
    I try to use fw:
    ESP_Easy_mega-20200204_normal_ESP8266_1M_VCC
    ESP_Easy_mega-20200204_normal_ESP8266_1M
    ESP_Easy_mega-20200204_normal_sdk3_ESP8266_1M

all same issue: after connecting ESP_Easy net and give internal SSID and password, is impossible to see on internal net the sonoff and ESP_Easy net desapper
the only way of became it working is using old version of EspEasy where there was PUYAversion:
ESP_Easy_mega-20181023_dev_ESP8266PUYA_1024_VCC.bin
in this case no problems

how it can be solved?
thanks

@thomastech
Copy link
Contributor

thomastech commented Mar 10, 2020

I installed ESP_Easy_mega-20200222_normal_ESP8285_1M.bin on a couple Sonoff Basic R2's without issue. So if this bin does not work for you then more information would be helpful.

Flash again and connect using AP mode. After you enter the credentials, and before the reboot, go to the Tools=>Advanced=>Serial Log Level and set the serial log to debug. Submit (save).

The serial log will provide messages that may explain the problem. So launch your favorite serial terminal, reboot, and review all the messages from ESPEasy.

BTW, whenever problems occur from a firmware update it is wise to flash with the blank_1MB.bin file to clear out the Flash memory (removes old settings). Then flash the Mega Release.

  • Thomas

@TD-er
Copy link
Member

TD-er commented Mar 10, 2020

The last nightly build has the board_build.flash_mode set to dout, where in some builds it may still have been set to dio.

There is a difference between flashing mode (dout/dio/etc) and the build settings.
Flashing mode is used to actually write the sketch and maybe also switching some flag in the bootloader (depending on the used flash tool).
The build flag is used at run time to determine the possible flash mode.

Do you see the node connecting to the WiFi?
Does the ESP react to network activity after a few minutes?

@TD-er TD-er added Category: Stabiliy Things that work, but not as long as desired Category: Wifi Related to the network connectivity Type: Bug Considered a bug labels Mar 10, 2020
@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

I installed ESP_Easy_mega-20200222_normal_ESP8285_1M.bin on a couple Sonoff Basic R2's without issue. So if this bin does not work for you then more information would be helpful.

Flash again and connect using AP mode. After you enter the credentials, and before the reboot, go to the Tools=>Advanced=>Serial Log Level and set the serial log to debug. Submit (save).

The serial log will provide messages that may explain the problem. So launch your favorite serial terminal, reboot, and review all the messages from ESPEasy.

BTW, whenever problems occur from a firmware update it is wise to flash with the blank_1MB.bin file to clear out the Flash memory (removes old settings). Then flash the Mega Release.

* Thomas

hi, sure i always perfomr a blank_1MB.bin flash to eresa esp before flashing any fw
i used as tool ESP8266Flasher.exe under windows with DOUT and 1mb falsh size, budrate 115200
immagine

my sonoff is a sonoff basic and on pcb si written R2 v1.0 2017-10-11
i also a sonoff basic where is written on pcb sonoff TH (only one, the other three have on pcb the write R2)
al all sonoff is written on esp chip esp8266X
why you use as firmware: XXX_normall_ESP8285_1M.bin ? and not XXX_normall_ESP8266_1M.bin ?

anyway with XXX_normall_ESP8266_1M.bin the issue was that after flash, when i connect using AP mode to my internal newtwork,, after reboot i'm not able to see the sonoff on my network.
and when i'm in this situation the only solution is to flash again a new fw otherwise it's stuck because i can't find on my network and ESP_0 net desappear.
the only way to have sonoff visible on my network is only if i use the very old fw:
ESP_Easy_mega-20181023_dev_ESP8266PUYA_1024_VCC.bin

now i flash again with
Easy_mega-20200204_normal_ESP8266_1M.bin
but the problem is that when i enter on AP (http://192.168.4.1) and set my network, i can only click apply and then it reboot. so no way to activated the debug mode: Tools=>Advanced=>Serial Log Level
as i explain after the reboot i can not see on my internal network the new IP DHCP of the sonoff so i can't open web page Tools=>Advanced=>Serial Log Level

@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

Do you see the node connecting to the WiFi?

no, unfortunatly, after connecting to AP mode: 192.168.4.1 selecting my network SSID and enterin the password, the sonoff reboots and i can't see on my network

Does the ESP react to network activity after a few minutes?

no, i wait many minutes but i can't see it inside my network

EDIT: sorry, i add a note, when i connect to AP mode, the esp reboot and ESP_0 net disappear, and as i wrote it's no possible to have any IP inside my netword of this sonoff.
but if i power off and on after that, the ESP_0 network become visible (after many minutes) but at this time if i try to connect again on ESP_0 it connect but it's not possible to see web page 192.168.4.1
i receive an error on loading that page

@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

i have also try to flash:
ESP_Easy_mega-20200204_normal_ESP8285_1M.bin

in this case, after flashin appear ESP_Easy_0 network, i connect to that AP , i give credentianl of my network, it show the countdown, but after that sonoff remain connected at ESP_Easy_0
if i reboot sonoff the ESP_Easy_0 net become visible again, i can connect to that AP again but if i try to load 192.168.4.1 at this time it can not load the webpage and i receive a connection error.

latest attempts was done using:
ESP_Easy_mega-20200310_normal_ESP8266_1M.bin
and
ESP_Easy_mega-20200310_normal_ESP8285_1M.bin

nothing difference on behaviour except name of SSID that is now become ESP_Easy

@thomastech
Copy link
Contributor

thomastech commented Mar 10, 2020

@megamarco833:

why you use as firmware: XXX_normall_ESP8285_1M.bin ? and not XXX_normall_ESP8266_1M.bin ?

I made a bad assumption on which ESP chip was in your Sonoff Basic. Currently sold Sonoff Basics use ESP8285 (internal Flash). Older versions used ESP8266 (external Flash chip).

So no way to activated the debug mode: Tools=>Advanced=>Serial Log Level
as i explain after the reboot

Unfortunately it does not appear that you can enable the log using serial commands. As a workaround, try this: reload the working firmware, set the log level to debug, save, and confirm the log is running. Then load the new firmware (without blank bin file). With a bit of luck the old Tool settings will still exists and provide a working serial log.

@TD-er,
The log would tell us a lot about what is going on. Especially if this problem is due to the WiFi core library compatibility issue I ran into last week. Is there a "ALT-WIFI" related version in the latest mega release that the OP can try?

@megamarco833
Copy link
Author

i try also this: flash ESP_Easy_mega-20181023_dev_ESP8266PUYA_1024_VCC.bin
activate serial log as debug then flasg new fw: ESP_Easy_mega-20200204_normal_ESP8266_1M.bin
then i connect to AP ESP_Easy_0 but i can not see any log :(

@TD-er
Copy link
Member

TD-er commented Mar 10, 2020

env:normal_ESP8266_1M is using the regular platform, so it should have the "latest" SDK 22x settings.

These are the current settings for the used SDK 2.2.x builds:

[core_2_6_2]
platform = espressif8266@2.3.1
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#2.6.2
build_flags = ${esp82xx_2_6_x.build_flags}
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
[core_2_6_2_sdk3]
platform = espressif8266@2.3.1
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#2.6.2
build_flags = ${esp82xx_2_6_x.build_flags}
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
[core_2_6_3]
platform = espressif8266@2.3.2
platform_packages =
framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#2.6.3
build_flags = ${esp82xx_2_6_x.build_flags}
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122

These "new" settings are now the default since you last tested them:

[regular_platform]
build_unflags =
build_flags = ${core_2_6_3.build_flags}
platform = ${core_2_6_3.platform}
platform_packages = ${core_2_6_3.platform_packages}

So if the regular builds do not work and builds of about a week or a month ago also do not work, then we have another issue.

Also the settings do not seem to be saved, so I guess it has nothing to do with the WiFi but more with the way how flash is being saved.
The PUYA flash code should be in the core lib and active.

@thomastech
Copy link
Contributor

thomastech commented Mar 10, 2020

@megamarco833

then i connect to AP ESP_Easy_0 but i can not see any log :(

You won't see the serial log from the browser. You need to use a serial terminal communication program (puTTY, Arduino Terminal, etc.) and connect the serial port via USB.

First confirm the serial log is working when the "good" bin (ESP_Easy_mega-20181023_dev_ESP8266PUYA_1024_VCC) is running. After you see it working you can load the new firmware.

Also, the Expressif startup messages will appear on the serial port at reboot even with serial log disabled. Post the messages that appear. They will confirm that boot was successful.

With your serial terminal connected, enter this command in the terminal window:
settings
then press [enter].

It will report some useful setting info, like this example:

System Info
  IP Address    : 192.168.1.1
  Build         : 20104
  Name          : ESP_Easy_0
  Unit          : 0
  WifiSSID      : YOUR SSID HERE
  WifiKey       : YOUR WIFI PASSWORD HERE
  WifiSSID2     :
  WifiKey2      :
  Free mem      : 15592

@TD-er:

Also the settings do not seem to be saved, so I guess it has nothing to do with the WiFi but more with the way how flash is being saved.

Let's not give up on that yet and wait for more feedback. BTW, too bad that the various log levels cannot be set via serial terminal.

  • Thomas

@dwarf2k
Copy link

dwarf2k commented Mar 10, 2020

Keep in mind this is a Sonoff Basic R2 so runs at mains voltage. Hooking it to USB while plugged in can be dangerous.

@thomastech
Copy link
Contributor

Good reminder about mains voltage.

The serial terminal uses the USB port just like the flashing tool. The 3.3V power will come from USB.

Never connect Mains power when USB is connected. Otherwise prepare an updated will for the surviving family members.

  • Thomas

@megamarco833
Copy link
Author

Good reminder about mains voltage.

The serial terminal uses the USB port just like the flashing tool. The 3.3V power will come from USB.

Never connect Mains power when USB is connected. Otherwise prepare an updated will for the surviving family members.

* Thomas

i well know, but better underline :-)

@TD-er
Copy link
Member

TD-er commented Mar 10, 2020

Better to underline than to undertake....

@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

@thomastech

Also, the Expressif startup messages will appear on the serial port at reboot even with serial log disabled. Post the messages that appear. They will confirm that boot was successful.

With your serial terminal connected, enter this command in the terminal window:
settings
then press [enter].

i used putty with this is the log of fw with PUYA

266145 : WIFI : Set WiFi to AP+STA
336328 : WD   : Uptime 6 ConnectFailures 0 FreeMem 6336
336331 : LoopStats: shortestLoop: 60 longestLoop: 8498634 avgLoopDuration: 92.59 loopCounterMax: 500000 loopCounterLast: 343425 countFindPluginId: 0
336332 : Load File stats: Count: 2 Avg/min/max 3237.00/2267/4207 usec
336332 : Plugin call 50 p/s   stats: Count: 15634 Avg/min/max 120.05/77/327 usec
336333 : Plugin call 10 p/s   stats: Count: 3133 Avg/min/max 99.24/82/275 usec
336333 : Plugin call 10 p/s U stats: Count: 3133 Avg/min/max 1358.69/874/2807 usec
336334 : Plugin call  1 p/s   stats: Count: 318 Avg/min/max 392.87/184/35543 usec
336334 : setNewTimerAt()      stats: Count: 19709 Avg/min/max 118.82/51/329 usec
336335 : timeDiff()           stats: Count: 13574573 - CPU cycles per call: 8.37
336335 : Scheduler stats: (called/tasks/max_length/idle%) 4377321/19690/6/95.20
363799 : LoopStats: shortestLoop: 60 longestLoop: 8498634 avgLoopDuration: 78.16 loopCounterMax: 500000 loopCounterLast: 342260 countFindPluginId: 0
363800 : Plugin call 50 p/s   stats: Count: 1363 Avg/min/max 137.63/94/315 usec
363801 : Plugin call 10 p/s   stats: Count: 273 Avg/min/max 112.51/98/282 usec
363801 : Plugin call 10 p/s U stats: Count: 273 Avg/min/max 1719.42/1034/2764 usec
363802 : Plugin call  1 p/s   stats: Count: 27 Avg/min/max 475.22/442/531 usec
363802 : setNewTimerAt()      stats: Count: 1938 Avg/min/max 130.92/100/296 usec
363803 : timeDiff()           stats: Count: 1071406 - CPU cycles per call: 8.50
363803 : Scheduler stats: (called/tasks/max_length/idle%) 342260/1938/6/93.70
393799 : LoopStats: shortestLoop: 60 longestLoop: 8498634 avgLoopDuration: 76.62 loopCounterMax: 500000 loopCounterLast: 381230 countFindPluginId: 0
393800 : Plugin call 50 p/s   stats: Count: 1500 Avg/min/max 134.11/98/311 usec
393801 : Plugin call 10 p/s   stats: Count: 300 Avg/min/max 116.71/98/268 usec
393801 : Plugin call 10 p/s U stats: Count: 300 Avg/min/max 1643.16/1040/2049 usec
393802 : Plugin call  1 p/s   stats: Count: 30 Avg/min/max 463.80/391/566 usec
393802 : setNewTimerAt()      stats: Count: 2132 Avg/min/max 130.07/101/239 usec
393802 : timeDiff()           stats: Count: 1192814 - CPU cycles per call: 8.45
393803 : Scheduler stats: (called/tasks/max_length/idle%) 381230/2132/6/94.60
423799 : LoopStats: shortestLoop: 60 longestLoop: 8498634 avgLoopDuration: 76.62 loopCounterMax: 500000 loopCounterLast: 381252 countFindPluginId: 0
423800 : Plugin call 50 p/s   stats: Count: 1500 Avg/min/max 133.71/98/311 usec
423800 : Plugin call 10 p/s   stats: Count: 300 Avg/min/max 116.91/98/300 usec
423801 : Plugin call 10 p/s U stats: Count: 300 Avg/min/max 1648.86/1050/2063 usec
423801 : Plugin call  1 p/s   stats: Count: 30 Avg/min/max 465.87/413/552 usec
423802 : setNewTimerAt()      stats: Count: 2132 Avg/min/max 130.00/101/238 usec
423802 : timeDiff()           stats: Count: 1192879 - CPU cycles per call: 8.46
423803 : Scheduler stats: (called/tasks/max_length/idle%) 381252/2132/6/94.60

i can't write "settings" inside the command propt because it's not allow to write nothing.
this is the parameter that i used:
immagine

what's the next steps?

EDIT: this log is simply generated only connecting to AP, giving my network credentials, activate the serial log inside tools=>advanced=> serial log as debug
nothing else

@thomastech
Copy link
Contributor

i used putty with this is the log of fw with PUYA

So far so good.

i can't write "settings" inside the command propt because it's not allow to write nothing.
this is the parameter that i used:

Your PuTTY settings seem valid, but I suggest setting Flow Control to None.

Maybe the "settings" command did not exist in your old bin version? Here are some other commands to try out to help confirm that you can fully communicate with the device (each command must be followed by [Enter]).
ip
dns
wifiscan
reboot

If you do not have success then try the Serial Monitor feature that is provided in the ESP.Easy.Flasher.exe program (included in the ESPEasy firmware zip bundle).

After you are able to communicate, load the new firmware (do not use the blank bin).
Launch the serial terminal and confirm you have log messages.
Type the reboot command and capture all the messages (starting with the warm reboot).
Collect messages for a couple minutes. Then post the log, but obscure any private information.

  • Thomas

@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020


2283801 : LoopStats: shortestLoop: 60 longestLoop: 8498634 avgLoopDuration: 78.44 loopCounterMax: 500000 loopCounterLast: 372502 countFindPluginId: 0
2283802 : Plugin call 50 p/s   stats: Count: 1492 Avg/min/max 136.84/97/312 usec
2283802 : Plugin call 10 p/s   stats: Count: 299 Avg/min/max 112.09/98/287 usec
2283803 : Plugin call 10 p/s U stats: Count: 299 Avg/min/max 1670.76/1059/2764 usec
2283803 : Plugin call  1 p/s   stats: Count: 30 Avg/min/max 420.67/332/553 usec
2283804 : setNewTimerAt()      stats: Count: 2122 Avg/min/max 133.37/103/300 usec
2283804 : timeDiff()           stats: Count: 1166407 - CPU cycles per call: 8.46
2283805 : Scheduler stats: (called/tasks/max_length/idle%) 372502/2122/6/94.60
>ip

IP:192.168.0.26(DHCP)

Ok
2288653 : Command: ip
>dns

DNS:192.168.0.8(DHCP)

Ok
2312910 : WD   : Uptime 39 ConnectFailures 0 FreeMem 9144
>wifiscan
WIFI : SSID Scan start
WIFI : 4 networks found
WIFI : 1: NETGEAR xx:xx:xx:xx:xx:xx Ch:13 (-62dBm) WPA2/PSK
WIFI : 2: VodafoneASUS xx:xx:xx:xx:xx:xx Ch:13 (-79dBm) WPA2/PSK
WIFI : 3: Vodafone-WiFi xx:xx:xx:xx:xx:xx Ch:13 (-77dBm) open
WIFI : 4: DIRECT-a5M2070 Series xx:xx:xx:xx:xx:xx Ch:13 (-87dBm) WPA2/PSK


Ok
2312998 : Command: wifiscan
2314661 : LoopStats: shortestLoop: 60 longestLoop: 8498634 avgLoopDuration: 82.25 loopCounterMax: 500000 loopCounterLast: 365811 countFindPluginId: 0
2314662 : Plugin call 50 p/s   stats: Count: 1461 Avg/min/max 133.77/97/304 usec
2314663 : Plugin call 10 p/s   stats: Count: 293 Avg/min/max 120.09/98/289 usec
2314663 : Plugin call 10 p/s U stats: Count: 293 Avg/min/max 1629.55/1040/2570 usec
2314664 : Plugin call  1 p/s   stats: Count: 30 Avg/min/max 421.37/338/500 usec
2314664 : setNewTimerAt()      stats: Count: 2079 Avg/min/max 133.49/103/306 usec
2314665 : timeDiff()           stats: Count: 1145359 - CPU cycles per call: 8.50
2314665 : Scheduler stats: (called/tasks/max_length/idle%) 365811/2079/6/94.90

these are commands for ESP with puya
now i will flash new FW directly without blank

@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

>reboot

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

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v614f7c32
~ld
   ▒U138 :

INIT : Booting version: mega-20181008 (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3)
139 : INIT : Warm boot #2 - Restart Reason: Software/System restart
141 : FS   : Mounting...
148 : FS   : Mount successful, used 75802 bytes of 113201
589 : CRC  : program checksum       ...OK
603 : CRC  : SecuritySettings CRC   ...OK
625 : INIT : Free RAM:16488
626 : INIT : I2C
627 : INIT : SPI not enabled
644 : INFO : Plugins: 74 [Normal] [Testing] [Development] (ESP82xx Core 2_4_1, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3)
646 : WIFI : Set WiFi to STA
679 : WIFI : Connecting NETGEAR attempt #0
2016 : WD   : Uptime 0 ConnectFailures 0 FreeMem 13544
4582 : WIFI : Connected! AP: NETGEAR (xx:xx:xx:xx:xx:xx) Ch: 13 Duration: 3902 ms
7178 : WIFI : DHCP IP: 192.168.0.26 (ESP-Easy-0) GW: 192.168.0.1 SN: 255.255.255.0   duration: 2595 ms
7184 : Webserver: start


@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

now i flashed directly: ESP_Easy_mega-20200204_normal_ESP8266_1M.bin


eset button if you've justed flashed the firmware)

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

load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
   ▒U106 : Info  :

INIT : Booting version: mega-20200204 (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
107 : Info  : INIT : Free RAM:32632
108 : Info  : INIT : Warm boot #1 Last Task: Background Task - Restart Reason: Software/System restart
110 : Info  : FS   : Mounting...
118 : Info  : FS   : Mount successful, used 75802 bytes of 113201
590 : Info  : CRC  : program checksum       ...OK
609 : Info  : CRC  : SecuritySettings CRC   ...OK
610 : Info  : CRC  : binary has changed since last save of Settings
612 : Info  : WIFI  : Start network scan
2829 : Info  : INIT : Free RAM:28664
2831 : Info  : INIT : I2C
2831 : Info  : INIT : SPI not enabled
2926 : Info  : INFO : Plugins: 46 [Normal] (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
2940 : Info  : WIFI  : Scan finished, found: 4
2947 : Error : WIFI : No valid wifi settings
3049 : Info  : WIFI : Set WiFi to AP+STA
3975 : Info  : WIFI : AP Mode ssid will be ESP_Easy_0 with address 192.168.4.1
3977 : Error : WIFI : Could not prepare WiFi!
4273 : Info  : WD   : Uptime 0 ConnectFailures 0 FreeMem 22352 WiFiStatus 0
18849 : Info  : AP Mode: Client connected: XX:XX:XX:XX:XX Connected devices: 1
18853 : Info  : Webserver: start
33716 : Info  : WIFI : Credentials Changed, retry connection. SSID: NETGEAR
33751 : Info  : WIFI  : Start network scan
33754 : Info  : WIFI : Connecting NETGEAR attempt #0
34477 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 17072 WiFiStatus 6
37580 : Info  : WIFI : Connected! AP: NETGEAR (XX:XX:XX:XX:XX:XX) Ch: 13 Duration: 3614 ms
39718 : Info  : WIFI : DHCP IP: 192.168.0.26 (ESP-Easy-0) GW: 192.168.0.1 SN: 255.255.255.0   duration: 2304 ms
39722 : Info  : SaveToFile: free stack: 3584
40320 : Info  : FILE : Saved config.dat
40321 : Info  : SaveToFile: free stack after: 3584
40323 : Info  : SaveToFile: free stack: 3584
40657 : Info  : FILE : Saved security.dat
40658 : Info  : SaveToFile: free stack after: 3584
40718 : Info  : firstLoopConnectionsEstablished
64262 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 16352 WiFiStatus 3
94261 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 15152 WiFiStatus 3
124262 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 9000 WiFiStatus 3
127221 : Info  :  Webserver args: 0: 'oldrulesengine' length: 2 1: 'messagedelay' length: 3 2: 'ntphost' length: 0 3: 'dststartweek' length: 1 4:
127228 : Info  : SaveToFile: free stack: 3248
127813 : Info  : FILE : Saved config.dat
127814 : Info  : SaveToFile: free stack after: 3248
144954 : Info  :  Webserver args: 0: 'cmd' length: 6
144956 : Info  :      : Rebooting...

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

load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
   ▒U107 : Info  :

INIT : Booting version: mega-20200204 (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
108 : Info  : INIT : Free RAM:32632
110 : Info  : INIT : Warm boot #2 Last Task: Const Interval timer, id: 3 - Restart Reason: Software/System restart
112 : Info  : FS   : Mounting...
119 : Info  : FS   : Mount successful, used 75802 bytes of 113201
587 : Info  : CRC  : program checksum       ...OK
605 : Info  : CRC  : SecuritySettings CRC   ...OK
630 : Info  : INIT : Free RAM:29456
632 : Info  : INIT : I2C
632 : Info  : INIT : SPI not enabled
728 : Info  : INFO : Plugins: 46 [Normal] (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
835 : Info  : WIFI : Set WiFi to STA
870 : Info  : WIFI : Connecting NETGEAR attempt #0
2098 : Info  : WIFI : Connected! AP: NETGEAR (XX:XX:XX:XX:XX:XX) Ch: 13 Duration: 1125 ms
2749 : Info  : WD   : Uptime 0 ConnectFailures 0 FreeMem 24712 WiFiStatus 6
4648 : Info  : WIFI : DHCP IP: 192.168.0.26 (ESP-Easy-0) GW: 192.168.0.1 SN: 255.255.255.0   duration: 2559 ms
4653 : Info  : Webserver: start
4656 : Info  : firstLoopConnectionsEstablished
32209 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
62209 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
92209 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
122209 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 21032 WiFiStatus 3
152210 : Info  : WD   : Uptime 3 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
212210 : Info  : WD   : Uptime 4 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
242210 : Info  : WD   : Uptime 4 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
272209 : Info  : WD   : Uptime 5 ConnectFailures 0 FreeMem 21680 WiFiStatus 3
302210 : Info  : WD   : Uptime 5 ConnectFailures 0 FreeMem 21680 WiFiStatus 3

the serial log was setted to "info"
i entered inside Easy_0 AP and set to debug, then reboot
it was connected for i while at NETGEAR network (my local network) with IP 192.168.0.26 but afterthat it disconnect and never become visible

@thomastech
Copy link
Contributor

From reviewing your logs I believe you have a WiFi library compatibility issue that is related to the hardware. I experienced that last week on a Sonoff Basic that was the exact same vintage as your hardware.

@TD-er:
If not too much trouble, it would be a useful experiment to try a build using the ALT_WIFI library (PIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191122). But if the latest Mega Release branch has this in it then please recommend the bin file name that should be used.

  • Thomas

@megamarco833
Copy link
Author

32203 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 21824 WiFiStatus 3
62204 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 20576 WiFiStatus 3
92203 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 18672 WiFiStatus 3
>rebooyt
110890 : Info  : Command: rebooyt
110897 : Info  : Command unknown: "rebooyt"
Command unknown: "rebooyt"
>reboot
113605 : Info  : Command: reboot

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

load 0x4010f000, len 1392, room 16
tail 0
chksum 0xd0
csum 0xd0
v3d128e5c
~ld
   ▒U105 : Info  :

INIT : Booting version: mega-20200204 (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
107 : Info  : INIT : Free RAM:32632
108 : Info  : INIT : Warm boot #1 Last Task: Background Task - Restart Reason: Software/System restart
110 : Info  : FS   : Mounting...
118 : Info  : FS   : Mount successful, used 75802 bytes of 113201
585 : Info  : CRC  : program checksum       ...OK
603 : Info  : CRC  : SecuritySettings CRC   ...OK
628 : Info  : INIT : Free RAM:29472
630 : Info  : INIT : I2C
630 : Info  : INIT : SPI not enabled
727 : Info  : INFO : Plugins: 46 [Normal] (ESP82xx Core 3d128e5c, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support)
833 : Info  : WIFI : Set WiFi to STA
869 : Info  : WIFI : Connecting NETGEAR attempt #0
2208 : Info  : WIFI : Connected! AP: NETGEAR  Ch: 13 Duration: 1126 ms
2753 : Info  : WD   : Uptime 0 ConnectFailures 0 FreeMem 24728 WiFiStatus 6
4968 : Info  : WIFI : DHCP IP: 192.168.0.26 (ESP-Easy-0) GW: 192.168.0.1 SN: 255.255.255.0   duration: 2956 ms
4974 : Info  : Webserver: start
4977 : Info  : firstLoopConnectionsEstablished
32208 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 17576 WiFiStatus 3
62207 : Info  : WD   : Uptime 1 ConnectFailures 0 FreeMem 17936 WiFiStatus 3
92208 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 17312 WiFiStatus 3
122208 : Info  : WD   : Uptime 2 ConnectFailures 0 FreeMem 18248 WiFiStatus 3
152208 : Info  : WD   : Uptime 3 ConnectFailures 0 FreeMem 18248 WiFiStatus 3
182207 : Info  : WD   : Uptime 3 ConnectFailures 0 FreeMem 19760 WiFiStatus 3
212207 : Info  : WD   : Uptime 4 ConnectFailures 0 FreeMem 19760 WiFiStatus 3
242208 : Info  : WD   : Uptime 4 ConnectFailures 0 FreeMem 19760 WiFiStatus 3

after many trial i succeed on having for a while the web page using a reboot inside serial monitor.
but as you can see there are many disconnecting, and in a while the sonoff will be not visible on the network

@thomastech
Copy link
Contributor

after many trial i succeed on having for a while the web page using a reboot inside serial monitor.
but as you can see there are many disconnecting, and in a while the sonoff will be not visible on the network

Just more symptoms of the WiFi library issue I mentioned. So far it seems to involve Sonoff Basic V1 modules made 2-3 years ago. But the sample size is very small (one of mine and maybe this one of yours). So consider my conclusion to be a gut feeling.

I think you'll need @TD-er to assist with this. If the latest Mega release does not have the special WiFi library then a custom build will be needed to test things out.

  • Thomas

@TD-er
Copy link
Member

TD-er commented Mar 10, 2020

I created 2 different 1M test builds, based on different SDK builds.
1M_wifi_testbuilds_issue2931.zip

They both are based on the current HEAD of the mega branch.

@thomastech
Copy link
Contributor

I created 2 different 1M test builds, based on different SDK builds.

Thanks. Fingers are crossed. Place your bets now.

  • Thomas

@TD-er
Copy link
Member

TD-er commented Mar 10, 2020

I think his network may have gotten one of those very swiftly rolled out security patches which we have not yet implemented in ESPEasy.
Those patches do disable all TCP/IP traffic and switch over completely to UDP.
This is meant to prevent all handshakes, to protect their users.

@megamarco833
Copy link
Author

megamarco833 commented Mar 10, 2020

I created 2 different 1M test builds, based on different SDK builds.
1M_wifi_testbuilds_issue2931.zip

They both are based on the current HEAD of the mega branch.

I think his network may have gotten one of those very swiftly rolled out security patches which we have not yet implemented in ESPEasy.
Those patches do disable all TCP/IP traffic and switch over completely to UDP.
This is meant to prevent all handshakes, to protect their users.

hi TD-er i do not think that is related to my home network because i have for example nodemcu, wemoss and ESP12 breadbord where i use espeasy and i do not find issue.
i think that the issue is related to this combination hardware+firmware: sonoff + espeasy

anyway i'm testing the two versions
in a while a came back with feedbacks
thanks

p.s. but i would like to update the fw from a sonoff like this, what i have to do, if i would like to use OTA?
thanks

@megamarco833
Copy link
Author

i flashed first this:
normal_ESP8266_1M_SDK22x_190703
i do not see any improvemts. it's very unstable
the connection was lost many times and the time respond on web pages are very long

then i tested normal_ESP8266_1M_SDK22x_191122
same situation, very slow and unstable with continue lost of connection where i need to power off and power on

what i notice is that with 2018 version of PUYA when i connected to AP Easy_0 and give my credentials after countdown the web page show me the internal IP address that was given to sonoff
with new version from github never. after the countdown the web page was unable to load and i have to manully search the ip that was assignet at sonoff
with first test version tested (normal_ESP8266_1M_SDK22x_190703) after the countdown it show all parameters of web page (main, config, controller, hardware etc..) but inside AP network (192.168.4.1) and inside main page i can see the internal IP given.
same also with second test version tested, but with a different graphics

@thomastech
Copy link
Contributor

@megamarco833:
That's a let down. Was hoping for better news.

@TD-er :
The special wifi build that is working for me has these details:

Build: 20104 - Mega
System Libraries: ESP82xx Core 2_6_3, NONOS SDK 2.2.2-dev(a58da79), LWIP: 2.1.2 PUYA support
Plugin Count: 80 [Normal] [Testing]
Build Time: Mar  4 2020 20:43:39

Note: This version was for 4MB Flash, not 1MB.

BTW, I didn't try out your two new 1MB test builds. The Sonoff node is in-use and not a good time to take it offline.

  • Thomas

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

Hmm not sure if Tasmota source code will help here .... ;)

    // Enable from 6.0.0a until 6.1.0a - disabled due to possible cause of bad wifi connect on core 2.3.0
    // Re-enabled from 6.3.0.7 with ESP.restart replaced by ESP.reset
    // Courtesy of EspEasy

@biatel1
Copy link

biatel1 commented Feb 1, 2021

"Introduction" in attached document can be worth to read anyway. Maybe this is the case.
pierce-gateintroduction.pdf

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

That's a useful paper.
Funny thing is that I did see the table yesterday when searching, but missed to read the article.

As it states the resistor is often included in the micro controller, I wonder if that may be a difference in silicon revisions of the ESPs.
Also the change of crystal may be explained by probably a different batch of crystals with a different ESR. (or presence of capacitors in the replacement crystal)
Based on the info from the paper, you would expect this to also make those units more temperature dependent.

I guess adding a 100k (or more) resistor to those boards is a bit hard for most users, so we should look into ways of forcing a RF calibration after the crystal frequency has stabilized.

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

I looked into several more papers and I don't think we need to wait for the crystal to stabilize for several seconds as it typically takes a number of ticks to get stable.
Low frequency crystals like the 32768 Hz in watches may need a few 100 msec to a few seconds to stabilize.
High frequency crystals typically should stabilize in usecs to 100 msec.
But there is a RC circuit on the board to delay booting the ESP at power on, which should be a lot longer.

I'm currently making a test build with changes in "autoreconnect" setting (that's something that was different at Tasmota) and setting the WiFi sleep mode after each change of wifi mode (STA/AP/off)
Hopefully you guys have some nodes left that are still not patched with a resistor :)

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

@megamarco833 Can you try this test build: #3473 (comment)

@megamarco833
Copy link
Author

megamarco833 commented Feb 1, 2021

@megamarco833 Can you try this test build: #3473 (comment)

of course!
i tested on sonoff r2 (no hacks on it) with this bin: ESP_Easy_mega_20210201_custom_alt_wifi_ESP8266_1M.bin
i flash before the blank_1MB.bin

results: no issue, the AP network "Esp_Easy" is visible, i can connect and after rebooting i can see my sonoff connected at my internal net. i see that web GUI is responding well and fast.
i'm testing since 5minutes.

only two comments, inside log i see:

121838: WD : Uptime 2 ConnectFailures 0 FreeMem 19456 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
151837: WD : Uptime 3 ConnectFailures 0 FreeMem 20280 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
181837: WD : Uptime 3 ConnectFailures 0 FreeMem 21272 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
209222: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
209592: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
209939: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
210349: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
211167: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
211794: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
211838: WD : Uptime 4 ConnectFailures 0 FreeMem 19536 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
213830: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
213933: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
214650: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
214854: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
215097: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
223968: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
225196: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
225233: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
229498: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
229610: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
230317: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
230419: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
230624: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
231136: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
231443: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
233702: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
236461: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
237382: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
241839: WD : Uptime 4 ConnectFailures 0 FreeMem 22864 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
244960: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
245260: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
249876: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
249945: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
251616: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
252157: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
254688: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
254791: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
254893: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
255099: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
256124: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
256327: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
256534: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
271839: WD : Uptime 5 ConnectFailures 0 FreeMem 22832 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
280392: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
282337: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
301839: WD : Uptime 5 ConnectFailures 0 FreeMem 22704 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
316027: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
331837: WD : Uptime 6 ConnectFailures 0 FreeMem 22544 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
341013: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
341453: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
355555: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
355782: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
356272: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
356680: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
356989: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
357091: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
357295: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
360470: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
361838: WD : Uptime 6 ConnectFailures 0 FreeMem 22376 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
368560: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
368867: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
374294: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
374304: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
385763: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
385866: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
386070: WiFi : Set TX power to 10dBm sensitivity: -69dBm RSSI: -59dBm
386419: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
386484: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
387095: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
387197: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
387506: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
387524: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
388323: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
388426: WiFi : Set TX power to 11dBm sensitivity: -69dBm RSSI: -60dBm
388630: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
388837: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
389040: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
389554: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm
391837: WD : Uptime 7 ConnectFailures 0 FreeMem 22376 WiFiStatus 3 ESPeasy internal wifi status: Conn. IP Init
392523: WiFi : Set TX power to 12dBm sensitivity: -69dBm RSSI: -61dBm
392527: WiFi : Set TX power to 13dBm sensitivity: -69dBm RSSI: -62dBm

but practically i not see any issue.

second, i think it's a test build so it should be "normal" i see that the plugins included are few, for example switch input pcf8574 is missing....

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

If you can try other builds, please be my guest :)
Just to be clear, this is tested on the unit that was behaving badly before?

@megamarco833
Copy link
Author

megamarco833 commented Feb 1, 2021

If you can try other builds, please be my guest :)

i'm glad to do this for you!
excatly what firwmare.bin you would like that i test on sonoff R2 ?
please let me know

Just to be clear, this is tested on the unit that was behaving badly before?

yes, correct, this device was working only on the 2018 version that i told you, other version had the issue that i described when i open this issue

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

Great!
So we did make quite some improvement here :)
On the Sonoff, you can try any 1M build, just to make sure it isn't a fluke that the first build you tried is working.

@megamarco833
Copy link
Author

megamarco833 commented Feb 1, 2021

as i report i test successfully on sonoff R1:
ESP_Easy_mega_20210201_custom_alt_wifi_ESP8266_1M.bin
ESP_Easy_mega_20210122_custom_alt_wifi_ESP8266_1M.bin

now, do you want that i'll test : ESP_Easy_mega_20210201_normal_alt_wifi_ESP8266_1M.bin or ESP_Easy_mega_20210201_normal_ESP8266_1M.bin ?

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

if the ESP_Easy_mega_20210201_normal_ESP8266_1M.bin is working fine, then I'm really happy. (from the last test build I linked here)

@megamarco833
Copy link
Author

megamarco833 commented Feb 1, 2021

i test right now ESP_Easy_mega_20210201_normal_ESP8266_1M.bin
i confirm that on sonoff R2 device also this version is working perfectly like in the past 20181023_dev_ESP8266PUYA_1024_VCC.bin (that was the last version that works on this device)
so...compliments again @TD-er !!!!! you win! :)

@TD-er
Copy link
Member

TD-er commented Feb 1, 2021

Great!
Very very pleased to hear :)

Well I could not have done it without the endless effort of testers and colaboration in trying to find the many causes :)

I will perform some tests with ESP32 and if those turn out to be working I will merge it and in 1 or 2 days make a new nightly build.

@uzi18
Copy link
Contributor

uzi18 commented Feb 1, 2021

Nice job :)

@biatel1
Copy link

biatel1 commented Feb 2, 2021

TD-er - thank you for all your commitment. For me, the last 3 weeks have been a real pleasure, with several people working in different ways to solve the same problem. It is a success that we have solved the problem defined for 10 months.
In summary, we now have 3 options to solve the difficulties:

  • first, simplest, just flash a new version of ESPEasy - hopefully soon in a more official release;
  • the second - adding a resistor in parallel to the crystal;
  • the third - replacement of the crystal with another unit.
    (Of course, method 2 and 3 is only for those familiar with the soldering iron).

@TD-er
Copy link
Member

TD-er commented Feb 2, 2021

It is a success that we have solved the problem defined for 10 months.

Make that close to 3 years already...
So you can imagine how pleased I am it is now working well :)

@thomastech
Copy link
Contributor

Fantastic! This bug has been a hair puller for a long time, so it's great to see there are solutions.

@TD-er: My satanic Sonoff Basic R2 demands the Xtal resistor hardware hack to make it work. Is this the final solution or is another firmware patch being created that avoids the mod? Either way I'm good.

  • Thomas

@TD-er
Copy link
Member

TD-er commented Feb 3, 2021

@thomastech For now this is the solution we will go for.
If other evidence shows up indicating a clear path to "if you see this, then do that" or "check this checkbox" then I will have a look at it again.

For now, just see what the response will be among users and how wide spread "your case" is among users.
As I see it now, there are about 4 different causes for these symptoms, some of them now seem to be dealt with (or worked around) by the current changes and some can be fixed by either replacing the crystal (not easy) or adding a resistor (slightly less difficult).
On top of that we also still have those units with grossly underpowered voltage regulators, which do seem to get worse by the month.
So somewhere we have to draw a line I guess.

@thomastech
Copy link
Contributor

Roger that.

It's not clear to me how the ESPEasy firmware fix will be implemented going forward.

For example, will it be in all builds or will there be special "Sonoff Basic R2" builds that have it?

If it's in all builds, does the user need to enable an option that turns it on?

-Thomas

@TD-er
Copy link
Member

TD-er commented Feb 3, 2021

The fix as is done now, is done for all, so maybe later I will add a checkbox for it as it may cause a delay and extra power consumption at boot, which is bad for battery operation.
But on the other hand, for battery operated (deep sleep mode) we can reduce power consumption much more by setting a special flag on how the unit should act on the next boot.
I have to test if that's causing issues, but that's for later as I also noticed there is even more to gain in battery consumption during sleep itself via software.
Only thing is, I don't understand why it reduces energy consumption during sleep.

@DrBastler
Copy link

Hi all,
I have a bunch of Wemos D1 mini pros. Can't use them because of the WiFi problem (Topic of this discussing here).
Now, I see the chance to bring them to life.
How can I have access to the mentioned release? (1M_wifi_testbuilds_issue2931.zip)

Or will it be avaliable in the next official ESPEasy release?

Thanks in advance

@TD-er
Copy link
Member

TD-er commented Feb 13, 2021

You can try this test build I made 2 days ago:

@DrBastler
Copy link

@TD-er: Thanks for your quick response.

I think I have a major WIFI problem with the Wemos D1 pro (The ones with ceramic antennas):
After many firmware updates/blanks with your provided binaries, I try to flash an easy going WIFI example with Arduino.IDE.
And.... Nothing.
The Wemos searches for WIFIs but find nothing.
My fear is that the ceramic antenna do not work properly. I read from other forums about trouble with these kinds of ESPs.
I will wait for an external antenna and will ongoing testing.

Until then, many thanks for your support and your amazing work around espeasy!

@TD-er
Copy link
Member

TD-er commented Feb 14, 2021

Most of those Wemos boards with a ceramic antenna also have an IPEX connector for an external antenna.
In order to switch between the IPEX and ceramic antenna, a zero Ohm SMD resistor is placed.
So either one from antenna pin of the ESP to the IPEX connector or the ceramic one (90 degree rotation)

Maybe good to check if there is even one placed, or maybe only connected to the IPEX connector?

@biatel1
Copy link

biatel1 commented Feb 15, 2021

ESPEasy_ESP82xx_mega-20210114-63-g1b2c1b05.zip Seems to work.
Only fast test of ESP_Easy_mega_20210210_normal_ESP8266_1M.bin
I'll keep it installed to find further details.

@TD-er
Copy link
Member

TD-er commented Feb 15, 2021

thanks for testing/reporting.

@panason
Copy link

panason commented Nov 11, 2022

Can anybody check if it's a coincidence only or something more? The resistor value does not look critical and everything works between 10k and 150k in my case.

Bingo. I installed a 100K and now the Sonoff Basic R2 V1.0 with 4MB Flash is working normally. I tested two PR firmware versions, both work good. ESP_Easy_mega_20210128_test_ESP8266_4M1M_VCC ESP_Easy_mega_20210128_test_alt_wifi_ESP8266_4M1M_VCC

Edit: I noticed that the "Info : WiFi : Set TX power to X dBm sensitivity:" Serial log message becomes very chatty at random times. It will spit out dozens of these messages, then quiet down for awhile. Then return later. Is this expected?

However, if it is a medicine, I have no idea why it works.

The typical oscillator circuit is often an inverter based amplifier. Adding the feedback resistor can ensure it stays within its linear operating region. This helps the oscillator start faster and improves startup stability. But a chip maker should state the resistor is necessary for proper operation when it is needed.

If that's the case here, then I can make it an optional setting labelled "Magic to make cheap garbage work" or maybe someone can come up with a more elysian or profound description for it. (@thomastech maybe?)

How about an optional checkbox labeled "Perform Startup Excorsism at boot." Or, avoid the satanic phrasing and use something like "WiFi Startup Stable Mode (boot time only)."

There is a problem with adding this option. If a user has a satanic ESP8266 module then they won't have WiFi access to it to enabled the option. They would need to be a bit more clever and do it via the serial port. Or, perhaps the feature could be automated by sensing too many reconnects in a short time period.

-Thomas

Add photo with installed resistor pls.

@tonhuisman
Copy link
Contributor

AFAIK, the Sonoff Basic (R2) WiFi issues have been solved some time ago, so I assume this one can be closed.

@TD-er TD-er closed this as completed Sep 9, 2023
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 Type: Bug Considered a bug
Projects
None yet