Hi all,
Right after I start a discovery, I get a weird notification.
My log:
NfcReader::Send: cmd: \x20\x00\x01\x01
NfcReader::Receive: header \x40\x00\x03
NfcReader::Receive: payload: \x00\x10\x01
NfcReader::Send: cmd: \x20\x01\x00
NfcReader::Receive: header \x40\x01\x17
NfcReader::Receive: payload: \x00\x03\x0e\x03\x00\x06\x00\x01\x02\x03\x81\x82\x02\xc8\x00\xff\x02\x00\x04\x05\x08\x02\x02
NfcReader::Send: cmd: \x2f\x02\x00
NfcReader::Receive: header \x4f\x02\x05
NfcReader::Receive: payload: \x00\x00\x00\x7a\x5d
NfcReader::Send: cmd: \x21\x00\x10\x05\x01\x01\x01\x02\x01\x01\x03\x01\x01\x04\x01\x02\x80\x01\x80
NfcReader::Receive: header \x41\x00\x01
NfcReader::Receive: payload: \x00
NfcReader::Send: cmd: \x21\x03\x11\x08\x00\x01\x01\x01\x02\x01\x05\x01\x80\x01\x82\x01\x83\x01\x85\x01
NfcReader::Receive: header \x60\x00\x06
NfcReader::Receive: payload: \xa0\x00\xd7\xd4\x00\x00
The structure of the last notification is unexpected. GID and OID are 0000b which indicate CORE_RESET_NTF, but it's payload clearly belongs to the just delivered RF_DISCOVER_CMD. So I would expect RF_DISCOVER_NTF (0x61 0x30). Could somebody please explain if my iterpretation is correct?
Kind regards!
解決済! 解決策の投稿を見る。
For your information, this is the decode of your log.
could you tell me more information? so I may reproduce your issue on my board.
[NCI][COMMAND][20 00 01 01]
CORE_RESET_CMD
* Reset Type = Reset Configuration [0x01]
[NCI][RESPONSE][40 00 03 00 10 01]
CORE_RESET_RSP
* Status = {Std} STATUS_OK [0x00]
* NCI Version = 1.0 [0x10]
* Configuration Status = NCI RF Configuration has been reset [0x01]
[NCI][COMMAND][20 01 00]
CORE_INIT_CMD
[NCI][RESPONSE][40 01 17 00 03 0e 03 00 06 00 01 02 03 81 82 02 c8 00 ff 02 00 04 05 08 02 02]
CORE_INIT_RSP
* Status = {Std} STATUS_OK [0x00]
* NFCC Features = [0x03 0x0E 0x03 0x00]
--> Discovery Configuration Mode = NFCC can receive configurations from the DH and other NFCEEs [1]
--> Discovery Frequency Configuration = Discovery Frequency configuration in RF_DISCOVER_CMD is supported [1]
--> AID based Routing = Supported (NFCC supports 7816-4 Command parsing of SELECT command) [1]
--> Protocol based Routing = Supported [1]
--> Technology based Routing = Supported [1]
--> Switched Off state = Supported [1]
--> Battery Off state = Supported [1]
* Number of Supported RF Interface fields to follow = [0x06]
--> {Std} NFCEE Direct RF Interface [0x00]
--> {Std} Frame RF Interface [0x01]
--> {Std} ISO-DEP RF Interface [0x02]
--> {Std} NFC-DEP RF Interface [0x03]
--> Proprietary [0x81]
--> Proprietary [0x82]
* Max Logical Connections = 2 (Maximum number of Dynamic Logical Connections supported by the NFCC) [0x02]
* Max Routing Table Size = 200 (Indicates the maximum amount of data in Octets that are possible in a routing configuration) [0xC8 0x00]
* Max Control Packet Payload Size = 255 (Indicate the maximum payload length of a NCI Control Packet that the NFCC is able to receive) [0xFF]
* Max Size for Large Parameters = 2 (The maximum size in octets for the sum of the sizes of PB_H_INFO and LB_H_INFO_RESP parameter values) [0x02 0x00]
* Manufacturer ID = NXP [0x04]
* Manufacturer Specific Information = [0x05 0x08 0x02 0x02]
--> Hardware version number = {NXP PN547-PN548}[0x05]
--> ROM code version number = {NXP PN547-PN548}[0x08]
--> Flash major version = {NXP PN547-PN548}[0x02]
--> Flash minor version = {NXP PN547-PN548}[0x02]
[NCI][COMMAND][2f 02 00]
SYSTEM_PROPRIETARY_ACT_CMD
[NCI][RESPONSE][4f 02 05 00 00 00 7a 5d]
SYSTEM_PROPRIETARY_ACT_RSP
* Status = {Std} STATUS_OK [0x00]
* FW_Build_Number = [0x00 0x00 0x7A 0x5D]
[NCI][COMMAND][21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80]
RF_DISCOVER_MAP_CMD
* Number of Mapping Configurations = 5 [0x05]
--> Mapping Configuration N° 1
- RF Protocol = {Std} PROTOCOL_T1T [0x01]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} Frame RF Interface [0x01]
--> Mapping Configuration N° 2
- RF Protocol = {Std} PROTOCOL_T2T [0x02]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} Frame RF Interface [0x01]
--> Mapping Configuration N° 3
- RF Protocol = {Std} PROTOCOL_T3T [0x03]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} Frame RF Interface [0x01]
--> Mapping Configuration N° 4
- RF Protocol = {Std} PROTOCOL_ISO_DEP [0x04]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} ISO-DEP RF Interface [0x02]
--> Mapping Configuration N° 5
- RF Protocol = {NXP PN547-PN548} MIFARE Classic [0x80]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {NXP PN547-PN548} TAG-CMD [0x80]
[NCI][RESPONSE][41 00 01 00]
RF_DISCOVER_MAP_RSP
* Status = {Std} STATUS_OK [0x00]
[NCI][COMMAND][21 03 11 08 00 01 01 01 02 01 05 01 80 01 82 01 83 01 85 01]
RF_DISCOVER_CMD
* Number of Configurations = 8 [0x08]
--> Configuration N° 1
- RF Technology and Mode = {Std} NFC_A_PASSIVE_POLL_MODE [0x00]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 2
- RF Technology and Mode = {Std} NFC_B_PASSIVE_POLL_MODE [0x01]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 3
- RF Technology and Mode = {Std} NFC_F_PASSIVE_POLL_MODE [0x02]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 4
- RF Technology and Mode = {Std} NFC_F_ACTIVE_POLL_MODE (RFU) [0x05]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 5
- RF Technology and Mode = {Std} NFC_A_PASSIVE_LISTEN_MODE [0x80]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 6
- RF Technology and Mode = {Std} NFC_F_PASSIVE_LISTEN_MODE [0x82]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 7
- RF Technology and Mode = {Std} NFC_A_ACTIVE_LISTEN_MODE (RFU) [0x83]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 8
- RF Technology and Mode = {Std} NFC_F_ACTIVE_LISTEN_MODE (RFU) [0x85]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
[NCI][NOTIFICATION][60 00 06 a0 00 d7 d4 00 00]
CORE_RESET_NTF
* Reason Code = {NXP PN547-PN548} An assert has triggered PN547-PN548 reset/reboot [0xA0]
* Configuration Status = {Std} NCI RF Configuration has been kept [0x00]
* Program counter for assertion = {NXP PN547-PN548} 0x0000D4D7 [0xD7 0xD4 0x00 0x00]
Hi Jimmychan,
Thank you for the clarification! Please let me follow up on my issue.
I actually ended up interpreting the bytes when I finally found the right NCI documentation (NFC Controller Interface (NCI) Technical Specification) and am glad to verify I did it right according to your message. It did not led me to a cause, but ruled out errors in my PN7120 implementation.
The cause of my unexpected core reset turned out to be an initialization thing in our python approach which led to 2 instances of the nfcreader being created simultaniously which causes the 2nd instance to CORE_RESET when starting the discovery.
Thanks again!
For your information, this is the decode of your log.
could you tell me more information? so I may reproduce your issue on my board.
[NCI][COMMAND][20 00 01 01]
CORE_RESET_CMD
* Reset Type = Reset Configuration [0x01]
[NCI][RESPONSE][40 00 03 00 10 01]
CORE_RESET_RSP
* Status = {Std} STATUS_OK [0x00]
* NCI Version = 1.0 [0x10]
* Configuration Status = NCI RF Configuration has been reset [0x01]
[NCI][COMMAND][20 01 00]
CORE_INIT_CMD
[NCI][RESPONSE][40 01 17 00 03 0e 03 00 06 00 01 02 03 81 82 02 c8 00 ff 02 00 04 05 08 02 02]
CORE_INIT_RSP
* Status = {Std} STATUS_OK [0x00]
* NFCC Features = [0x03 0x0E 0x03 0x00]
--> Discovery Configuration Mode = NFCC can receive configurations from the DH and other NFCEEs [1]
--> Discovery Frequency Configuration = Discovery Frequency configuration in RF_DISCOVER_CMD is supported [1]
--> AID based Routing = Supported (NFCC supports 7816-4 Command parsing of SELECT command) [1]
--> Protocol based Routing = Supported [1]
--> Technology based Routing = Supported [1]
--> Switched Off state = Supported [1]
--> Battery Off state = Supported [1]
* Number of Supported RF Interface fields to follow = [0x06]
--> {Std} NFCEE Direct RF Interface [0x00]
--> {Std} Frame RF Interface [0x01]
--> {Std} ISO-DEP RF Interface [0x02]
--> {Std} NFC-DEP RF Interface [0x03]
--> Proprietary [0x81]
--> Proprietary [0x82]
* Max Logical Connections = 2 (Maximum number of Dynamic Logical Connections supported by the NFCC) [0x02]
* Max Routing Table Size = 200 (Indicates the maximum amount of data in Octets that are possible in a routing configuration) [0xC8 0x00]
* Max Control Packet Payload Size = 255 (Indicate the maximum payload length of a NCI Control Packet that the NFCC is able to receive) [0xFF]
* Max Size for Large Parameters = 2 (The maximum size in octets for the sum of the sizes of PB_H_INFO and LB_H_INFO_RESP parameter values) [0x02 0x00]
* Manufacturer ID = NXP [0x04]
* Manufacturer Specific Information = [0x05 0x08 0x02 0x02]
--> Hardware version number = {NXP PN547-PN548}[0x05]
--> ROM code version number = {NXP PN547-PN548}[0x08]
--> Flash major version = {NXP PN547-PN548}[0x02]
--> Flash minor version = {NXP PN547-PN548}[0x02]
[NCI][COMMAND][2f 02 00]
SYSTEM_PROPRIETARY_ACT_CMD
[NCI][RESPONSE][4f 02 05 00 00 00 7a 5d]
SYSTEM_PROPRIETARY_ACT_RSP
* Status = {Std} STATUS_OK [0x00]
* FW_Build_Number = [0x00 0x00 0x7A 0x5D]
[NCI][COMMAND][21 00 10 05 01 01 01 02 01 01 03 01 01 04 01 02 80 01 80]
RF_DISCOVER_MAP_CMD
* Number of Mapping Configurations = 5 [0x05]
--> Mapping Configuration N° 1
- RF Protocol = {Std} PROTOCOL_T1T [0x01]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} Frame RF Interface [0x01]
--> Mapping Configuration N° 2
- RF Protocol = {Std} PROTOCOL_T2T [0x02]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} Frame RF Interface [0x01]
--> Mapping Configuration N° 3
- RF Protocol = {Std} PROTOCOL_T3T [0x03]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} Frame RF Interface [0x01]
--> Mapping Configuration N° 4
- RF Protocol = {Std} PROTOCOL_ISO_DEP [0x04]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {Std} ISO-DEP RF Interface [0x02]
--> Mapping Configuration N° 5
- RF Protocol = {NXP PN547-PN548} MIFARE Classic [0x80]
- Mode = the RF Interface is mapped to the RF Protocol in Poll Mode [0x01]
- RF Interface = {NXP PN547-PN548} TAG-CMD [0x80]
[NCI][RESPONSE][41 00 01 00]
RF_DISCOVER_MAP_RSP
* Status = {Std} STATUS_OK [0x00]
[NCI][COMMAND][21 03 11 08 00 01 01 01 02 01 05 01 80 01 82 01 83 01 85 01]
RF_DISCOVER_CMD
* Number of Configurations = 8 [0x08]
--> Configuration N° 1
- RF Technology and Mode = {Std} NFC_A_PASSIVE_POLL_MODE [0x00]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 2
- RF Technology and Mode = {Std} NFC_B_PASSIVE_POLL_MODE [0x01]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 3
- RF Technology and Mode = {Std} NFC_F_PASSIVE_POLL_MODE [0x02]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 4
- RF Technology and Mode = {Std} NFC_F_ACTIVE_POLL_MODE (RFU) [0x05]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 5
- RF Technology and Mode = {Std} NFC_A_PASSIVE_LISTEN_MODE [0x80]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 6
- RF Technology and Mode = {Std} NFC_F_PASSIVE_LISTEN_MODE [0x82]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 7
- RF Technology and Mode = {Std} NFC_A_ACTIVE_LISTEN_MODE (RFU) [0x83]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
--> Configuration N° 8
- RF Technology and Mode = {Std} NFC_F_ACTIVE_LISTEN_MODE (RFU) [0x85]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]
[NCI][NOTIFICATION][60 00 06 a0 00 d7 d4 00 00]
CORE_RESET_NTF
* Reason Code = {NXP PN547-PN548} An assert has triggered PN547-PN548 reset/reboot [0xA0]
* Configuration Status = {Std} NCI RF Configuration has been kept [0x00]
* Program counter for assertion = {NXP PN547-PN548} 0x0000D4D7 [0xD7 0xD4 0x00 0x00]