diff --git a/src/reader/fm175xx/constants.py b/src/reader/fm175xx/constants.py index 2b20ebc..7efc711 100644 --- a/src/reader/fm175xx/constants.py +++ b/src/reader/fm175xx/constants.py @@ -122,6 +122,7 @@ 0x06: 16, # MIFARE Ultralight 0x12: 45, # NTAG213 0x3E: 135, # NTAG215 + 0x3F: 135, # NTAG215, exact 504-byte user area 0x6D: 231, # NTAG216 } diff --git a/test/tags/OpenSpool/Geeetech PLA FFC5AB CC 3F.bin b/test/tags/OpenSpool/Geeetech PLA FFC5AB CC 3F.bin new file mode 100644 index 0000000..fc35d5f Binary files /dev/null and b/test/tags/OpenSpool/Geeetech PLA FFC5AB CC 3F.bin differ diff --git a/test/tags/OpenSpool/Geeetech PLA FFC5AB CC 3F.yml b/test/tags/OpenSpool/Geeetech PLA FFC5AB CC 3F.yml new file mode 100644 index 0000000..d3b26d4 --- /dev/null +++ b/test/tags/OpenSpool/Geeetech PLA FFC5AB CC 3F.yml @@ -0,0 +1,16 @@ +source_processor: OpenspoolTagProcessor +unique_id: 3ce8c47fa2d438e7db003cf265cb2d85dc75baf942c49f93c05a81cd59b01f52 +manufacturer: Geeetech +type: PLA +modifiers: [] +colors: + - 0xFFFFC5AB +diameter_mm: 1.75 +weight_grams: 1000 +hotend_min_temp_c: 190 +hotend_max_temp_c: 220 +bed_temp_c: 60.0 +drying_temp_c: 50.0 +drying_time_hours: 8.0 +manufacturing_date: "0001-01-01" +td: 0.0 diff --git a/test/test_mifare_ultralight_reader.py b/test/test_mifare_ultralight_reader.py index 7adb63b..0276941 100644 --- a/test/test_mifare_ultralight_reader.py +++ b/test/test_mifare_ultralight_reader.py @@ -38,7 +38,7 @@ def scan(): def memory(size_byte): - physical_sizes = {0x06: 64, 0x12: 180, 0x3E: 540, 0x6D: 924} + physical_sizes = {0x06: 64, 0x12: 180, 0x3E: 540, 0x3F: 540, 0x6D: 924} data = bytearray(i % 251 for i in range(physical_sizes[size_byte])) data[12:16] = bytes([0xE1, 0x10, size_byte, 0x00]) return bytes(data) @@ -77,6 +77,7 @@ def execute(cmd): pytest.param(0x06, 64, 12, id="ultralight"), pytest.param(0x12, 180, 41, id="ntag213"), pytest.param(0x3E, 540, 131, id="ntag215"), + pytest.param(0x3F, 540, 131, id="ntag215-cc-504"), pytest.param(0x6D, 924, 227, id="ntag216"), ]) def test_reads_all_physical_pages(reader, scan, monkeypatch, size_byte, total_size, last_page): @@ -146,7 +147,7 @@ def test_physical_dump_preserves_processor_output(reader, scan, monkeypatch, fix data = fixture_path.read_bytes() # Some older NTAG213 dumps include rollover bytes. Simulate only physical # memory and pass the real reader's exact-length output to each processor. - physical_sizes = {0x06: 64, 0x12: 180, 0x3E: 540, 0x6D: 924} + physical_sizes = {0x06: 64, 0x12: 180, 0x3E: 540, 0x3F: 540, 0x6D: 924} physical_size = physical_sizes[data[14]] assert len(data) >= physical_size mock_tag(reader, monkeypatch, data[:physical_size])