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

Boot loop #16

Closed
Ulrar opened this issue Mar 15, 2022 · 7 comments
Closed

Boot loop #16

Ulrar opened this issue Mar 15, 2022 · 7 comments

Comments

@Ulrar
Copy link

Ulrar commented Mar 15, 2022

Hi,

I copied your config and flashed it with one light only, but then when I power it with 5v the screen just flashes on and off randomly (staying on the Sonoff boot logo screen), wifi connects but the API port stays closed.

I then tried a minimal config, thinking maybe one of the sensors or services was causing the issue :

esphome:
  name: nspanel-lr

esp32:
  board: esp32dev

ota:
  password: "blah"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password

logger:

api:

With that the logs on serial show a boot loop, with the below repeating endlessly :

[17:16:27]ets Jul 29 2019 12:21:46
[17:16:27]
[17:16:27]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[17:16:27]configsip: 0, SPIWP:0xee
[17:16:27]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[17:16:27]mode:DIO, clock div:2
[17:16:27]load:0x3fff0018,len:4
[17:16:27]load:0x3fff001c,len:1044
[17:16:27]load:0x40078000,len:8896
[17:16:27]load:0x40080400,len:5828
[17:16:27]entry 0x400806ac
[17:16:28][I][logger:214]: Log initialized
[17:16:28][C][ota:461]: There have been 10 suspected unsuccessful boot attempts.
[17:16:28][D][esp32.preferences:114]: Saving preferences to flash...
[17:16:28][E][ota:468]: Boot loop detected. Proceeding to safe mode.
[17:16:28][I][app:029]: Running through setup()...
[17:16:28][C][wifi:037]: Setting up WiFi...

That's when powering the esp32 itself with 3v on the UART pins, is that supposed to boot ? I can't get any logs when giving the whole board 5v through the bottom header of course so that's difficult to diagnose.
With that it doesn't seem to connect to the wifi at all anymore so I'm not sure it's the same issue as I started with.

Any help would be appreciated, I'm stuck.
One detail is in the videos I saw the bottom header has the 5v and GND pins labelled as such, whereas mine has 'TP7' and 'TP1' instead there. I'm assuming they're still the same pins and I've been using them as such (and presumably haven't fried anything since wifi did come up with the first config) but maybe I'm wrong.

@Ulrar
Copy link
Author

Ulrar commented Mar 15, 2022

I've just tried using https://web.esphome.io/ to flash the default 'prepare for adoption' firmware on there as a test, and I get the same behavior with that (except it crashes while trying to setup BLE).

So I suspect it's not possible for the ESP32 to power up when getting 3v on the UART pins, maybe it does need to be powered through the 5v header pin for a successful boot.
Unfortunately that means I have no way to debug the issue, as I can't get logs out when powering it that way :(

@Uniquely1709
Copy link

Since today I am experiencing the same issue. My first Sonoff is not reachable since an update and is built in, so powered by 5v, I cant reach the log or api, but its connected to my wifi and I can ping it. My second one, which I prepared for testing has now the same issue but is connected via 3.3v on a testbench, both are stuck at the home assistant logo and flash from time to time, both don't show any IP address. is there something I can do to debug it further?

@Ulrar
Copy link
Author

Ulrar commented Mar 16, 2022

Ah, that's interesting. So you're saying you have the same behavior on a unit that was working until recently ?
Glad to know I didn't fry mine somehow.

That sounds like this issue should be opened on the esphome tracker instead of here, maybe the latest update broke something for that chip. I'll open up an issue there and reference this one.

@Uniquely1709
Copy link

I found out what my problem was, its mentioned here. i was on the edge with my script size and this caused the behavior on my end. After cleaning up the config and removing unused entities both devices are working fine again. Sadly I don't think that applies to your minimal setup ;)

@Ulrar
Copy link
Author

Ulrar commented Mar 16, 2022

Arf, good for you but bad for me.
So you can confirm that the chip boots and connects to wifi fine when powered through the 3v UART pins ?

@Uniquely1709
Copy link

Yeah, on my testbench it works completely fine with 3.3V. It functions totally normal, I can do ota updates, TFT updates and interact with the screen.

@Ulrar
Copy link
Author

Ulrar commented Mar 16, 2022

Figured it out now, it doesn't boot correctly when powered with the 3v header, and my serial adapter's 5v mode doesn't actually supply 5v, it's more like 4.9 which doesn't seem to be enough.

I grabbed a breadboard power supply instead which seems to provide a cleaner 5v output, and with that on the 8 pin header it boots up just fine. What a waste of time because of a crappy serial adapter !

Now to figure out where to host the tft file in http, that's getting surprisingly hard to find

@Ulrar Ulrar closed this as completed Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants