V1 Unpatched Switch ESP32-S3 payload injector

  • Thread starter Thread starter AmeliaFox
  • Start date Start date
  • Views Views 9,921
  • Replies Replies 106
  • Likes Likes 9
You should compile it for a 4MB board. It will still work on your board (but the flash will show less space).

I think you are confused about sleep functions, you should check this page - https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/system/sleep_modes.html

It will show you how they work, that code line to sleep for 1 micro second was added on purpose so that the esp32-s3 had time to do something else in the browser or something else, I can't remember of the top of my head but it wasn't just added for no reason.
thanks for the additional info, ill compile a 4MB version and test soon.

ill also have a peek at that sleep modes documentation. i left the esp_deep_sleep(1) /reboot alone and added a ESP.restart() call at /reboot-hard and am only using it for the firmware update page after a firmware flash (this worked great when i tested). the other pages are still using the /reboot call which does the esp_deep_sleep(1)
 
  • Like
Reactions: snuffbot1
thanks for the additional info, ill compile a 4MB version and test soon.

ill also have a peek at that sleep modes documentation. i left the esp_deep_sleep(1) /reboot alone and added a ESP.restart() call at /reboot-hard and am only using it for the firmware update page after a firmware flash (this worked great when i tested). the other pages are still using the /reboot call which does the esp_deep_sleep(1)
Ok that's great, still make a list though of the files/functions changed or added and what the changes do so that they can be reviewed easily. Alot of testing was already carried out, but some things might have been missed (like typo's), so it's good you are pointing out issues so that when this program is finally completed everyone can enjoy it.

PS: as far as I remember that line esp_deep_sleep(1) forced the esp32 wifi to shutdown and restart, and the webage has a timer that makes the page refresh so that when the fw update was called the page reloaded. When you call esp restart code you are basically not allowing this to happen. ESP.restart() as far as I know doesn't do a proper hard restart so that's why it wasn't used.

ESP.reset() - hard restart (can leave some of the registers in the old state which can lead to problems)
ESP.restart() - soft restart (still uses the firmware you are already running)
Post automatically merged:

@mcPickleRick

FYI, if you don't know, you can just upload the html webfiles I gave you to the root of the flash and these will superceed/take prioriy over the hard coded ones. that way you don't need to keep building firmware/flashing/rebooting to test. You can just use the chips own filemanager to upload these, and if you make small changes you can use the built in file editor.

For some reason I am thinking you are not doing that.
 
Last edited by snuffbot1,
  • Love
Reactions: mcPickleRick
Ok that's great, still make a list though of the files/functions changed or added and what the changes do so that they can be reviewed easily. Alot of testing was already carried out, but some things might have been missed (like typo's), so it's good you are pointing out issues so that when this program is finally completed everyone can enjoy it.

PS: as far as I remember that line esp_deep_sleep(1) forced the esp32 wifi to shutdown and restart, and the webage has a timer that makes the page refresh so that when the fw update was called the page reloaded. When you call esp restart code you are basically not allowing this to happen. ESP.restart() as far as I know doesn't do a proper hard restart so that's why it wasn't used.

ESP.reset() - hard restart (can leave some of the registers in the old state which can lead to problems)
ESP.restart() - soft restart (still uses the firmware you are already running)
Post automatically merged:

@mcPickleRick

FYI, if you don't know, you can just upload the html webfiles I gave you to the root of the flash and these will superceed/take prioriy over the hard coded ones. that way you don't need to keep building firmware/flashing/rebooting to test. You can just use the chips own filemanager to upload these, and if you make small changes you can use the built in file editor.

For some reason I am thinking you are not doing that.
i hadnt tested the ESP.reset() but i know for sure that the ESP.restart() loads the newly uploaded firmware right away without issue from the web interface. the esp_deep_sleep(1) works fine for the wifi on the config page. the only spot i changed it was for the firmware updates because it seems to be a better experience for me.

and youre right lol, i have been recompiling and flashing the new firmware. i was not aware that i could upload the files to the root. that would have saved me alot of time :) do i upload the html files directly or run the script and upload the newly created header files?
 
i hadnt tested the ESP.reset() but i know for sure that the ESP.restart() loads the newly uploaded firmware right away without issue from the web interface. the esp_deep_sleep(1) works fine for the wifi on the config page. the only spot i changed it was for the firmware updates because it seems to be a better experience for me.

and youre right lol, i have been recompiling and flashing the new firmware. i was not aware that i could upload the files to the root. that would have saved me alot of time :) do i upload the html files directly or run the script and upload the newly created header files?
No you don't need to run the script, just upload the html files directly. This will save you a lot of time. You only need to run the scripts when you are finished modding the html pages.
 
  • Like
Reactions: mcPickleRick
damn, this is so much faster for testing. not sure why it didnt cross my mind
You do know you can edit them directly on the esp32 board using the file editor, right? If you are just making small changes like typo's and stuff like that. Also you can run the ftp server and upload files via ftp - that fast as well.
 

Site & Scene News

Popular threads in this forum