AntOS Library — nfc (reference)

The nfc library'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/release keep 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 the dbfs:// 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

Important: The Ant64 family of home computers are at early design/prototype stage, everything you see here is subject to change.