[SOLVED] WiFi Problem with Sonoff Basic Using Recent Releases

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

[SOLVED] WiFi Problem with Sonoff Basic Using Recent Releases

#1 Post by ThomasB » 07 Dec 2018, 20:37

I've been ignoring my Sonoff hardware since switching to NodeMCU based projects. But this week I decided to use a factory fresh Sonoff Basic to control my Volumio Audio player's amp. BTW, the Raspberry Pi powered Volumio app is fantastic.

But my ESPEz->Sonoff upgrade didn't go as planned. I installed a recent release (ESP_Easy_mega-20181204_normal_ESP8266_1024) using grovkillen's ESP Easy Flasher. Unfortunately the AP mode refuses to connect. ESPEz refuses AP login (using "configesp" password).

I tried the flasher's FORCE-DOUT option as well as the recent ESP8285 releases. Clearing ALL the memory and reflashing does not help either.

It's not as simple as a failed flashing. The serial port shows that the firmware is running. System commands (via serial access) all work as expected. But no joy establishing a Wifi connection.

I even used the serial port's system commands to configure the Wifi STA. No problems with the command line configuration but the WiFi connection is still refused.

Boot logs show everything is great (correct SSID and password, STA mode enabled). BTW, the AP mode is always active. That is to say, it continues to appear as a WiFi access point in my mobile devices and desktop PC. I believe that is the normal fallback when STA is not successful.

Over a six hour period I chased my tail trying to get WiFi to connect. I eventually tried a release from last Sept (ESP_Easy_mega-20180910_normal_ESP8266_1024) and this broke everything. The serial port just constantly spews characters.

Finally success. The June release (ESP_Easy_mega-20180611_normal_ESP8266_1024) works perfect. It was fully configured with devices and rules, all good. After achieving success I installed today's release (ESP_Easy_mega-20181207_normal_ESP8266_1024) and ran into the WiFi connection problem again. After restoring the June release everything is great again.

Here is the serial log with the 20181207 release, which is identical to my other non-working attempts. It shows everything looks good: rules running and WiFi connected. But no web access!

Code: Select all

INIT : Booting version: mega-20181207 (ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support)
103 : INIT : Warm boot #2 - Restart Reason: Software/System restart
105 : FS   : Mounting...
111 : FS   : Mount successful, used 76555 bytes of 113201
461 : CRC  : program checksum       ...OK
473 : CRC  : SecuritySettings CRC   ...OK
495 : INIT : Free RAM:24112
496 : INIT : I2C
497 : INIT : SPI not enabled
513 : INFO : Plugins: 46 [Normal] (ESP82xx Core 2_4_2, NONOS SDK 2.2.1(cfd48f3), LWIP: 2.0.3 PUYA support)
515 : EVENT: System#Wake
550 : WIFI : Set WiFi to STA
582 : WIFI : Connecting *REDACTED* attempt #0
584 : IP   : Static IP : 192.168.1.XXX GW: 192.168.1.1 SN: 255.255.255.0 DNS: 192.168.1.1
599 : EVENT: System#Boot
608 : ACT  : event RelayOff
617 : Command: event
619 : EVENT: RelayOff
648 : ACT  : gpio,12,0
657 : Command: gpio
658 : GPIO : 12 Set to 0
669 : ACT  : event LEDoff
675 : Command: event
676 : EVENT: LEDoff
704 : ACT  : gpio,13,1
712 : Command: gpio
713 : GPIO : 13 Set to 1
810 : SW  : GPIO=0 State=1 Output value=0
817 : EVENT: PushSwitch#switch=0.00
2076 : WD   : Uptime 0 ConnectFailures 0 FreeMem 21792
So I must be doing something wrong or the ESP gods are angry at me. Anyone have a fix for what I have described?

- Thomas
Last edited by ThomasB on 10 Dec 2018, 01:20, edited 1 time in total.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: WiFi Problem with Sonoff Basic Using Recent Releases

#2 Post by ThomasB » 08 Dec 2018, 00:15

This ESPEz Github issue may be related to my problem:
https://github.com/letscontrolit/ESPEasy/issues/2088

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: WiFi Problem with Sonoff Basic Using Recent Releases

#3 Post by TD-er » 08 Dec 2018, 00:33

The Tasmota guys also had a number of issues with the Sonoff Basic R2 (R2 is the key factor here)

It seems iTead/Sonoff may have been cutting a bit too much on component costs for this one.

Suggestions from the Tasmota side was to make as much idle calls as possible and not doing any sensor activity during WiFi setup to make it work.
Sounds like the power supply may not be steady enough to cope with the extra energy needed to make the initial WiFi connection.

I thought that one also may be using PUYA chips, but since you got it working on June builds, I am not so sure anymore.
Those older builds are also using core 2.4.0 or 2.4.1 versions. We have one 2.4.1 build in the current releases, you could try that one also.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: WiFi Problem with Sonoff Basic Using Recent Releases

#4 Post by ThomasB » 08 Dec 2018, 02:28

@TD-er, Glad you stopped by. I appreciate your comments.
Sounds like the power supply may not be steady enough to cope with the extra energy needed to make the initial WiFi connection.
I had seen your post in the github issue tracker thread that mentioned the R2's power supply might be the cause. To investigate that idea I added a 1000uF cap across the 3.3V rail. Plus I've even removed AC power and run the board on a lab power supply (3.3V, very precise clean voltage). These tricks do not change the problem.
I thought that one also may be using PUYA chips, but since you got it working on June builds, I am not so sure anymore.
I too suspected it might involved the nefarious Puya problem (or some other memory brand compatibility). So yesterday I ordered some 4MB winbond W25Q32FVSSIG chips to upgrade the Sonoff R2. I think it will be a few weeks before I see them due to the holiday postal delays. I hope to find that swapping the memory tells us something.
Those older builds are also using core 2.4.0 or 2.4.1 versions. We have one 2.4.1 build in the current releases, you could try that one also.
Yesterday I tried the ESP_Easy_mega-20181204_normal_core_241_ESP8266_1024 release and WiFi connected the first try (totally surprised by that). But it was a one-time success and would not re-connect on repeated follow-up attempts.

Now some good news. I just tried ESP_Easy_mega-20181207_normal_core_241_ESP8266_1024. And it is working! So there is some evidence that the ESP8266 2.42 core library is involved in this interesting mess.

- Thomas

jme
Normal user
Posts: 43
Joined: 11 Apr 2018, 14:20

Re: [SOLVED] WiFi Problem with Sonoff Basic Using Recent Releases

#5 Post by jme » 17 Dec 2018, 12:08

Hi,

I had the same kind of issue, i had to configure the wifi trough the serial port to make the first connection.

Now i have regulary some issue, my domoticz server send a command everyday @ noon to switch off my christmas tree, but soms it didn't switch off.

I think the sonoff didn't stay connected correctly to wifi.

Do you had same kind of issues ?

I will try to reflash with the same release as yours.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: [SOLVED] WiFi Problem with Sonoff Basic Using Recent Releases

#6 Post by ThomasB » 17 Dec 2018, 17:27

So far everything has been working fine. The System Info page doesn't report any WiFi reconnects.

Try reducing your Message Interval (Tools->Advanced). I'm using 75mS, which works well with my MQTT broker.

-Thomas

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: [SOLVED] WiFi Problem with Sonoff Basic Using Recent Releases

#7 Post by ThomasB » 27 Dec 2018, 00:56

I received the 4MB memory chips (Winbond W25Q32FVSSIG) and upgraded my 1MB Sonoff Basic. Seemed like a good test but the outcome is not as I expected.

The upgraded Sonoff Basic refuses to run on the 4096 bin images. Wifi AP and STA connections are not possible. Serial log is quiet after a power cycle reboot (no reset button on a Sonoff Basic). But power cycle drops the USB serial connection so perhaps that prevents seeing the boot message.

I tried the latest 4MB images:
ESP_Easy_mega-20181220_normal_core_241_ESP8266_4096.bin
ESP_Easy_mega-20181220_test_ESP8266_4096.bin

Reverting back to ESP_Easy_mega-20181207_normal_core_241_ESP8266_1024.bin restores operation. This is the same file I reported on Dec-07 as a working Sonoff Basic release. I should have tried the newer ESP_Easy_mega-20181220_normal_core_241_ESP8266_1024.bin, but I ran out of time and I put the Sonoff back into service.

BTW, ESP Easy's System Info reports that the new memory chip is 4MB:

Code: Select all

Storage
Flash Chip ID: Vendor: 0xEF Device: 0x4016
Flash Chip Real Size: 4096 kB
Flash IDE Size: 1024 kB
Flash IDE speed: 40 MHz
Flash IDE mode: DOUT
I was hoping to get a 4MB image to work so I could perform OTA updates. And I was expecting the memory upgrade to provide some new information that would help us understand more about the Sonoff Basic WiFi issues. Failed on both counts.

I'll continue to think about what may have caused the bad results. But for now I am blaming Murphy.

- Thomas

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: [SOLVED] WiFi Problem with Sonoff Basic Using Recent Releases

#8 Post by kimot » 31 Dec 2018, 15:20

I got new version of Sonoff Basic last day. ( only 4 pin connector )
I flash it right now with mega_dev13 ( last whitch works ok for me ).
All works OK like older versions of Sonoff.

Code: Select all

esptool.py --port /dev/ttyUSB0 --baud 115200 write_flash  0x00000 ESP_Easy_v2.0.0-dev13_normal_ESP8285_1024.bin

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests