ESPresense icon indicating copy to clipboard operation
ESPresense copied to clipboard

Cannot connect to WiFi after power cycle

Open draftpunk opened this issue 1 year ago • 17 comments

Describe the bug

WiFi seems to connect after flashing ESP32 and specifying WiFi, but after a power cycle, it will not reconnect.

Version

3.2.4

Active scan enabled

No response

Include filter

No response

Exclude filter

No response

Query filter

No response

Firmware flavor

No response

Device (be specific)

No response

Logs

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
Pre-Setup Free Mem: 206732
Setup network
Connecting to WiFi SSID 'WoodButSlower'................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... failed (status=6).
Starting access point for configuration portal.

Screenshots

No response

draftpunk avatar Aug 03 '23 06:08 draftpunk

Just wanted to add that I previously had this same ESP32 board flashed as an ESP Bluetooth proxy device and had no issues connecting to my WiFi.

draftpunk avatar Aug 04 '23 04:08 draftpunk

I'm experiencing this same issue, with the same logs (bar the SSID being different!). Other devices around seem to also occasionally experience WiFi trouble when close by to the ESPresense device failing to connect, but then have no issues when it is not there: I am assuming this is just interference from the autocreated hotspot, but mentioning for completeness.

I am using an ESP32 WROOM32.

mashedkeyboard avatar Aug 10 '23 18:08 mashedkeyboard

I have this problem as well. ESP32 Wroom boards. Across multiple boards.

kyemacdonald avatar Nov 18 '23 03:11 kyemacdonald

If you do a full erase and flash the board will connect to the wifi. But after that it will no longer connect reliably.

If you flash a different espresence version without doing a full erase it still won't connect to wifi.

kyemacdonald avatar Nov 18 '23 03:11 kyemacdonald

This is the web log from a clean install to hitting the reset device button.

`1 New | a4c138cfe21d | a4c138cfe21d -93dBm 0 Reconnect timer 0 Reconnecting to MQTT... Disconnected from MQTT; reason 0 1 New | bc7e8b2db02d | bc7e8b2db02d -98dBm 0 Reconnect timer 0 Reconnecting to MQTT... 0 Reconnect timer 0 Reconnecting to MQTT... 0 Reconnect timer 0 Reconnecting to MQTT... 0 Reconnect timer 0 Reconnecting to MQTT... 0 Reconnect timer 0 Reconnecting to MQTT... 0 Reconnect timer 0 Reconnecting to MQTT... 0 Reconnect timer 0 Reconnecting to MQTT... Disconnected from MQTT; reason 0 0 Reconnect timer 0 Reconnecting to MQTT... ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:8896 load:0x40080400,len:5828 entry 0x400806ac Pre-Setup Free Mem: 206732 Setup network Connecting to WiFi SSID 'Skyenet-IOT'................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................*............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... failed (status=6). Starting access point for configuration portal.`

kyemacdonald avatar Nov 18 '23 03:11 kyemacdonald

I've narrowed down the problem to the web gui.

If you install espresense and then setup the wifi through the web gui the device will connect once to wifi an never again.

If however you install through the webgui and then disconnect the esp as soon as you see the finished page, and setup the wifi through the hotspot then the device will work from there on.

Interestingly there is a core panic on the first attempt to connect to the wifi hotspot. This only happen on the first time you connect to it, subsequent connections work perfectly. This has occurred across multiple devices.

`Guru Meditation Error: Core 0 panic'ed (StoreProhibited). Exception was unhandled.

Core 0 register dump: PC : 0x40099998 PS : 0x00060633 A0 : 0x80099df6 A1 : 0x3ffd5180
A2 : 0x3ffe3c48 A3 : 0xabba1234 A4 : 0x3ffe0454 A5 : 0x00000003
A6 : 0x00060623 A7 : 0x00060620 A8 : 0x00000012 A9 : 0x00000007
A10 : 0x3ffe06fc A11 : 0x3ffe3cbc A12 : 0x3ffe0478 A13 : 0x3ffe04a0
A14 : 0x3ffe3c50 A15 : 0x00000013 SAR : 0x00000013 EXCCAUSE: 0x0000001d
EXCVADDR: 0xabba1240 LBEG : 0x40092368 LEND : 0x4009237e LCOUNT : 0xffffffff

Backtrace: 0x40099995:0x3ffd5180 0x40099df3:0x3ffd51a0 0x40099ef4:0x3ffd51c0 0x4008409a:0x3ffd51e0 0x400840ad:0x3ffd5200 0x400840d6:0x3ffd5220 0x4009a2c9:0x3ffd5240 0x401301e8:0x3ffd5260 0x40130c9e:0x3ffd5280 0x40134b8c:0x3ffd52a0 0x40134d1d:0x3ffd52d0 0x40135439:0x3ffd5300 0x401354a7:0x3ffd5320 0x40131e1d:0x3ffd5360 0x400e0412:0x3ffd5380 0x4012efb4:0x3ffd53a0

ELF file SHA256: 0000000000000000

Rebooting...`

kyemacdonald avatar Nov 24 '23 02:11 kyemacdonald

same issue here. I can get it to work once, but after power cycle, wifi will not connect. tried on several different esp32 boards now.

`ets Jul 29 2019 12:21:46

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:8896 load:0x40080400,len:5828 entry 0x400806ac Pre-Setup Free Mem: 215796 Setup network Connecting to WiFi SSID ''......................................................................................... . SSID: 'espresense-living-room' IP: 192.168.4.1 `

oddboy avatar Nov 26 '23 04:11 oddboy

@kyemacdonald's solution above worked for me.

chasecee avatar Dec 13 '23 04:12 chasecee

What this actually turned out to be for me is the USB-to-serial chip (CH340C) is causing a poor WiFi signal. After desoldering pin 16 (vcc) after the board has been flashed and programmed to WiFi, the board connects to WiFi and works great. For more info: https://community.home-assistant.io/t/something-is-very-wrong-with-the-wifi-on-the-esp32-boards-i-ordered-from-aliexpress-is-there-any-way-to-salvage-these-and-fix-the-wifi/477631/12

draftpunk avatar Dec 13 '23 05:12 draftpunk

similar issues here, ill have everything up but if an update comes or there's a power cycle everything goes away. i have to try to wet up through the hotspot but that is slow and seems to not respond 49 times out of 50. very frustrating. all my other esp32 boards reconnect perfectly fine.

ESP32 Wroom

ecto1a2003 avatar Jan 24 '24 07:01 ecto1a2003

Confirming the exact same behavior with ESP32 Wroom

To clarify - after setting up, powering the device via the VIN/GND pins instead of via USB C prevented the issue. Reading the other thread on HA,s I believe like the fact that it "works once" while setting up is only due to the fact it's powered via the computer's USB, which provides less than the 5v that s screw up reception when provided via the USB C chip

OpherV avatar Jan 25 '24 22:01 OpherV

my issues are unrleated to usbc, i have micro usb powerd ones with the smae issue.

ecto1a2003 avatar Feb 02 '24 05:02 ecto1a2003

Maybe related to this

Wildbill-Z avatar Feb 15 '24 08:02 Wildbill-Z

Any updates on the issue ? Espresens devices are not stable at all due to this issue . Getting unavailable from time to time. Please assist

borodaaaaa avatar Feb 24 '24 08:02 borodaaaaa

I went back to V3.2.2 with all devices, as this seems to be the latest version without this problem. Just reflashed (downgraded) all of them with Web-Installer. No config was deleted, all of them just worked fine again after flashing.

Wildbill-Z avatar Feb 24 '24 09:02 Wildbill-Z

I am having the same issue, are there any updates?

b1t-hunter avatar Apr 18 '24 22:04 b1t-hunter

Same issue here. It's comepletely unusable. I'll ditch it until someone comes up with a fix. Edit: after reading further - looks like a voltage/ powering issue. I'm no soldering expert - not even close. I just ordered some quinleds' - very expensive option ordering from EU but I haven't got the time to think about other options. Lets hope this solves my issue. Otherwise this was a pricey experiment.

carsaig avatar Jun 26 '24 23:06 carsaig