From 9456e6ab9144e44c28916025829ecfbc6cfad88d Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Thu, 28 May 2026 16:28:13 +0200 Subject: [PATCH] feat: add support for extended-data tags with OpenSpool/FilaMan protocol --- src/nfc.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/nfc.cpp b/src/nfc.cpp index 0406a70..e843fa4 100644 --- a/src/nfc.cpp +++ b/src/nfc.cpp @@ -1350,6 +1350,21 @@ bool decodeNdefAndReturnJson(const byte* encodedMessage, String uidString) { tagProcessed = true; activeSpoolId = ""; } + else if (doc["protocol"].is() && + (doc["protocol"].as() == "openspool" || + doc["protocol"].as() == "filaman")) + { + // Tag mit erweitertem Protokoll (OpenSpool/FilaMan) aber ohne sm_id. + // FilaMan sucht die Spule anhand der tag_uuid (rfid_uid). + String protocolStr = doc["protocol"].as(); + String type = doc["type"] | "?"; + String brand = doc["brand"] | ""; + String displayText = brand.length() > 0 ? (brand + " " + type) : type; + Serial.println("Extended-data tag: protocol=" + protocolStr + " type=" + type + " brand=" + brand); + activeSpoolId = ""; // Keine sm_id → Gewicht wird mit tag_uuid gesendet + oledShowProgressBar(2, 4, tr(STR_SPOOL_TAG), displayText.c_str()); + oledSetPriority(DISPLAY_PRIORITY_ACTION, 2000); + } else { Serial.println("Unbekannter Tag-Inhalt.");