-
-
Notifications
You must be signed in to change notification settings - Fork 695
ESP32-S3 - Arduino framework - WIFI credentials not saved ("wrong" bootloader fixes the issue?) #867
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
Comments
Hi @Ezekiel-DA ! I suppose you're using the [env:esp32-s3-devkitc-1]
platform = espressif32
framework = arduino
board = esp32-s3-devkitc-1
board_build.flash_mode= qio |
Hi @valeros ! Thanks for the reply! I am indeed using The board in question is actually a genuine Espressif ESP32-S3-DevKitC-1-N8 acquired from Adafruit. After creating this issue and in attempt to automate the workaround, I did add This works, but really only raises more questions! The resulting upload command becomes the one I outlined as a workaround, i.e.: it Indeed, when the ESP32-S3 boots, it still reports
|
That's expected, the |
Thank you for the clarification! I'll admit I'm a little out of my depth here, while the software part is in my wheelhouse, I'm not familar enough with the hardware side to understand all the details. Given that this is an original Espressif board, should the default behavior for |
Thanks for testing, fixed in the dev branch. |
Uh oh!
There was an error while loading. Please reload this page.
Hi all,
I am trying to migrate an existing app from ESP32 to ESP32-S3.
Specifically, I am using:
platform = https://github.com/platformio/platform-espressif32.git
); also reproducible with 4.4.0 (platform = espressif32
)The Arduino IDE (v 1.8.19) and arduino-esp32 (v2.0.3) were also used to debug this, for reasons that will be clear below.
TL;DR:
My app makes use of WifiProv for provisioning. After migrating to the ESP32-S3, provisioning through BLE "works", but seems to no longer save wifi credentials to the device, making it useless.
I was able to "fix" this by doing something that sounds like nonsense (but is what the Arduino IDE does?): a manual upload with
esptool.py
that usesflash_mode
set toDIO
but uploads theQIO
bootloader. That makes no sense to me, and obviously isn't what happens when using normal Platform.io upload commands.Investigation notes:
I have created a minimal reproduction repo here. This is basically the WifiProv example, ported to Platform.io, with a tiny change to enable BLE provisioning instead of SoftAP provisioning.
I used the Arduino IDE as a point of comparison / reference. Turns out, if I upload my code from there, everything works!
This suggests the isssue is not with my firmware but with some settings. Using the Verbose Upload command in Platform.io and Process Explorer, I captured the
esptool.py
commands used by the Arduino IDE and Platform.io.Arduino IDE:
Platform.io:
Based on this, I tested out several things using esptool.py manually:
partitions.bin
andboot_app0.bin
have no effect, and indeed the binary files Pure Arduino and Platform.io point to are identicalThat left me with the bootloader as a potential culprit. A binary diff of the "temp" bootloader the Arduino IDE uses (
C:\Users\nicol\AppData\Local\Temp\arduino_build_174251/WiFiProv.ino.bootloader.bin
in my case) with the files found in the Arduino IDE install (C:\Users\nicol\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\tools\sdk\esp32s3\bin
for me) shows something very interesting: the bootloader being uploaded isbootloader_qio_80m.bin
. Note: Qio, not Dio. This is not a typo on my end, despite theesptool.py
command being issued with--flash_mode dio
!Indeed, armed with this, I tried a manual upload again with just files from Platform.io like this:
This is the exact same command as the one issued natively by Platform.io, including setting
--flash-mode dio
, EXCEPT that the bootloader used in the QIO file.This fixes the issue for me, but obviously a) I don't want to have to upload manually and b) this opens up a whole lot of questions like "am I doing something fundamental very wrong or is there some odd bug here?" :)
(sidenote: I tested changing
--flash_mode
toqio
to match the bootloader: this seems to result in a boot loop on my device).Thanks in advance for any help!
The text was updated successfully, but these errors were encountered: