V1 Unpatched Switch ESP32-S3 payload injector

  • Thread starter Thread starter AmeliaFox
  • Start date Start date
  • Views Views 9,257
  • Replies Replies 93
  • Likes Likes 9
Yes it will be bigger as the files are stripped and converted back to h using a custom minify version I got from mrdude that strips out all comments, spaces and stuff to make the file smaller before compressing and converting to the header file. Actually he made a few custom programs to automate everything. I don't know if he will want me to post them, I'm friends with him on a different website so I'll send him a message and ask but I don't know when he will reply as he's not online sometimes for quite a while.
that would be great if it could be shared :)

in the meantime, i was able to update the config page. i think i was doing the compression wrong initially. file size is better but still not as good as what you have (33KB vs 30KB) but i now have a path forward.

will play with this and see if i can make some UI changes and post back here

edit:
any idea what the Button GPIO Pin is used for?
1787750889573.png
 
Last edited by mcPickleRick,
that would be great if it could be shared :)

in the meantime, i was able to update the config page. i think i was doing the compression wrong initially. file size is better but still not as good as what you have (33KB vs 30KB) but i now have a path forward.

will play with this and see if i can make some UI changes and post back here
I've sent him a pm, so hopefully will hear back later today. Usually when he gives something he wants something back in return - so if you modify the pages themes or headers I expect he will want to see them. I am not just talking about changing some text or something, he will want something "different" or better than what he gave you/me.

I'm rubbish at website stuff so wouldn't know where to begin, I can just about draw a stickman on a bit of paper - that's my artistic limits. Being colour blind doesn't help either - blue and green just look the same to me, sometimes I think blue is grey. I get my wife to pick all the paint and stuff in the house.
 
  • Haha
Reactions: mcPickleRick
I've sent him a pm, so hopefully will hear back later today. Usually when he gives something he wants something back in return - so if you modify the pages themes or headers I expect he will want to see them. I am not just talking about changing some text or something, he will want something "different" or better than what he gave you/me.

I'm rubbish at website stuff so wouldn't know where to begin, I can just about draw a stickman on a bit of paper - that's my artistic limits. Being colour blind doesn't help either - blue and green just look the same to me, sometimes I think blue is grey. I get my wife to pick all the paint and stuff in the house.
im not very artistic either, my wife picks my clothes out and sets my clothes for me when we have any type of event :)
 
  • Like
Reactions: snuffbot1
edit:
any idea what the Button GPIO Pin is used for?
View attachment 587813
By default most esp boards have a button mapped to gpio 0, this is used to turn on and off the onboard addressable led on some boards. Long press for 5 seconds removes the config file and resets all the settings.

If you look at the button handler code it can have 3 states "single press", "double press", "long press". The touch gpio is for if you have a capacitive touch sensor to wake up/reset. RCM strap pin is if wiring an internal modchip you can use that pin for setting the switch into RCM mode automatically when the switch boots (you needs mosfet and a resistor if I recall for this - there's drawings showing how to do it).

You should try reading the code, it basically tells you what things do.

There's also an Android bluetooth app so you can change payloads from your phone if doing an internal install, so you should check that out.
 
Last edited by snuffbot1,
  • Like
Reactions: mcPickleRick
By default most esp boards have a button mapped to gpio 0, this is used to turn on and off the onboard addressable led on some boards. Long press for 5 seconds removes the config file and resets all the settings.

If you look at the button handler code it can have 3 states "single press", "double press", "long press". The touch gpio is for if you have a capacitive touch sensor to wake up/reset. RCM strap pin is if wiring an internal modchip you can use that pin for setting the switch into RCM mode automatically when the switch boots (you needs mosfet and a resistor if I recall for this - there's drawings showing how to do it).

You should try reading the code, it basically tells you what things do.

There's also an Android bluetooth app so you can change payloads from your phone if doing an internal install, so you should check that out.
yeah ive been digging into the code more, i think the touch and rcm ones are clear just wasnt sure about the button one. i will add some tooltips so there is additional info in the web interface
 
yeah ive been digging into the code more, i think the touch and rcm ones are clear just wasnt sure about the button one. i will add some tooltips so there is additional info in the web interface
OK good news for you, mrdude said i can give you the files. I gave him a keyen for a program he wanted in return.

Unizip this to the same directory as your ino file. So you should have a folder called helper in there now. Edit the html files in pages folder to your liking. Once done click on runme.bat and it will create the header files and automatically put them into the include folder once they are made.

I've include the source code for the compressor/convertor and minify. The binaries are build already so this is just incase you want to make sure there's no dodgy stuff going on. In the binaries folder is some text files. These are used for automatically replacing code in the minified files if minifier breaks anything. You should leave them as they are unless you added some code and it's not displaying properly after being minified.

I'll be expecting you to fix the headers and stuff to how you want and then post the results so we can all see how you expected the code to look :-). You should also check on a mobile phone and pc to make sure that everything works.
 

Attachments

Last edited by snuffbot1,
  • Love
Reactions: mcPickleRick
Yes it will be bigger as the files are stripped and converted back to h using a custom minify version I got from mrdude that strips out all comments, spaces and stuff to make the file smaller before compressing and converting to the header file. Actually he made a few custom programs to automate everything. I don't know if he will want me to post them, I'm friends with him on a different website so I'll send him a message and ask but I don't know when he will reply as he's not online sometimes for quite a while.
Please say to him. "Impeeza says hi"
 
OK good news for you, mrdude said i can give you the files. I gave him a keyen for a program he wanted in return.

Unizip this to the same directory as your ino file. So you should have a folder called helper in there now. Edit the html files in pages folder to your liking. Once done click on runme.bat and it will create the header files and automatically put them into the include folder once they are made.

I've include the source code for the compressor/convertor and minify. The binaries are build already so this is just incase you want to make sure there's no dodgy stuff going on. In the binaries folder is some text files. These are used for automatically replacing code in the minified files if minifier breaks anything. You should leave them as they are unless you added some code and it's not displaying properly after being minified.

I'll be expecting you to fix the headers and stuff to how you want and then post the results so we can all see how you expected the code to look :-). You should also check on a mobile phone and pc to make sure that everything works.
challenge accepted! thanks so much for this, making updates without this was very annoying. i do have a few tweaks i want to make along with the headers. i only have time to work on this in the evenings so it may be slow go but ill keep posting updates here

thanks again, much appreciated!
Post automatically merged:

first (minor) test update made! added an information icon next to the firmware version with the latest changes. also, there was another typo in the code and the config page. the LED is listed as WS212B when it is actually WS2812B. updated the config and the ino file to reflect this. will work on a few more updates tonight and see if i can make any meaningful changes:
1787797144903.png

Post automatically merged:

another minor update...display selected file name with a clear selection button next to it on the firmware update screen:
1787799628597.png
 
Last edited by mcPickleRick,
@mcPickleRick
Good spot on the ws2812b, I never noticed that either. I've also updated the code for that, I should probably put a check in to the tar installer to get the sleep state when uploading/installing tar files so that when doing that we temp stop sleep and then resume it once the tar is installed. I'll do that later while you are messing about with the webui.

I won't be working much on this code this week though as i just got a new esp32-c5 dev board and I'm making a matter over thread border gateway router with it and a web ui so I can input console commands, upgrade firmware and stuff like that.

EDIT: Here's the updated ino file with all recent fixes and logic added to disable/reset the timer when doing a firmware upload/update and uploading and installing tar files. I also added the other fixes for renamed ws2812b/cdc detection.

FYI on your amoled touch 1.8 I think the CS GPIO for the Micro SD card is GPIO 7, I don't have any spare cards to test with but if you install one format it to fat and when you check the information page it should show the flash size as the size as the micro sd card, so you can basically have a massive flash for storing payloads or a webserver. I have got css font face installed for PS4 in it's own folder so can use this for Switch and PS4.
 

Attachments

Last edited by snuffbot1,
@mcPickleRick
Good spot on the ws2812b, I never noticed that either. I've also updated the code for that, I should probably put a check in to the tar installer to get the sleep state when uploading/installing tar files so that when doing that we temp stop sleep and then resume it once the tar is installed. I'll do that later while you are messing about with the webui.

I won't be working much on this code this week though as i just got a new esp32-c5 dev board and I'm making a matter over thread border gateway router with it and a web ui so I can input console commands, upgrade firmware and stuff like that.

EDIT: Here's the udpdated ino file with all recent fixes and logic added to disable/reset the timer when doing a firmware upload/update and uploading and installing tar files. I also added the other fixes for renamed ws2812b/cdc detection.

FYI on your amoled touch 1.8 I think the CS GPIO for the Micro SD card is GPIO 7, I don't have any spare cards to test with but if you install one format it to fat and when you check the information page it should show the flash size as the size as the micro sd card, so you can basically have a massive flash for storing payloads or a webserver. I have got css font face installed for PS4 in it's own folder so can use this for Switch and PS4.
that sounds like a fun project, good luck! thanks for posting the fixes, ill merge them in with my updates once im ready to release them (messing with different header layouts). ill test the amoled sd card stuff once i get around to working on the screen code as well
 

Site & Scene News

Popular threads in this forum