Espurna: Serious WiFi issue ESPURNA Version 1.13.4

Created on 24 Feb 2019  路  11Comments  路  Source: xoseperez/espurna

After updating my device to 1.13.4 I found multiple device not coming online anymore. Debug via serial is not giving me any information. Devices that come online after the update do not have their web interface reachable after some time, they keep responding to MQTT commands OTA from Arduino IDE is not possible anymore.

Devices that come back online after updating do not come back online after a power cycle.

On SonOff-basic after double pressing the button, serial debug says there will be a access point created but no access point comes online and if there comes one it drops out after a few seconds.

I flashed 1.13.3 in it and the device starts working again as it shout.
I flashed a later dev version and still WiFi is working correct.

I am using:
ESP8266 core 2.4.2 in all versions
Library JustWifi https://github.com/xoseperez/justwifi#2.0.2 in all versions

bug wifi

Most helpful comment

Basic has always had connectivity issues. I have even thought about stop supporting it (not really).

All 11 comments

Thanks!

Can reproduce with both pre-built and 2.4.2. AP mode behaves erratically.
@AlbertWeterings for now, you can revert https://github.com/xoseperez/espurna/commit/31195ba3b62ff886313d0369baf4b6ab1a07187b locally. Not really sure what's halting WiFi operation. And I think it also affects connection, as the Basic I have sometimes cannot connect at all.

I have the same problem.
Sonoff Basic flashed with *.bin file in the repositiry. Test with differents ssid and never connects.

If you go back to this state it is working all normal as @mcspr noted.
https://github.com/xoseperez/espurna/tree/31195ba3b62ff886313d0369baf4b6ab1a07187b

Confirming wifi issues with 1.13.4.

Sonoff RF updated via the web interface. Refused to connect to my home network and falling back to AP mode. If I connect to the AP, I'm unable to get to the web interface via either of the local addresses.

I long pressed the toggle button to reset and can see that the reset is successful. The AP is ESPURNA-xxxxxx. If I connect to that AP using the default creds, I'm still unable to get to the web interface via the local address.

I'll pop it out this evening and re-flash to see what happens.

@AlbertWeterings what I meant is reverting to the state before that commit helped. i.e. 64b5155, where there is still delay(10) at the end of the loop() (which removal with the default builds seemingly broke things)

edit: formatting
Some observations using Core 2.4.2:

  • WIFI_NONE_SLEEP etc. are enums and not preprocessor defines, and always equal 0 in preprocessor context.
  • With default settings WIFI_SLEEP_MODE == WIFI_NONE_SLEEP, Basic connects / works as AP when CPU speed is set to 160MHz. platformio.ini env must have board_build.f_cpu = 160000000L, IDE has menu setting.
  • Changing sleep mode to WIFI_MODEM_SLEEP does help too (note that delay() does not get included, because preprocessor statements are always false!) false alarm, cannot reproduce anymore.

So, what I think needs to happen is to replace preprocessor checks of sleep mode with runtime setting like wifiSleep to allow changing it at runtime, so loopDelay can always be changed.
And maybe it is worth setting sleep mode to MODEM again. I do not remember why exactly it was set to NONE.

I'm not noticing connectivity issues with my testing board and pre-built binaries, not with 2.4.2 binaries either. But I have seen the upgrade from web UI process fails most of the times... not sure yet if this could be related to the delay thing...

I had similar results on testing boards. Basic is behaving differently for some reason. Bad power? Badly drawn antenna?

Basic has always had connectivity issues. I have even thought about stop supporting it (not really).

Web OTA likely fails because of progress messages sent via websocket get pinged back every time (websock.send({})). Delay may help there, but they can be safely removed. Progress is already tracked client-side. Or replace generic debug function with DEBUG_PORT.printf_P(...)

edit: HTTP upgrade using curl works perfectly fine, so WebUI weblog pingback is the reason.

Similar behaviour on my RF Bridge R2, using just updated dev sources: it authenticates and changes admin password, then it lands to a blank WEB page.

Steps to reproduce inside VScode console on Arch Linux:

$ export ESPURNA_ENV="itead-sonoff-rfbridge-direct"
$ pio run -e $ESPURNA_ENV -t clean && pio run -e $ESPURNA_ENV && gulp
$ esptool --port /dev/ttyUSB0 --baud 115200 erase_flash
$ pio run -e $ESPURNA_ENV -t upload

It works in STA mode just after rebuilding with my wifi LAN creds in custom.h :

pragma once

define WIFI1_SSID "###"

define WIFI1_PASS "###"

Thanks,
Piero

It certainly looks like it depends on the board. I was having problems with a couple of Blitzwolf SHP2 but the other boards at home are working just fine. After @mcspr reverting the loopDelay issue everything works as normal.

I have removed the binaries from the 1.13.4 release. My idea is to release 1.13.5 with this fix as soon as possible (after some testing).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

J0s3f picture J0s3f  路  5Comments

zafrirron picture zafrirron  路  7Comments

rradar picture rradar  路  3Comments

germaguire picture germaguire  路  7Comments

FlorianSW picture FlorianSW  路  3Comments