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

WLED-AP never appears #517

Closed
paularmstrong opened this issue Dec 25, 2019 · 30 comments
Closed

WLED-AP never appears #517

paularmstrong opened this issue Dec 25, 2019 · 30 comments
Labels
connectivity Issue regarding protocols, WiFi connection or availability of interfaces

Comments

@paularmstrong
Copy link

paularmstrong commented Dec 25, 2019

  • esp32s
  • binaries tried: 0.8.5, 0.8.6, 0.9.0-b1

No matter what I do, the wireless access point never shows up. The logs from esphomeflasher are completely blank, as if the device never actually starts up.

Logs via esptool.py

$ esptool.py write_flash 0x10000 ~/Downloads/WLED_0.8.5_ESP32.bin
esptool.py v2.8
Found 4 serial ports
Serial port /dev/cu.usbserial-A900HH38
Connecting........_____....._____....._____..
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 3c:71:bf:f9:fb:48
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 1027744 bytes to 593610...
Wrote 1027744 bytes (593610 compressed) at 0x00010000 in 52.7 seconds (effective 156.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Logs via esphomeflasher

Using '/dev/cu.usbserial-A900HH38' as serial port.
Connecting........_
Detecting chip type... ESP32
Connecting...

Chip Info:
 - Chip Family: ESP32
 - Chip Model: ESP32D0WDQ6 (revision 1)
 - Number of Cores: 2
 - Max CPU Frequency: 240MHz
 - Has Bluetooth: YES
 - Has Embedded Flash: NO
 - Has Factory-Calibrated ADC: YES
 - MAC Address: 3C:71:BF:F9:FB:48
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
 - Flash Size: 4MB
 - Flash Mode: dio
 - Flash Frequency: 80MHz
Erasing flash (this may take a while)...
Chip erase completed successfully in 6.6s
Compressed 15856 bytes to 10276...
Writing at 0x00001000... (100 %)Wrote 15856 bytes (10276 compressed) at 0x00001000 in 0.2 seconds (effective 531.9 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 143...
Writing at 0x00008000... (100 %)Wrote 3072 bytes (143 compressed) at 0x00008000 in 0.0 seconds (effective 1330.0 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.0 seconds (effective 3957.8 kbit/s)...
Hash of data verified.
Compressed 1034832 bytes to 591312...
Writing at 0x000a0000... (100 %)Wrote 1034832 bytes (591312 compressed) at 0x00010000 in 14.3 seconds (effective 578.9 kbit/s)...
Hash of data verified.

Leaving...
Hard Resetting...
Done! Flashing is complete!

Showing logs:

NOTE: The line from the wiki is very vague for someone unfamiliar with arduino

ESP32 (you will need to have a bootloader installed, you can flash the Arduino blink example to do that)

I believe I flashed the device with the "blink" example (though the blink example apparently is not ready out of the box and took some googling to figure out you need to add something like #define LED_BUILTIN 13 to the file before installing). I did this, it installed, then I went back and tried to install WLED again, same results.

Is there something wrong with what I'm doing? Is a step missing from the instructions?

@raoulteeuwen
Copy link

Afaik, Aircookie recommends esptool .... did you see this part on https://github.com/Aircoookie/WLED/wiki:

If you experience issues, run this command before trying write_flash again (Note: this will erase all settings stored on the ESP!)

esptool.py erase_flash

You can alternatively use my basic HTTP OTA updater sketch and upload the binary! This requires the Arduino IDE and ESP8266 core installed.

Did you try both?

@paularmstrong
Copy link
Author

paularmstrong commented Dec 25, 2019

I tried all of that. Eventually, after I gave up, it connected while I was trying a manual connection (but it took a good 5 minutes for it to respond)...

One major note: OS X displayed the setup page as a dialog. It did not require navigating with a browser.

Once I got it connected to my wifi, it seemed to work. However, it seems there may be some other issue, as the wifi doesn't seem to stay on. It will work for 5-10 minutes, then disappear from the network. I had esphome flashed on this device previously and it was working just fine, so I suspect something in WLED is causing issues.

@paularmstrong
Copy link
Author

Went back to esphome and the wifi works flawlessly. What can I do to help get WLED working?

@Aircoookie Aircoookie added the connectivity Issue regarding protocols, WiFi connection or availability of interfaces label Jan 4, 2020
@Aircoookie
Copy link
Member

Hi and sorry for the issues!
You could try reflashing the bootloader once again before using esptool (for example by uploading Arduino Blink sketch).
I will try to find what else might be causing your issue :)

@paularmstrong
Copy link
Author

You could try reflashing the bootloader once again before using esptool (for example by uploading Arduino Blink sketch).

There seems to be a code error in the Blink sketch. Could you recommend something different that could be uploaded that will actually compile?

@Mariu86
Copy link

Mariu86 commented Jan 6, 2020

If You have a error maybe it's something wrong with your settings.

@raoulteeuwen
Copy link

@Aircoookie any chance you contacting the esphome dev to exchange how you both handle wifi would be beneficial?

@paularmstrong
Copy link
Author

paularmstrong commented Jan 6, 2020

If You have a error maybe it's something wrong with your settings.

Never used Arduino app for anything else. Haven't touched any settings. What could I have missed configuring?

The error is that it's missing a constant being defined.

@raoulteeuwen
Copy link

Never used Arduino app for anything else. Haven't touched any settings. What could I have missed configuring?

Did you find and use the Compile settings at https://github.com/Aircoookie/WLED/wiki ?

@paularmstrong
Copy link
Author

Never used Arduino app for anything else. Haven't touched any settings. What could I have missed configuring?

Did you find and use the Compile settings at https://github.com/Aircoookie/WLED/wiki ?

Noob to ESPs here... what do I do with those? I used the "Quick Start Guide" higher on the page and followed the instructions under "I just want to use WLED! (install release binary)"

@raoulteeuwen
Copy link

Never used Arduino app for anything else. Haven't touched any settings. What could I have missed configuring?

Did you find and use the Compile settings at https://github.com/Aircoookie/WLED/wiki ?

Noob to ESPs here... what do I do with those? I used the "Quick Start Guide" higher on the page and followed the instructions under "I just want to use WLED! (install release binary)"

Because you mentioned "Never used Arduino app", and a remark was made about settings, i thought you might need those compile settings. But those, afaik, are only needed when you use Arduino IDE to flash stuff to your NodeMCU. You can find the Arduino IDE at https://www.arduino.cc/en/main/software . You could try it, it'll definitely make you learn something ;-) . Installation instructions for the Arduino IDE desktop app can be found at https://www.arduino.cc/en/Guide/HomePage . After which you could use http://help.blynk.cc/en/articles/512105-how-to-install-blynk-library-for-arduino-ide to flash the Blynk sketch to the NodeMCU.

@paularmstrong
Copy link
Author

Blynk? @Aircoookie and docs keep saying "Blink", which is built-in to the Arduino IDE and what I'm referencing when I say there's a compile issue.

@raoulteeuwen
Copy link

You're right, sorry, i'm mistaken...

@Aircoookie
Copy link
Member

Hi, sorry for the trouble getting it to work. I realized that even flashing the blink sketch requires you to install the ESP32 arduino core, which is not hard, but also not trivial.
I've extracted the Arduino bootloader to a .bin file for you: https://drive.google.com/file/d/1NQrBwb5WJz6WSEbotW-6NrmiLJ6Hc04F/view?usp=sharing

Just flash it to your ESP32 using

esptool.py write_flash 0x0 .\esp32_bootloader.bin

and everything should work! (if it doesn't, try running the regular ESP32 flash command from quickstart again)

@Aircoookie
Copy link
Member

@paularmstrong is this resolved?

@paularmstrong
Copy link
Author

I switched to a D1 mini using 0.9.x and it's working

@thecompoundingdev
Copy link

I just had this problem with an ESP32S- erased, flashed, flashed bootloader in different combinations and finally saw Aircookie's response. Thanks! I flashed the esp32 bootloader binary AFTER flashing wled binary and it worked!

@me-dex
Copy link

me-dex commented Oct 20, 2024

Update: I got WLED to compile and flash with PIO without issue for a ESP32-S3-DevKitC-1-N8R2. It seems that the pre-built binary produced for ESP32S3 by WLED is missing several components being flashed alongside the binary that PIO handles automagically

Writing at 0x00000000... (100 %)
Wrote 14768 bytes (10148 compressed) at 0x00000000 in 0.3 seconds (effective 410.0 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 127...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (127 compressed) at 0x00008000 in 0.1 seconds (effective 488.1 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Writing at 0x0000e000... (100 %)
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 640.5 kbit/s)...
Hash of data verified.
Compressed 1367072 bytes to 920468...
Writing at 0x00010000... (1 %)
Writing at 0x0001793f... (3 %)
Writing at 0x0001b867... (5 %)
...
Writing at 0x00151379... (96 %)
Writing at 0x00156bbd... (98 %)
Writing at 0x0015c918... (100 %)
Wrote 1367072 bytes (920468 compressed) at 0x00010000 in 8.0 seconds (effective 1368.2 kbit/s)...
Hash of data verified.

I assume its the bootloader at 0x0000 and the partition map at 0x8000, but I'm unsure of what 0xe000 is.

@me-dex
Copy link

me-dex commented Oct 20, 2024

image

@me-dex
Copy link

me-dex commented Oct 20, 2024

It appears that the data being flashed at 0xe000 is the factory OTA image (boot_app0.bin) which is what gets booted first on a factory reset. Looks like PIO might be flashing it with a stub. It would explain why WLED wasn't booting properly previously. Would probably help if a WLED binary was built with these components built in like with Tasmota or if it was more documented

@DedeHai
Copy link
Collaborator

DedeHai commented Oct 20, 2024

Manual flashing requires you to manually flash all partitions. The web installer should take care of that for you, if the board configuration is supported, as does VSC PIO.

@me-dex
Copy link

me-dex commented Oct 20, 2024

The web installer should take care of that for you, if the board configuration is supported, as does VSC PIO.

I can confirm that the web flasher is still broken for the ESP32-S3-DevKitC-1-N8R2 board. Results in the behavior described in #1212 (comment)

@me-dex
Copy link

me-dex commented Oct 20, 2024

It looks like the esp32s3dev_16MB_PSRAM_opi is a standard build for WLED, not one of the more unusual hardware configs described in the web-installer issue - wled/WLED-WebInstaller#22

https://github.com/Aircoookie/WLED/blob/1ff667b7eff07ebad100e48eb871c698eab11a71/platformio.ini#L45

Seems like more of a general issue with ESP32S3 builds/the web installer even for a standard board config

@blazoncek
Copy link
Collaborator

blazoncek commented Oct 20, 2024

I can confirm that the web flasher is still broken for the ESP32-S3-DevKitC-1-N8R2 board. Results in the behavior described in #1212 (comment)

S3 was not supported at the time of that issue. Unrelated.
S3 requires appropriate binary and bootloader depending on the type of flash and PSRAM. There are at least 6 different combinations of that.

If you think web installer is broken, please open an issue there. WLED in itself is fully working on any type of S3 we have encountered so far. Main reason for non-working installation is incorrect flashing procedure or incorrect binary type for chosen chip's flash/PSRAM combination.

EDIT: WLED releases page provides binaries for 3 types of S3 chip.

@me-dex
Copy link

me-dex commented Oct 20, 2024

S3 was not supported at the time of that issue. Unrelated.

So that's still the behavior I'm getting from the latest beta builds with a web flash/manual flash with the esp32s3dev_16MB_PSRAM_opi build

ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x3 (RTC_SW_SYS_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
Saved PC:0x403cd97a
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x44c
load:0x403c9700,len:0xbec
load:0x403cc700,len:0x2920
entry 0x403c98d8

The stable build of 0.14.4 flashed from the web flasher seem to be resulting in a different behavior (resolved by flashing over PIO):

SP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x10 (RTCWDT_RTC_RST),boot:0x8 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff
invalid header: 0xffffffff
invalid header: 0xffffffff
...

It does seem related to wled/WLED-WebInstaller#22 but extended to include standard board configs as well

@softhack007
Copy link
Collaborator

softhack007 commented Oct 20, 2024

It does seem related to Aircoookie/WLED-WebInstaller#22 but extended to include standard board configs as well

The details you find in
wled/WLED-WebInstaller#22 (comment) are actually true for all -S3 configurations. I'm not sure what is a "standard S3 config" for you - actually these main configurations exist today

  • (ESP32-S3-WROOM-2 excluded because we don't support opi_opi mode yet)
  • flash size: 4mb, 8mb, 16mb (32mb not supported yet in WLED)
  • PSRAM: none, less than 8mb (qspi mode), 8mb or more (opi mode).

So its 3x3 = 9 major configurations with different bootloader, partitions.bin, and firmware image. Only the "app0" partition is always the same. Unfortunately we cannot provide you with 2 or 3 firmware that "run on any S3".

And ... depending on who you ask ... depending on the month of the year ... you'd probably get different opinions on what is "standard"

I would strongly suggest that this discussion is put into the place where it belongs: https://github.com/Aircoookie/WLED-WebInstaller/issues

@softhack007
Copy link
Collaborator

A good overview of known -S3 configurations is here:

https://espeasy.readthedocs.io/en/latest/ESPEasy/ESPchips.html#quad-octal-spi-mode

@softhack007
Copy link
Collaborator

Btw, the discussion here went very much off-topic already. The original problem report was about some esp32S (classic esp32) not running with "dio" firmware.....

@RDJunc
Copy link

RDJunc commented Dec 1, 2024

Looks like I am to be added to the long list of those that have this problem.

Background:
I am not new to the ESP32 and its many flavors but I am new to WLED. (AMAZING!!!) So far, I have just used it with controllers that I bought. Two years ago, before I new about WLED, I designed a Christmas tree star with smart LEDs. I wrote firmware that included several effects but no where near what WLED can do. My primitive version accepted Bluetooth commands from a phone to change the effect. This year, I designed a new version that uses an ESP32-MINI. (I did this to avoid the issues that may be associated with the S and C versions.) I was careful about handling the strapping pins properly. The control pin is GPIO4.

Once built, I installed my original firmware and all was well. I use Visual Studio with the Visual Micro add-in as my IDE. It all uploads and runs just fine.

I have tried pretty much all of the ways to flash WLED onto the ESP32. This includes the WLED installer, esptool, and the Espressif flash tool. No joy. They all seem to flash but WLED doesn't show up in my network list.

Here is the response from esptool...

C:\Users\RJuncosa\Desktop\esptool-v4.2.1-win64>esptool.exe -p COM6 write_flash 0x10000 WLED_0.14.4_ESP32.bin esptool.py v4.2.1 Serial port COM6 Connecting........... Detecting chip type... Unsupported detection protocol, switching and trying again... Connecting.... Detecting chip type... ESP32 Chip is ESP32-U4WDH (revision 3) Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None Crystal is 40MHz MAC: 1c:69:20:13:f7:d0 Uploading stub... Running stub... Stub running... Configuring flash size... Flash will be erased from 0x00010000 to 0x00149fff... Compressed 1284976 bytes to 852357... Wrote 1284976 bytes (852357 compressed) at 0x00010000 in 78.5 seconds (effective 131.0 kbit/s)... Hash of data verified.

One things that I did notice is that when I flash my code with Visial Studio (which uses esptool) the reset after the load is clean. The transmit and receive LEDs on the board are off and the star runs its default effect. However, when I use esptool from the command line, the reset is not clean. The receive LED is lit. When I open a terminal, this is what I get...

`rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x401468b8: 21a10041 291f812c 00106403
Core 1 register dump:
PC : 0x401468be PS : 0x00060d30 A0 : 0x1d75dce8 A1 : 0x3ffb1d70
A2 : 0x00000010 A3 : 0x00000002 A4 : 0x00060120 A5 : 0x00000001
A6 : 0x00060120 A7 : 0x00000000 A8 : 0x80146854 A9 : 0x3ffb1d50
A10 : 0x00000000 A11 : 0x00060123 A12 : 0x00060120 A13 : 0x3ffb1efc
A14 : 0x000000ff A15 : 0x00000000 SAR : 0x00000010 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x4000c46c LEND : 0x4000c477 LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x401468bb:0x3ffb1d70 0x1d75dce5:0x3ffb1d90 |<-CORRUPTED
`
Of course, any assistance would be greatly appreciated.

@blazoncek
Copy link
Collaborator

Please use WLED forum or Discord for help and support questions.

@wled wled locked as off-topic and limited conversation to collaborators Dec 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
connectivity Issue regarding protocols, WiFi connection or availability of interfaces
Projects
None yet
Development

No branches or pull requests

10 participants