0

I've successfully connected PN532 to RPi using SPI. Communication works. I can read a passive tag using IN_LIST_PASSIVE_TARGET. Commands like GET_FIRMWARE_VERSION or SAM_CONFIGURATION work as expected.

Now, I'm trying to emulate NDEF tag type 4. I've created a NDEF message with a text record, with text "ABCD". NDEF is OK, as I've verified it using nfc-tools -> nfc-emulate-forum-tag4.

I'm trying to read this emulated tag by an iOS app.

While using nfc-emulate-forum-tag4, it works as expected. iOS app reads "ABCD" message from the emuulated tag.

But, when I try to use my implementation (Java/Pi4J), nothing happens. iOS cannot read the emulated tag nor I get any error. It keeps showing standard NFC dialog.

Bytes that my implementation interchanges with PN532 is exactly the same like in nfc-emulate-forum-tag4. However, I missed something.

Just to note, nfc-emulate-forum-tag4 output does not show how TG_INIT_AS_TARGET specified. It shows only data exchange once the initiator recognized.

Reference library I used for implementation: https://github.com/elechouse/PN532

NDEF FILE CONTENT:

0xD1
0x01
0x07
0x54
0x02
0x65
0x6E
0x41
0x42
0x43
0x44

nfc-emulate-forum-tag4 listing (works):

pi@raspberrypi:~/tmp $ nfc-emulate-forum-tag4 ABCD.ndef
NFC device: PN532_via_SPI opened
Emulating NDEF tag now, please touch it with a second NFC device
    In: 00  a4  04  00  07  d2  76  00  00  85  01  01  00
    Out: 90  00
    In: 00  a4  00  0c  02  e1  03
    Out: 90  00
    In: 00  b0  00  00  0f
    Out: 00  0f  20  00  54  00  ff  04  06  e1  04  ff  fe  00  00  90  00
    In: 00  a4  00  0c  02  e1  04
    Out: 90  00
    In: 00  b0  00  00  02
    Out: 00  0b  90  00
    In: 00  a4  00  0c  02  e1  04
    Out: 90  00
    In: 00  b0  00  00  0b
    Out: 00  0b  d1  01  07  54  02  65  6e  41  42  90  00
    In: 00  b0  00  0b  02
    Out: 43  44  90  00
nfc_emulate_target: Target Released

===============================================================

My implementation listing (doesn't work):

pi@raspberrypi:~/tmp $ java -jar pn532_java-1.0.jar
Reset PN532 used pins to system default state
--> Initializing PN532
--> IRQ pin initial state: HIGH
--> GPIO IRQ LISTENER USED
--> PN532 End of initialization
====================================================================================================
-->
COMMAND: Get_Firmware_Version
--> PN532.writeCommand([0x02])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0x2A
--> PN532.writeByte: 0x00
--> PN532.waitForAck()
--> PN532.checkSpiAck()
--> RPi - IRQ pin received signal: LOW
--> PN532.writeByte: 0x03
--> ACK reading...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 12, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x06
--> PN532.readResponse - data length: 5
--> PN532.readByte: 0xFA
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x03
--> PN532.readByte: 0x32
--> PN532.readByte: 0x01
--> PN532.readByte: 0x06
--> PN532.readByte: 0x07
--> PN532.readByte: 0xE8
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
Found a chip PN532
Firmware version: 1.6
====================================================================================================
-->
COMMAND: SAM_Configuration
--> PN532.writeCommand([0x14 0x01 0x14 0x01])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x05
--> PN532.writeByte: 0xFB
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x14
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x14
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 8, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x02
--> PN532.readResponse - data length: 1
--> PN532.readByte: 0xFE
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x15
--> PN532.readByte: 0x16
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
SAM configuration: true
====================================================================================================
-->
COMMAND: Get_General_Status
--> PN532.writeCommand([0x04])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0x28
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x06
--> PN532.readResponse - data length: 5
--> PN532.readByte: 0xFA
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x05
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x80
--> PN532.readByte: 0xA6
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
GENERAL STATUS: 0x00 0x00 0x00 0x80
====================================================================================================
Waiting for an ISO14443A Card ...
====================================================================================================
================== NDEF FILE START ==================
0xD1
0x01
0x07
0x54
0x02
0x65
0x6E
0x41
0x42
0x43
0x44
================== NDEF FILE END ==================
-->
COMMAND: Tg_Init_As_Target
--> PN532.writeCommand([0x8C 0x05 0x04 0x00 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x27
--> PN532.writeByte: 0xD9
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8C
--> PN532.writeByte: 0x05
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x20
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x77
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x05
--> PN532.readResponse - data length: 4
--> PN532.readByte: 0xFB
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8D
--> PN532.readByte: 0x08
--> PN532.readByte: 0xE0
--> PN532.readByte: 0x80
--> PN532.readByte: 0x36
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
=====================
TAG EMULATION STARTED
=====================
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x10
--> PN532.readResponse - data length: 15
--> PN532.readByte: 0xF0
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x04
--> PN532.readByte: 0x00
--> PN532.readByte: 0x07
--> PN532.readByte: 0xD2
--> PN532.readByte: 0x76
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x85
--> PN532.readByte: 0x01
--> PN532.readByte: 0x01
--> PN532.readByte: 0x00
--> PN532.readByte: 0x26
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x04
P2: 0x00
LC: 0x07
P1-P2-LEN: 0x00
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_NAME
SUPPORTED
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x0A
--> PN532.readResponse - data length: 9
--> PN532.readByte: 0xF6
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0C
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE1
--> PN532.readByte: 0x03
--> PN532.readByte: 0x0E
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0C
LC: 0x02
P1-P2-LEN: 0x0C
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_ID
CURRENT FILE --> CC
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x08
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0F
--> PN532.readByte: 0xE5
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x00
LC: 0x0F
P1-P2-LEN: 0x00
ISO7816_READ_BINARY
SEND COMPATIBILITY CONTAINER
-->
COMMAND: Tg_Set_Data - data size: 17
--> PN532.writeCommand([0x8E 0x00 0x0F 0x20 0x00 0x54 0x00 0xFF 0x04 0x06 0xE1 0x04 0xFF 0xFE 0x00 0x00 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x13
--> PN532.writeByte: 0xED
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0F
--> PN532.writeByte: 0x20
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x54
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0x06
--> PN532.writeByte: 0xE1
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xA0
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x0A
--> PN532.readResponse - data length: 9
--> PN532.readByte: 0xF6
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0C
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE1
--> PN532.readByte: 0x04
--> PN532.readByte: 0x0D
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0C
LC: 0x02
P1-P2-LEN: 0x0C
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_ID
CURRENT FILE --> NDEF
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x08
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x02
--> PN532.readByte: 0xF2
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x00
LC: 0x02
P1-P2-LEN: 0x00
ISO7816_READ_BINARY
-->
COMMAND: Tg_Set_Data - data size: 4
--> PN532.writeCommand([0x8E 0x00 0x0B 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x06
--> PN532.writeByte: 0xFA
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0B
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x03
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x0A
--> PN532.readResponse - data length: 9
--> PN532.readByte: 0xF6
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0C
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE1
--> PN532.readByte: 0x04
--> PN532.readByte: 0x0D
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0C
LC: 0x02
P1-P2-LEN: 0x0C
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_ID
CURRENT FILE --> NDEF
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x08
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0B
--> PN532.readByte: 0xE9
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x00
LC: 0x0B
P1-P2-LEN: 0x00
ISO7816_READ_BINARY
-->
COMMAND: Tg_Set_Data - data size: 13
--> PN532.writeCommand([0x8E 0x00 0x0B 0xD1 0x01 0x07 0x54 0x02 0x65 0x6E 0x41 0x42 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x0F
--> PN532.writeByte: 0xF1
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0B
--> PN532.writeByte: 0xD1
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x07
--> PN532.writeByte: 0x54
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0x65
--> PN532.writeByte: 0x6E
--> PN532.writeByte: 0x41
--> PN532.writeByte: 0x42
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x7E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> RPi - IRQ pin received signal: LOW
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x86
--> PN532.writeByte: 0xA6
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x08
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0B
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE7
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0B
LC: 0x02
P1-P2-LEN: 0x0B
ISO7816_READ_BINARY
-->
COMMAND: Tg_Set_Data - data size: 4
--> PN532.writeCommand([0x8E 0x43 0x44 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x06
--> PN532.writeByte: 0xFA
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x43
--> PN532.writeByte: 0x44
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x87
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8F
--> PN532.readByte: 0x00
--> PN532.readByte: 0x9C
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
TG_SET_DATA response: 2
-->
COMMAND: In_Release
--> PN532.writeCommand([0x52 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x03
--> PN532.writeByte: 0xFD
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x52
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xDA
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x53
--> PN532.readByte: 0x00
--> PN532.readByte: 0xD8
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
Reset PN532 used pins to system default state
pi@raspberrypi:~/tmp $

Any help appreciated (especially I'm very desperate). Thanks!

Oxygen
  • 11
  • 1

1 Answers1

0

Here is the simplified version of the listing in the original question (post as an answer due to characters limit). It starts from Tg_Init_As_Target.


-->
COMMAND: Tg_Init_As_Target
--> PN532.writeCommand([0x8C 0x05 0x04 0x00 0x00 0x00 0x00 0x20 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x27
--> PN532.writeByte: 0xD9
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8C
--> PN532.writeByte: 0x05
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x20
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x77
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> PN532.checkSpiAck()
--> PN532.writeByte: 0x03
--> ACK reading...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x05
--> PN532.readResponse - data length: 4
--> PN532.readByte: 0xFB
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x8D
--> PN532.readByte: 0x08
--> PN532.readByte: 0xE0
--> PN532.readByte: 0x80
--> PN532.readByte: 0x36
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
=====================
TAG EMULATION STARTED
=====================
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 15
--> PN532.readByte: 0xF0
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x04
--> PN532.readByte: 0x00
--> PN532.readByte: 0x07
--> PN532.readByte: 0xD2
--> PN532.readByte: 0x76
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x85
--> PN532.readByte: 0x01
--> PN532.readByte: 0x01
--> PN532.readByte: 0x00
--> PN532.readByte: 0x26
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x04
P2: 0x00
LC: 0x07
P1-P2-LEN: 0x00
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_NAME
SUPPORTED
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 9
--> PN532.readByte: 0xF6
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0C
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE1
--> PN532.readByte: 0x03
--> PN532.readByte: 0x0E
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0C
LC: 0x02
P1-P2-LEN: 0x0C
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_ID
CURRENT FILE --> CC
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0F
--> PN532.readByte: 0xE5
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x00
LC: 0x0F
P1-P2-LEN: 0x00
ISO7816_READ_BINARY
SEND COMPATIBILITY CONTAINER
-->
COMMAND: Tg_Set_Data - data size: 17
--> PN532.writeCommand([0x8E 0x00 0x0F 0x20 0x00 0x54 0x00 0xFF 0x04 0x06 0xE1 0x04 0xFF 0xFE 0x00 0x00 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x13
--> PN532.writeByte: 0xED
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0F
--> PN532.writeByte: 0x20
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x54
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0x06
--> PN532.writeByte: 0xE1
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0xFE
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xA0
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 9
--> PN532.readByte: 0xF6
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0C
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE1
--> PN532.readByte: 0x04
--> PN532.readByte: 0x0D
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0C
LC: 0x02
P1-P2-LEN: 0x0C
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_ID
CURRENT FILE --> NDEF
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x02
--> PN532.readByte: 0xF2
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x00
LC: 0x02
P1-P2-LEN: 0x00
ISO7816_READ_BINARY
-->
COMMAND: Tg_Set_Data - data size: 4
--> PN532.writeCommand([0x8E 0x00 0x0B 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x06
--> PN532.writeByte: 0xFA
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0B
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x03
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 9
--> PN532.readByte: 0xF6
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xA4
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0C
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE1
--> PN532.readByte: 0x04
--> PN532.readByte: 0x0D
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0C
LC: 0x02
P1-P2-LEN: 0x0C
ISO7816_SELECT_FILE
C_APDU_P1_SELECT_BY_ID
CURRENT FILE --> NDEF
-->
COMMAND: Tg_Set_Data - data size: 2
--> PN532.writeCommand([0x8E 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x04
--> PN532.writeByte: 0xFC
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0B
--> PN532.readByte: 0xE9
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x00
LC: 0x0B
P1-P2-LEN: 0x00
ISO7816_READ_BINARY
-->
COMMAND: Tg_Set_Data - data size: 13
--> PN532.writeCommand([0x8E 0x00 0x0B 0xD1 0x01 0x07 0x54 0x02 0x65 0x6E 0x41 0x42 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x0F
--> PN532.writeByte: 0xF1
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x0B
--> PN532.writeByte: 0xD1
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x07
--> PN532.writeByte: 0x54
--> PN532.writeByte: 0x02
--> PN532.writeByte: 0x65
--> PN532.writeByte: 0x6E
--> PN532.writeByte: 0x41
--> PN532.writeByte: 0x42
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x7E
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: Tg_Get_Data
--> PN532.writeCommand([0x86])
--> PN532.readResponse - data length: 7
--> PN532.readByte: 0xF8
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x87
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xB0
--> PN532.readByte: 0x00
--> PN532.readByte: 0x0B
--> PN532.readByte: 0x02
--> PN532.readByte: 0xE7
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
P1: 0x00
P2: 0x0B
LC: 0x02
P1-P2-LEN: 0x0B
ISO7816_READ_BINARY
-->
COMMAND: Tg_Set_Data - data size: 4
--> PN532.writeCommand([0x8E 0x43 0x44 0x90 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x06
--> PN532.writeByte: 0xFA
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x8E
--> PN532.writeByte: 0x43
--> PN532.writeByte: 0x44
--> PN532.writeByte: 0x90
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x87
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: HIGH
-->
COMMAND: In_Release
--> PN532.writeCommand([0x52 0x00])
--> PN532.writeByte: 0x01
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xFF
--> PN532.writeByte: 0x03
--> PN532.writeByte: 0xFD
--> PN532.writeByte: 0xD4
--> PN532.writeByte: 0x52
--> PN532.writeByte: 0x00
--> PN532.writeByte: 0xDA
--> PN532.writeByte: 0x00
--> RPi - IRQ pin received signal: LOW
--> PN532.waitForAck()
--> PN532.checkSpiAck()
--> PN532.writeByte: 0x03
--> ACK reading...
--> PN532.readByte: 0x00
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
--> PN532.readResponse - waiting...
--> RPi - IRQ pin received signal: LOW
--> PN532.readResponse(..., 255, 1000)
--> PN532.writeByte: 0x03
--> Read response started...
--> PN532.readByte: 0x00
--> PN532.readByte: 0xFF
--> PN532.readByte: 0x03
--> PN532.readResponse - data length: 2
--> PN532.readByte: 0xFD
--> PN532.readByte: 0xD5
--> PN532.readByte: 0x53
--> PN532.readByte: 0x00
--> PN532.readByte: 0xD8
--> PN532.readByte: 0x00
--> RPi - IRQ pin received signal: HIGH
====================================================================================================
Reset PN532 used pins to system default state
pi@raspberrypi:~/tmp $
Oxygen
  • 11
  • 1