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)
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)
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.
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)
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.
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.
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's fast as well.
yeah after you mentioned it i turned on ftp to test it. im making progress faster because i can test small changes quickly now, thanks!
Post automatically merged:
I figured out how to add new pages, so i added a system information page and removed the system information modal from the Payload Manager page (the home page). Added the System Information as a option in the navigation dropdown on each of the pages.
currently working on shrinking the file sizes by having one css reference file and removing the style tag from each of the pages and linking to the css file. config page works fine this way, thats the only one i completed so far
yeah after you mentioned it i turned on ftp to test it. im making progress faster because i can test small changes quickly now, thanks!
Post automatically merged:
I figured out how to add new pages, so i added a system information page and removed the system information modal from the Payload Manager page (the home page). Added the System Information as a option in the navigation dropdown on each of the pages.
currently working on shrinking the file sizes by having one css reference file and removing the style tag from each of the pages and linking to the css file. config page works fine this way, thats the only one i completed so far
The fastest way to do this is to just upload all the pages to Deepseek AI (free version) or some other AI, tell it you want an unified CSS file that will work for all the pages on both mobile and PC and let it do it's thing. That will save you a huge amount of work and you can tweak anything it goes wrong. You can also ask it to re theme to a colour scheme of your choice. Keep the original html and javascript but just replace the css code in each page.
Ok I've had a look at the code now since I got some time, I've changed the code to this for rebooting as this is the correct way after a firmware update according to the esp32-s3 documentation.
Code:
#include "soc/rtc_cntl_reg.h" // or use the raw address
void full_restart(void) {
// Preferred (uses the proper register definition)
REG_WRITE(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_SW_SYS_RST);
// Equivalent raw form (from TRM / reported working):
// REG_WRITE(0x60008000, 1UL << 31);
while (1) {} // never returns
}
As for the html/css - don't bother, i've already done it now and will post updated files + sketch + tools later.
Post automatically merged:
Here you go, all the new fixes applied and new theme with easier to edit css file. I've included the source for the Android apk and the apk + page header file scripts and programs. There's some other info like pdf files and pictures for the RCM circuit for internal installs. New theme tested on pc+mobile. If you want to make new themes easily, just upload the css file to your favourite Ai, tell it the colours you want and hopefully it will give you the correct css file back. Claude seems good for this, so does deep seek.
Themes's zip contains 6 themes so you can change the look of the webui to suit your own preferences, once you compile and flash the updated firmware if you want to change the theme just upload one of the themed css files into the root of your flash and make sure it's called styles.css, then refresh the page. These themes are very quickly made and look pretty neat. I am sure you can make your own based on these.
The fastest way to do this is to just upload all the pages to Deepseek AI (free version) or some other AI, tell it you want an unified CSS file that will work for all the pages on both mobile and PC and let it do it's thing. That will save you a huge amount of work and you can tweak anything it goes wrong. You can also ask it to re theme to a colour scheme of your choice. Keep the original html and javascript but just replace the css code in each page.
Ok I've had a look at the code now since I got some time, I've changed the code to this for rebooting as this is the correct way after a firmware update according to the esp32-s3 documentation.
Code:
#include "soc/rtc_cntl_reg.h" // or use the raw address
void full_restart(void) {
// Preferred (uses the proper register definition)
REG_WRITE(RTC_CNTL_OPTIONS0_REG, RTC_CNTL_SW_SYS_RST);
// Equivalent raw form (from TRM / reported working):
// REG_WRITE(0x60008000, 1UL << 31);
while (1) {} // never returns
}
As for the html/css - don't bother, i've already done it now and will post updated files + sketch + tools later.
Post automatically merged:
Here you go, all the new fixes applied and new theme with easier to edit css file. I've included the source for the Android apk and the apk + page header file scripts and programs. There's some other info like pdf files and pictures for the RCM circuit for internal installs. New theme tested on pc+mobile. If you want to make new themes easily, just upload the css file to your favourite Ai, tell it the colours you want and hopefully it will give you the correct css file back. Claude seems good for this, so does deep seek.
Themes's zip contains 6 themes so you can change the look of the webui to suit your own preferences, once you compile and flash the updated firmware if you want to change the theme just upload one of the themed css files into the root of your flash and make sure it's called styles.css, then refresh the page. These themes are very quickly made and look pretty neat. I am sure you can make your own based on these.
i havent had time to work on this over the weekend with school having started (4 kids and one more due any day now) but i appreciate all youve done here and will review when i have time. I didnt want to throw everything into AI as this has been a big learning opportunity for me. the minify program didnt work well with my CSS so i iterated with AI until i got a program that works well (css specific). that was the first C++ program ive worked on, so that was fun! alot of firsts for me on this. i have already gone through the and updated the following pages:
config, home page, fw update
and added a new page for system information
going through it has helped me better understand the project and learned a bunch of things along the way.
attaching my latest version for reference, will check out your changes and themes when i have some time. thanks again for all the time you spent helping me with this
I spent all day yesterday fixing/adding stuff and redesigning the web pages. You should use the attached files from now on as the base files as these are what will be used going forward. The file editor has search and replace added to it and there's new logic/script in some pages. Sorry about that, but like you say - you did learn quite alot, which is good. Have a look at these as I addressed all the issues you pointed out. I like your system info page but I prefer the popup one in the attached pages if I am honest (each to there own). These pages are probably going to be the final design unless you can find some issues with them and maybe we can work together to address that. You should give me your minify program so I can check it out, I can add it to the tools I use. I've still to test fully on mobile phones but that will not affect the pages - only css if anything needs changed. I won't bother attaching screenshots for now. I'll wait until you test these before making any themes for them.
i know you will be dissapointed probably as you spent quite a bit of time moddifiying all the old pages, but these ones have better logic as you will see when you test them - so if you want to make any changes going forward please use these. Sorry about that. Use the updated code I posted in the previous thread but replace the pages with these and generate new headers before compiling.
I spent all day yesterday fixing/adding stuff and redesigning the web pages. You should use the attached files from now on as the base files as these are what will be used going forward. The file editor has search and replace added to it and there's new logic/script in some pages. Sorry about that, but like you say - you did learn quite alot, which is good. Have a look at these as I addressed all the issues you pointed out. I like your system info page but I prefer the popup one in the attached pages if I am honest (each to there own). These pages are probably going to be the final design unless you can find some issues with them and maybe we can work together to address that. You should give me your minify program so I can check it out, I can add it to the tools I use. I've still to test fully on mobile phones but that will not affect the pages - only css if anything needs changed. I won't bother attaching screenshots for now. I'll wait until you test these before making any themes for them.
i know you will be dissapointed probably as you spent quite a bit of time moddifiying all the old pages, but these ones have better logic as you will see when you test them - so if you want to make any changes going forward please use these. Sorry about that. Use the updated code I posted in the previous thread but replace the pages with these and generate new headers before compiling.
not disappointed at all. i was doing this on my spare time and i enjoy it and enjoy learning. the reason i put the sysinfo on a separate page was so i could have a link to it on each other page without having all the html/css/js that goes with it on every page. my minify program is in the attachment in the post above (put it in the same folder as the other minify program and source is in there). ill check out your updates and changes when i have some time and give feedback
edit:
i guess you could have a placeholder element on each page and link to a js file that has the function to generate the sysinfo so you could put it on each page as a link without the duplication
Post automatically merged:
so i did a little testing with different esp32 board versions. i know mine wasnt injecting in v3.3.11 but i tested 3.3.8, 3.3.9 and 3.3.10 and they all work. havent re-tested 3.3.11 yet. the firmware size does grow about 10-12KB in case thats a concern
The exe file you generated is large, I guess the compiler you used is embedding some files, in windows you can compile with visual studio tools command prompt - "cl /EHsc /W4 /O2 minifycss.cpp" this creates a small exe under 200kb, then you can compress with upx packer. The resulting exe is about 85kb. I'll attach the smaller exe for you.
I guess we could could have an external js file for all javascript functions and call that from the html pages, but I am happy for now without that as the code is still quite small and fits on esp32-s3 quite well. If we need to squish down the code more we could do that though so it's an option.
The exe file you generated is large, I guess the compiler you used is embedding some files, in windows you can compile with visual studio tools command prompt - "cl /EHsc /W4 /O2 minifycss.cpp" this creates a small exe under 200kb, then you can compress with upx packer. The resulting exe is about 85kb. I'll attach the smaller exe for you.
I guess we could could have an external js file for all javascript functions and call that from the html pages, but I am happy for now without that as the code is still quite small and fits on esp32-s3 quite well. If we need to squish down the code more we could do that though so it's an option.
thanks for that. i am still fairly new to this so i wasnt sure how the other minify app which had a much larger code base ended up being so much smaller when stripped. ill try this out!
thanks for that. i am still fairly new to this so i wasnt sure how the other minify app which had a much larger code base ended up being so much smaller when stripped. ill try this out!
Well you're learning, so it's not an issue. (most of the time it's best to cross compile in linux (ubuntu etc) and then copy to pc and pack with upx if you want a small exe).
Here's what my newly compiled bin file sizes look like compiling with cl on windows. (these are static linked)
We could also do this, instead of using Arduino we could easily convert this to a visual studio code project, that way it would be guaranteed to use the correct libraries and esp-idf compilers. We could also convert to esp-idf (but that's more complex for noobs). I picked Arduino for now as it's easy and lots of noobs are used to using that. For me it's not an issue using any of those but for someone new to coding like you would it be better to convert to visual studio code project or leave it as an Arduino ide project?
It’s about that time of year again where I check in with the community to see if we can get the front page aligned with what people are interested in knowing and what...
Images for the rumoured Zelda-themed limited edition Switch 2 for The Legend of Zelda's 40th Anniversary have started to leak online.
The leak shows only the...
Hoenn to the ROM hacking scene is like Kanto to the official games. It's everywhere. At this point you've probably played through Pokemon Emerald with a party of...
After being announced last year, the fan-made remake Gamma Emerald has finally gotten its first early access release. A complete rebuild of fan-favourite Pokemon...
WiiCompiled is a new project that lets PC gamers play Mario Kart Wii natively on PC without emulation. Using static recompliation to convert the code into native PC...
With the latest entry to the Fire Emblem series, Fortune's Weave, set to launch in September, Nintendo have today announced a new Nintendo Direct to put it soundly in...
Though we knew all the way back in May that this was coming, the exact numbers remained a mystery for prospective Nintendo gamers in the UK. If you happen to have...
So I got pretty lucky on this one. Having ordered the physical version of Oblivion Remastered on Switch 2, I had it delivered earlier today, beating out the official...
The long awaited Grand Theft Auto VI Extended Look gameplay trailer has finally dropped on YouTube. As you all know, it had dropped 6 hours earlier on Netflix, and...
Thanks to the recent decomplication efforts; The Minish Cap 3DS brings the Game Boy Advance classic Zelda title to your 3DS.
The port takes full advantage of the 3DS...
It’s about that time of year again where I check in with the community to see if we can get the front page aligned with what people are interested in knowing and what...
Though we knew all the way back in May that this was coming, the exact numbers remained a mystery for prospective Nintendo gamers in the UK. If you happen to have...
Images for the rumoured Zelda-themed limited edition Switch 2 for The Legend of Zelda's 40th Anniversary have started to leak online.
The leak shows only the...
The long awaited Grand Theft Auto VI Extended Look gameplay trailer has finally dropped on YouTube. As you all know, it had dropped 6 hours earlier on Netflix, and...
In the wake of Sony's shift to a digital-only ecosystem within the next year, Xbox have today announced a surprising scheme. Aiming to offer physical buyers the same...
After being announced last year, the fan-made remake Gamma Emerald has finally gotten its first early access release. A complete rebuild of fan-favourite Pokemon...
Thanks to the recent decomplication efforts; The Minish Cap 3DS brings the Game Boy Advance classic Zelda title to your 3DS.
The port takes full advantage of the 3DS...
GBAtemp is and always has been an independent community. Since 2002 our staff have voluntarily kept the site running, added new forums, features, provided constant...
With the latest entry to the Fire Emblem series, Fortune's Weave, set to launch in September, Nintendo have today announced a new Nintendo Direct to put it soundly in...
Over the past week, rumors have started swirling as Redditors (probably correctly) deduced the title of the upcoming Elder Scrolls game, which will apparently be...