AntOS Library — nfc (reference)
The
nfclibrary's design and native core — the PN532 NFC reader. The script-facing API is luau_nfc; the wider subsystem (NDEF records,dbfs://tag switching, wiring, security position) is the NFC doc.
What it is
A script interface to the PN532 over DeMon's I²C bus: Level 1 (detect a tag, read its UID) and Level 2 (NTAG pages, Mifare Classic blocks, NDEF URI records). A claim/release pair guards exclusive access.
Design notes
- On DeMon's I²C — the PN532 shares the housekeeping I²C bus (the same one the OLED, RTC, and secure element sit on);
claim/releasekeep tag operations from colliding with other consumers. - Tags, not identity. NFC tags are user data (launch a script, switch a
dbfs://volume, store a record). The machine's own identity and anti-clone attestation is the ATECC608C secure element — see the NFC subsystem doc, which also covers NDEF and thedbfs://scheme.
Native core — libantos_nfc
sys_nfc drives the PN532 (I²C transport, tag polling, NTAG/Mifare command sets); the binding marshals cards and blocks to Lua tables. No Luau dependency.
Related
- luau_nfc — the script API · NFC subsystem · DeMon (the I²C bus) · AntOS Libraries hub