Make Parse take raw NFC UID and 1K image.
Drop zip/JSON from the root API. dump remains an adapter for the Android app format; inventory and an AMS wand both call Parse(uid, image).
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
# bambu-nfc
|
||||
|
||||
Go library for Bambu Lab filament NFC dumps produced by the Filament NFC dump Android app.
|
||||
Go library for Bambu Lab filament NFC. Input is **raw NFC**: chip UID bytes and the 1024-byte MIFARE Classic 1K image — not a phone dump format.
|
||||
|
||||
```go
|
||||
import bambunfc "git.s1d3sw1ped.com/s1d3sw1ped/bambu-nfc"
|
||||
|
||||
tags, err := bambunfc.ParseZip(r)
|
||||
tag, err := bambunfc.Parse(uid, image) // uid from ISO 14443, image is 1K
|
||||
keys, err := bambunfc.KeysA(uid) // 16 Key-A values to dump the tag
|
||||
spools, err := bambunfc.Merge(tags)
|
||||
keys, err := bambunfc.KeysA(uid)
|
||||
```
|
||||
|
||||
- `dump` — brand-blind `filanfc-dump/v1` JSON/zip
|
||||
`dump` can still decode the Android app's `filanfc-dump/v1` zip if you need that adapter; the inventory site should call `Parse` with UID + image (phone, AMS wand, or anything else).
|
||||
|
||||
- `mifare` — Classic 1K layout helpers
|
||||
- root package — Bambu Key-A HKDF, block parse, merge by `tray_uid`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user