Skip to content

Commands: RFID

BPI Services Dev edited this page Jul 30, 2020 · 6 revisions

RFID Reader

The iMatch device contains the NXP PN7120 NFC controller.

Commands

  • device: nfc method: power_on params: empty
  • device: nfc method: power_off params: empty
  • device: nfc method: discover params: empty. Response: 1 if a type4 tag has been detected, 0 if not or timeout (20s).
  • device: nfc method: c_apdu params: base64 encoded APDU command. Response: base64 encoded APDU response.
  • device: nfc method: mrtdinit params: string with the following options, comma separated:
    • mrz code string
    • bypass pace string with 1 for true, 0 for false
      • always use BAC, even if the document supports PACE
    • check MAC string with 1 for true, 0 for false
      • verify response APDU CC by computing MAC
    • include headers string with 1 for true, 0 for false
      • include the first 2 - 4 header bytes of SOD, DG1 and DG2 in the response notifications
    • APDU logging string with 1 for true, 0 for false
      • send notifications containing the APDU transactions
    • chip authentication string with 1 for true, 0 for false
      • perform chip authentication
    • Response: 1 if BAC succeeded, 0 if BAC failed or timeout (20s) or error string if an error occurred.
  • device: nfc method: read params: string with the following options:
    • EFCOM returns a base64 encoded bytearray with the raw EFCOM data.
    • SOD returns a base64 encoded bytearray with the raw SOD data.
    • DG1 returns a base64 encoded string with the raw DG1 data.
    • DG2 returns a base64 encoded bytearray with the raw DG2 data.
  • device: nfc method: mrtdread params: string with the following options, comma separated:
    • mrz code string
    • bypass pace string with 1 for true, 0 for false
      • always use BAC, even if the document supports PACE
    • check MAC string with 1 for true, 0 for false
      • verify response APDU CC by computing MAC
    • include headers string with 1 for true, 0 for false
      • include the first 2 - 4 header bytes of SOD, DG1 and DG2 in the response notifications
    • APDU logging string with 1 for true, 0 for false
      • send notifications containing the APDU transactions
    • chip authentication string with 1 for true, 0 for false
      • perform chip authentication
    • Response: notifications with BAC result, EFCOM, SOD, DG1, DG2.

Clone this wiki locally