Skip to content

Commit

Permalink
Latest Stooged Version
Browse files Browse the repository at this point in the history
-Added GoldHEN 2.2.2
-Added PSXita Linux Payloads
-Added WhoIsThatSouthBridge payload
-Added new Sleirsgoevy jbc_loader on Linux Payloads.
-Added PKG-BackUP v1.1 Payload
  • Loading branch information
Kameleon authored and Kameleon committed Jun 7, 2022
1 parent 1e6582c commit 4a247fb
Show file tree
Hide file tree
Showing 64 changed files with 17,441 additions and 6,589 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions 3D_Printed_Cases/LILYGO_TTGO_T8_TF_Card_Slot/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LILYGO-TTGO-T8-TF-Card-Slot

<img src=https://github.com/stooged/ESP32-Server-900u/blob/main/3D_Printed_Cases/LILYGO_TTGO_T8_TF_Card_Slot/LILYGO_TTGO_T8_TF_Card_Slot.jpg>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions 3D_Printed_Cases/LILYGO_TTGO_T8_WOOR/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LILYGO-TTGO-T8-WOOR

<img src=https://github.com/stooged/ESP32-Server-900u/blob/main/3D_Printed_Cases/LILYGO_TTGO_T8_WOOR/LILYGO_TTGO_T8_WOOR.jpg>
2 changes: 2 additions & 0 deletions 3D_Printed_Cases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ i have created stl files to 3d print cases for the following boards.
<a href=https://github.com/stooged/ESP32-Server-900u/tree/main/3D_Printed_Cases/Wemos_S2_Mini>Wemos S2 Mini</a><br>
<a href=https://github.com/stooged/ESP32-Server-900u/tree/main/3D_Printed_Cases/DevKitM_1>DevKitM-1</a><br>
<a href=https://github.com/stooged/ESP32-Server-900u/tree/main/3D_Printed_Cases/ESP32_S2_Saola_1>ESP32-S2-Saola-1</a><br>
<a href=https://github.com/stooged/ESP32-Server-900u/tree/main/3D_Printed_Cases/LILYGO_TTGO_T8_TF_Card_Slot>LILYGO-TTGO-T8-TF-Card-Slot</a><br>
<a href=https://github.com/stooged/ESP32-Server-900u/tree/main/3D_Printed_Cases/LILYGO_TTGO_T8_WOOR>LILYGO-TTGO-T8-WOOR</a><br>


## ESP32-S3 Boards
Expand Down
Binary file modified 3D_Printed_Cases/UM_FeatherS2/UM_FeatherS2_bottom.stl
Binary file not shown.
Binary file modified 3D_Printed_Cases/UM_FeatherS2/UM_FeatherS2_top.stl
Binary file not shown.
124 changes: 103 additions & 21 deletions ESP32_Server_900u/ESP32_Server_900u.ino
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include <FS.h>
#include "WiFi.h"
#include "ESPAsyncWebServer.h"
#include "esp_task_wdt.h"
#include <DNSServer.h>
#include <ESPmDNS.h>
#include <Update.h>
Expand All @@ -17,10 +18,18 @@
#endif


// use SD Card [ true / false ]
#define USESD false // a FAT32 formatted SD Card will be used instead of the onboard flash for the storage.
// this requires a board with a sd card slot or a sd card connected.

// use FatFS not SPIFFS [ true / false ]
#define USEFAT false // FatFS will be used instead of SPIFFS for the storage filesystem or for larger partitons on boards with more than 4mb flash.
// you must select a partition scheme labeled with "FAT" or "FATFS" with this enabled.

// use LITTLEFS not SPIFFS [ true / false ]
#define USELFS false // LITTLEFS will be used instead of SPIFFS for the storage filesystem.
// you must select a partition scheme labeled with "SPIFFS" with this enabled and USEFAT must be false.

// enable internal goldhen.h [ true / false ]
#define INTHEN false // goldhen is placed in the app partition to free up space on the storage for other payloads.
// with this enabled you do not upload goldhen to the board, set this to false if you wish to upload goldhen.
Expand All @@ -34,6 +43,15 @@
// this will not work if the board is a esp32 and the usb control is disabled.


// enable esp sleep [ true / false ]
#define ESPSLEEP false // this will put the esp board to sleep after [TIME2SLEEP] minutes
// to wake the board up you will need to reboot the console or unplug/replug the esp board or press the reset button on the board.

#if ESPSLEEP
#define TIME2SLEEP 30 // minutes, the esp will goto sleep after this amount of time passes since boot.
#endif


//-------------------DEFAULT SETTINGS------------------//

// use config.ini [ true / false ]
Expand All @@ -42,7 +60,7 @@

//create access point
boolean startAP = true;
String AP_SSID = "kameleon900_ESP32-S2";
String AP_SSID = "Kme900";
String AP_PASS = "123456789";
IPAddress Server_IP(10,1,1,1);
IPAddress Subnet_Mask(255,255,255,0);
Expand All @@ -57,7 +75,7 @@ String WIFI_HOSTNAME = "ps4.local";
int WEB_PORT = 80;

//Auto Usb Wait(milliseconds)
int USB_WAIT = 10000;
int USB_WAIT = 5000;

// Displayed firmware version
String firmwareVer = "1.00";
Expand All @@ -69,13 +87,28 @@ String firmwareVer = "1.00";
#include "Pages.h"
#include "jzip.h"

#if USESD
#include "SD.h"
#include "SPI.h"
#define SCK 12 // pins for sd card
#define MISO 13 // these values are set for the LILYGO TTGO T8 ESP32-S2 board
#define MOSI 11 // you may need to change these for other boards
#define SS 10
#define FILESYS SD
#else
#if USEFAT
#include "FFat.h"
#define FILESYS FFat
#else
#if USELFS
#include <LittleFS.h>
#define FILESYS LittleFS
#else
#include "SPIFFS.h"
#define FILESYS SPIFFS
#endif
#endif
#endif

#if INTHEN
#include "goldhen.h"
Expand All @@ -91,6 +124,7 @@ boolean hasEnabled = false;
boolean isFormating = false;
long enTime = 0;
int ftemp = 70;
long bootTime = 0;
File upFile;
#if defined(CONFIG_IDF_TARGET_ESP32S2) | defined(CONFIG_IDF_TARGET_ESP32S3)
USBMSC dev;
Expand Down Expand Up @@ -253,17 +287,23 @@ void handleFileMan(AsyncWebServerRequest *request) {
File dir = FILESYS.open("/");
String output = "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>File Manager</title><link rel=\"stylesheet\" href=\"style.css\"><style>body{overflow-y:auto;} th{border: 1px solid #dddddd; background-color:gray;padding: 8px;}</style><script>function statusDel(fname) {var answer = confirm(\"Are you sure you want to delete \" + fname + \" ?\");if (answer) {return true;} else { return false; }} </script></head><body><br><table id=filetable></table><script>var filelist = [";
int fileCount = 0;
File file = dir.openNextFile();
while(file){
while(dir){
File file = dir.openNextFile();
if (!file)
{
dir.close();
break;
}
String fname = String(file.name());
if (fname.length() > 0 && !fname.equals("config.ini"))
if (fname.length() > 0 && !fname.equals("config.ini") && !file.isDirectory())
{
fileCount++;
fname.replace("|","%7C");fname.replace("\"","%22");
output += "\"" + fname + "|" + formatBytes(file.size()) + "\",";
}
file.close();
file = dir.openNextFile();
esp_task_wdt_reset();

}
if (fileCount == 0)
{
Expand All @@ -281,17 +321,22 @@ void handleDlFiles(AsyncWebServerRequest *request) {
File dir = FILESYS.open("/");
String output = "<!DOCTYPE html><html><head><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><title>File Downloader</title><link rel=\"stylesheet\" href=\"style.css\"><style>body{overflow-y:auto;}</style><script type=\"text/javascript\" src=\"jzip.js\"></script><script>var filelist = [";
int fileCount = 0;
File file = dir.openNextFile();
while(file){
while(dir){
File file = dir.openNextFile();
if (!file)
{
dir.close();
break;
}
String fname = String(file.name());
if (fname.length() > 0 && !fname.equals("config.ini"))
if (fname.length() > 0 && !fname.equals("config.ini") && !file.isDirectory())
{
fileCount++;
fname.replace("\"","%22");
output += "\"" + fname + "\",";
}
file.close();
file = dir.openNextFile();
esp_task_wdt_reset();
}
if (fileCount == 0)
{
Expand Down Expand Up @@ -319,13 +364,18 @@ void handlePayloads(AsyncWebServerRequest *request) {
output += "<a onclick=\"setpayload('goldhen.bin','" + String(INTHEN_NAME) + "','" + String(USB_WAIT) + "')\"><button class=\"btn\">" + String(INTHEN_NAME) + "</button></a>&nbsp;";
#endif

File file = dir.openNextFile();
while(file){
while(dir){
File file = dir.openNextFile();
if (!file)
{
dir.close();
break;
}
String fname = String(file.name());
if (fname.endsWith(".gz")) {
fname = fname.substring(0, fname.length() - 3);
}
if (fname.length() > 0 && fname.endsWith(".bin"))
if (fname.length() > 0 && fname.endsWith(".bin") && !file.isDirectory())
{
payloadCount++;
String fnamev = fname;
Expand All @@ -339,7 +389,7 @@ void handlePayloads(AsyncWebServerRequest *request) {
}
}
file.close();
file = dir.openNextFile();
esp_task_wdt_reset();
}

#if (!defined(USBCONTROL) | USBCONTROL) && FANMOD
Expand Down Expand Up @@ -464,18 +514,22 @@ void handleCacheManifest(AsyncWebServerRequest *request) {
#if !USBCONTROL
String output = "CACHE MANIFEST\r\n";
File dir = FILESYS.open("/");
File file = dir.openNextFile();
while(file){
while(dir){
File file = dir.openNextFile();
if (!file)
{
dir.close();
break;
}
String fname = String(file.name());
if (fname.length() > 0 && !fname.equals("config.ini"))
if (fname.length() > 0 && !fname.equals("config.ini") && !file.isDirectory())
{
if (fname.endsWith(".gz")) {
fname = fname.substring(0, fname.length() - 3);
}
output += urlencode(fname) + "\r\n";
}
file.close();
file = dir.openNextFile();
}
if(!instr(output,"index.html\r\n"))
{
Expand Down Expand Up @@ -533,8 +587,12 @@ void handleInfo(AsyncWebServerRequest *request)
output += "Flash frequency: " + String(flashFreq) + " MHz<br>";
output += "Flash write mode: " + String((ideMode == FM_QIO ? "QIO" : ideMode == FM_QOUT ? "QOUT" : ideMode == FM_DIO ? "DIO" : ideMode == FM_DOUT ? "DOUT" : "UNKNOWN")) + "<br><hr>";
output += "###### Storage information ######<br><br>";
#if USEFAT
#if USESD
output += "Storage Device: SD<br>";
#elif USEFAT
output += "Filesystem: FatFs<br>";
#elif USELFS
output += "Filesystem: LittleFS<br>";
#else
output += "Filesystem: SPIFFS<br>";
#endif
Expand Down Expand Up @@ -589,7 +647,16 @@ void setup(){
digitalWrite(usbPin, LOW);
#endif




#if USESD
SPI.begin(SCK, MISO, MOSI, SS);
if (FILESYS.begin(SS, SPI)) {
#else
if (FILESYS.begin(true)) {
#endif

#if USECONFIG
if (FILESYS.exists("/config.ini")) {
File iniFile = FILESYS.open("/config.ini", "r");
Expand Down Expand Up @@ -863,9 +930,12 @@ void setup(){

server.on("/fant.bin", HTTP_GET, [](AsyncWebServerRequest *request){
if (ftemp < 55 || ftemp > 85){ftemp = 70;}
fan[250] = ftemp; fan[368] = ftemp;
AsyncWebServerResponse *response = request->beginResponse_P(200, "application/octet-stream", fan, sizeof(fan));
uint8_t *fant = (uint8_t *) malloc(sizeof(uint8_t)*sizeof(fan));
memcpy_P(fant, fan, sizeof(fan));
fant[250] = ftemp; fant[368] = ftemp;
AsyncWebServerResponse *response = request->beginResponse_P(200, "application/octet-stream", fant , sizeof(fan));
request->send(response);
free(fant);
});
#endif

Expand Down Expand Up @@ -944,6 +1014,8 @@ void setup(){
DefaultHeaders::Instance().addHeader("Access-Control-Allow-Origin", "*");
server.begin();
//HWSerial.println("HTTP server started");

bootTime = millis();
}


Expand Down Expand Up @@ -992,10 +1064,19 @@ void disableUSB()


void loop(){
#if ESPSLEEP
if (millis() >= (bootTime + (TIME2SLEEP * 60000)))
{
//HWSerial.print("Esp sleep");
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_OFF);
esp_deep_sleep_start();
}
#endif
if (hasEnabled && millis() >= (enTime + 15000))
{
disableUSB();
}
#if !USESD
if (isFormating)
{
//HWSerial.print("Formatting Storage");
Expand All @@ -1008,5 +1089,6 @@ void loop(){
writeConfig();
#endif
}
#endif
dnsServer.processNextRequest();
}
3 changes: 3 additions & 0 deletions ESP32_Server_900u/Loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -769,3 +769,6 @@ static const uint8_t loader_gz[] PROGMEM = {
193, 205, 224, 53, 165, 126, 250, 231, 104, 186, 9, 224, 92, 113, 139, 193, 99, 189, 80, 31, 17, 176, 153, 221, 255, 240, 191, 177, 173, 102, 100, 37,
196, 0, 0};
#endif


// https://github.com/ChendoChap/pOOBs4
Loading

0 comments on commit 4a247fb

Please sign in to comment.