Skip to content

NFC & Smartcard Config

Controls NFC tag content and protocol, routes APDU commands, and manages the ISO7816 smartcard interface.

Key path: devcfg.nfc, devcfg.apdumgr, devcfg.mifare, devcfg.iso7816

{
"devcfg": {
"nfc": {
"uid": "01020304050607",
"ndef": "http://www.infrafon.com",
"emul": false,
"mode": 0
},
"apdumgr": {
"setReqRoute": "nfc:iso7816",
"reqRoutes": {}
},
"mifare": {
"uid": "",
"ndef": ""
},
"iso7816": {
"allowBaudChange": true,
"testCard": false,
"getATR": false,
"cmd": ""
}
}
}

Overrides the default NFC UID. If not set, the UID is 0x5F followed by the device ID.

Configuration variables

  • Type: string (hex)
  • Default: 0x5F<6 bytes of device id>
{ "devcfg": { "nfc": { "uid": "01020304050607" } } }

NDEF content when the NFC tag is read. Can be a URL (http*), plain text, or a hex‑encoded NDEF block. Used only when mode = 0 (T4T NDEF). Configuration variables

  • Type: string
  • Default: "http://www.infrafon.com"
{ "devcfg": { "nfc": { "ndef": "http://example.com" } } }

Enables or disables NFC tag emulation.

Configuration variables

  • Type: boolean
  • Default: false
{ "devcfg": { "nfc": { "emul": true } } }

Selects the NFC operating mode.

Configuration variables

  • Type: integer (0‑2)
  • Default: 0
ValueMode
0T4T NDEF (NFC Forum Type 4 Tag)
1T2T (Type 2 Tag) — not supported
2APDU Manager processing (raw APDUs)
{ "devcfg": { "nfc": { "mode": 2 } } }

When mode=2, the ndef and uid fields are ignored; APDU routing is handled by apdumgr.

Sets a static APDU request route. Use "nfc:iso7816" to bridge NFC to the smartcard driver, or "usb:iso7816" to route via USB CCID instead. Set to "nfc:off" or "usb:off" to disable that interface entirely.

Configuration variables

  • Type: string
  • Default: "" (no explicit route)
  • Allowed values:
    ValueEffect
    "nfc:iso7816"NFC APDUs are forwarded to the ISO7816 smartcard driver
    "nfc:mifare"NFC APDUs are handled by Mifare emulation
    "usb:iso7816"USB CCID APDUs are forwarded to the ISO7816 driver
    "nfc"Disable NFC APDU processing
    "usb"Disable USB CCID APDU processing
{ "devcfg": { "apdumgr": { "setReqRoute": "usb:iso7816" } } }

Read‑only view of all active request routes. Not intended to be set; send as null to retrieve current routes.

Configuration variables

  • Type: object
  • Default: {} (empty)
{ "devcfg": { "apdumgr": { "reqRoutes": null } } }

The UID returned by the Mifare emulation. Not the same as the NFC UID set above.

Configuration variables

  • Type: string
  • Default: ""
{ "devcfg": { "mifare": { "uid": "112233445566" } } }

Hex‑encoded NDEF file content for Mifare emulation.

Configuration variables

  • Type: string (hex)
  • Default: ""
{ "devcfg": { "mifare": { "ndef": "00508902000000270C..." } } }

If true, the driver allows the inserted smartcard to negotiate a different baud rate.

Configuration variables

  • Type: boolean
  • Default: true
{ "devcfg": { "iso7816": { "allowBaudChange": false } } }

Runs a self‑test on the currently inserted card. The result is reported in devdata.iso7816.testResult.

Configuration variables

  • Type: boolean
  • Default: false
  • One-shot: yes
{ "devcfg": { "iso7816": { "testCard": true } } }

Activates the card to retrieve its Answer‑To‑Reset (ATR) data. The ATR appears in devdata.iso7816.atr.

Configuration variables

  • Type: boolean
  • Default: false
  • One-shot: yes
{ "devcfg": { "iso7816": { "getATR": true } } }

Sends a single raw APDU command (hex string) to the card. The response appears in devdata.iso7816.resp.

Configuration variables

  • Type: string (hex)
  • Default: ""
  • One-shot: yes
{ "devcfg": { "iso7816": { "cmd": "00A4040008A000000003000000" } } }