diff --git a/.github/workflows/gitea-release.yml b/.github/workflows/gitea-release.yml index b832a47..679b810 100644 --- a/.github/workflows/gitea-release.yml +++ b/.github/workflows/gitea-release.yml @@ -40,10 +40,8 @@ jobs: # Copy firmware binary cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${VERSION}.bin - # Create SPIFFS binary with minimal ESP32 image header (chip version set to max supported) - echo -ne '\xE9\x01\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00' > .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin - # Append the actual SPIFFS data - cat .pio/build/esp32dev/spiffs.bin >> .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin 2>/dev/null + # Create SPIFFS binary (without header) + cp .pio/build/esp32dev/spiffs.bin .pio.build/esp32dev/upgrade_filaman_website_v${VERSION}.bin # Create full binary (cd .pio/build/esp32dev && diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml index 220292b..bd559b0 100644 --- a/.github/workflows/github-release.yml +++ b/.github/workflows/github-release.yml @@ -47,10 +47,8 @@ jobs: # Copy firmware binary cp .pio/build/esp32dev/firmware.bin .pio/build/esp32dev/upgrade_filaman_firmware_v${VERSION}.bin - # Create SPIFFS binary with minimal ESP32 image header (chip version set to max supported) - echo -ne '\xE9\x01\x00\x00\x00\x00\x00\x00\x00\x30\x00\x00\x00\x00\x00\x00' > .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin - # Append the actual SPIFFS data - cat .pio/build/esp32dev/spiffs.bin >> .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin 2>/dev/null + # Create SPIFFS binary (without header) + cp .pio/build/esp32dev/spiffs.bin .pio/build/esp32dev/upgrade_filaman_website_v${VERSION}.bin # Create full binary (always) (cd .pio/build/esp32dev && diff --git a/src/main.cpp b/src/main.cpp index d57a839..cf9a766 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -19,6 +19,12 @@ void setup() { Serial.begin(115200); + uint64_t chipid; + + chipid = ESP.getEfuseMac(); //The chip ID is essentially its MAC address(length: 6 bytes). + Serial.printf("ESP32 Chip ID = %04X", (uint16_t)(chipid >> 32)); //print High 2 bytes + Serial.printf("%08X\n", (uint32_t)chipid); //print Low 4bytes. + // Initialize SPIFFS initializeSPIFFS(); diff --git a/src/nfc.cpp b/src/nfc.cpp index a0910e1..ab94430 100644 --- a/src/nfc.cpp +++ b/src/nfc.cpp @@ -431,6 +431,7 @@ void scanRfidTask(void * parameter) { } void startNfc() { + Wire.setBufferSize(256); nfc.begin(); // Beginne Kommunikation mit RFID Leser delay(1000); unsigned long versiondata = nfc.getFirmwareVersion(); // Lese Versionsnummer der Firmware aus diff --git a/src/website.cpp b/src/website.cpp index 2e17798..256e05a 100644 --- a/src/website.cpp +++ b/src/website.cpp @@ -403,7 +403,8 @@ void setupWebserver(AsyncWebServer &server) { backupJsonConfigs(); } - if (!Update.begin(updateSize, command)) { + // Setze spezifische Update-Flags für SPIFFS-Updates + if (!Update.begin(updateSize, command, command == U_SPIFFS ? true : false, command == U_SPIFFS ? 0 : -1)) { if (command == U_SPIFFS) { // Restore JSON config files if update fails at start restoreJsonConfigs();