From 4545a7a5044a30ac1d3ac00940fe7e06f9d227ff Mon Sep 17 00:00:00 2001 From: Jelmer Date: Tue, 23 May 2023 11:14:48 +0200 Subject: [PATCH] fixed no-display AP flashing --- ESP32_AP-Flasher/data/tag_md5_db.json | 11 ++++++++++- ESP32_AP-Flasher/src/flasher.cpp | 3 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ESP32_AP-Flasher/data/tag_md5_db.json b/ESP32_AP-Flasher/data/tag_md5_db.json index b3ec2180..7c26913e 100644 --- a/ESP32_AP-Flasher/data/tag_md5_db.json +++ b/ESP32_AP-Flasher/data/tag_md5_db.json @@ -24,7 +24,16 @@ "mac_suffix":"0131", "MD5":"A27D978C48888FA045E8D3F90DC27029", "type":240, - "note":"Segmented, UK, TSC0 Ebie" + "note":"Segmented, UK" + }, + { + "name":"NoDisplay ZBS243 AP", + "mac_offset":0, + "mac_format":0, + "mac_suffix":"0000", + "MD5":"ABBAABBAD3ADD0D0CAFED3F90DC27029", + "type":255, + "note":"NoDisplay ZBS243 AP" }, { "name":"4.2 Black + NFC", diff --git a/ESP32_AP-Flasher/src/flasher.cpp b/ESP32_AP-Flasher/src/flasher.cpp index d28947e9..656c3031 100644 --- a/ESP32_AP-Flasher/src/flasher.cpp +++ b/ESP32_AP-Flasher/src/flasher.cpp @@ -288,7 +288,7 @@ void flasher::getMacFromWiFi() { bool flasher::backupFlash() { getFirmwareMD5(); if (!zbs->select_flash(0)) return false; - md5char[16]=0x00; + md5char[16] = 0x00; fs::File backup = LittleFS.open("/" + (String)md5char + "_backup.bin", "w", true); for (uint32_t c = 0; c < 65535; c++) { backup.write(zbs->read_flash(c)); @@ -650,6 +650,7 @@ bool doTagFlash() { f->getInfoBlockType(); f->readInfoBlock(); f->writeFlashFromPack("/Tag_FW_Pack.bin", f->tagtype); + f->zbs->reset(); } else { // couldn't find the md5 from the infoblock Serial.printf("Found an already-flashed tag, but we couldn't find its fingerprint (%s) in the database\n", f->md5char);