question

TayungEvanLee-6412 avatar image
0 Votes"
TayungEvanLee-6412 asked SeeyaXi-msft edited

NFC Client driver state transition issue

Hi All,

Currently I am porting NCI driver, encountered three problems.

The first issue is that when run the test program, often encounter this message "NFC Card emulation is not support on this device, probably the device does not have NFC at all". So just restart the driver by this command "devcon restart my-nci-driver hwid". But after a while the driver will automatically unload again. And after loading the driver, the test program must be executed immediately, otherwise the driver's state will bypass SequenceRfDiscStartComplete
state go directly to the SequenceShutdownComplete state. Is there a way for the test program to notify the driver to return to the state of reading tag?


The Second issue is: If the window application has found the device, so that the device driver can successfully receive the RF_DISCOVER_CMD and enter the SequenceRfDiscStartComplete state, However, subsequent read memory actions are often terminated early and go directly to Seq: SequencePreRfDiscStop. Why?


The Third issue is that NfcCxHardwareEvent in D0Entry often encounters errors 0xc0000001.

My NFC Client driver is on Windows 10 IOT Raspberry Pi 3.
The OS version is 10.0.17763.107
Test Application is "NFC C# Sample" from Windows-universal-sample.

Below is the log.




Driver loaded
ST25R3916 : AddDevice
ST25R3916 : AddDevice-------------NfcCxDeviceInitialize()!
ST25R3916 : AddDevice ---Set the RF config!
ST25R3916 : AddDevice Exit!
ST25R3916 : PrepareHardware!ST25R3916 : ConfigureIoTarget
ST25R3916 : ConfigureIoTarget Exit 0
ST25R3916 : Initialize()1!-------
ST25R3916 : st25r_main enter
ST25R3916 : st25r3916CheckChipID
ST25R3916 : PrepareHardware Exit!
ST25R3916 : D0Entry in state: 5 device: ff708ef8!
ST25R3916 : start!
Seq: SequencePreInit
ST25R3916 : Write NCI Ctrl= 20 0 1 0
ST25R3916 :CORE_RESET_CMD keep
ST25R3916 :CORE_RESET_RSP has been kept
ST25R3916 :CORE_RESET_NTF has been sent
ST25R3916 : Write NCI Ctrl= 20 1 0
ST25R3916 :CORE_INIT_CMD
ST25R3916 : Write NCI Ctrl= 20 3 2 1 52
ST25R3916 :CORE_GET_CONFIG
ST25R3916 :CORE_GET_CONFIG_RSP
ST25R3916 : Write NCI Ctrl= 20 3 b a 21 28 30 31 54 5b 60 80 81 82
ST25R3916 :CORE_GET_CONFIG
ST25R3916 :CORE_GET_CONFIG_RSP
ST25R3916 : Write NCI Ctrl= 21 0 10 5 4 3 2 5 3 3 1 1 1 2 1 1 3 1 1
ST25R3916 : RF_DISCOVER_MAP_CMD
ST25R3916 : RF_DISCOVER_MAP_RSP
ST25R3916 : Write NCI Ctrl= 21 1 7 0 1 1 3 0 1 5
ST25R3916 : RF_SET_LISTEN_MODE_ROUTING_CMD
ST25R3916 :RF_SET_LISTEN_MODE_ROUTING_RSP
Seq: SequenceInitComplete <=========================================
ST25R3916 : Write NCI Ctrl= 20 3 5 4 29 2a 61 62
ST25R3916 :CORE_GET_CONFIG
ST25R3916 :CORE_GET_CONFIG_RSP
ST25R3916 : Write NCI Ctrl= 20 2 27 2 29 11 46 66 6d 1 1 11 2 2 3 80 3 2 0 1 4 1 20 61 11 46 66 6d 1 1 11 2 2 3 80 3 2 0 1 4 1 20
ST25R3916 :CORE_SET_CONFIG_CMD
ST25R3916 :CORE_SET_CONFIG_RSP
Seq: SequencePreNfceeDisc <=========================================
ST25R3916 : Write NCI Ctrl= 22 0 1 1
ST25R3916 :NFCEE_DISCOVER_CMD Action:1
ST25R3916 :NFCEE_DISCOVER_RSP #0 of NFCEEs
Seq: SequenceNfceeDiscComplete <=========================================
ST25R3916 : D0Entry exit!
ST25R3916 : InterruptEnable
ST25R3916 : InterruptEnable exit
ST25R3916 : Write NCI Ctrl= 21 1 c 0 2 1 3 0 1 4 1 3 0 1 5
ST25R3916 : RF_SET_LISTEN_MODE_ROUTING_CMD
ST25R3916 :RF_SET_LISTEN_MODE_ROUTING_RSP
Seq: SequencePreRfDiscStart <=========================================
ST25R3916 : Write NCI Ctrl= 20 3 5 4 18 32 50 0
ST25R3916 :CORE_GET_CONFIG
ST25R3916 :CORE_GET_CONFIG_RSP
ST25R3916 : Write NCI Ctrl= 20 2 b 3 18 1 1 32 1 40 0 2 2c 1
ST25R3916 :CORE_SET_CONFIG_CMD
ST25R3916 :CORE_SET_CONFIG_RSP
ST25R3916 : Write NCI Ctrl= 21 3 15 a 3 1 0 1 1 1 5 1 2 1 6 1 80 1 83 1 82 1 85 1
ST25R3916 :RF_DISCOVER_CMD
ST25R3916 :RF_DISCOVER_RSP
Seq: SequenceRfDiscStartComplete <==============================
RF_INTF_ACTIVATED_NTF _FRAME
ST25R3916 : Write NCI Data= 0 0 1 60
(0, 4, 4, 2, 1, 0, 11, 3, 0)
ST25R3916 : GetVersion
ST25R3916 : Write NCI Ctrl= 21 6 1 1
ST25R3916 :RF_DEACTIVATE_CMD Type:Sleep
ST25R3916 :RF_DEACTIVATE_RSP
ST25R3916 :RF_DEACTIVATE_NTF
ST25R3916 : Write NCI Ctrl= 21 4 3 1 2 1
ST25R3916 :RF_DISCOVER_SELECT_CMD protocol:2 intf:1
ST25R3916 :RF_DISCOVER_SELECT_RSP
RF_INTF_ACTIVATED_NTF _FRAME
ST25R3916 : Write NCI Data= 0 0 2 30 2 <======================read data
ST25R3916 : Write NCI Data= 0 0 2 30 2 <======================read data
ST25R3916 : Write NCI Data= 0 0 2 30 4 <=====================read data
ST25R3916 : Write NCI Data= 0 0 2 30 2 <=====================read data
Seq: SequencePreRfDiscStop <== There is still unread data, but this state occurs ahead of time
Seq: SequencePreRecovery <======================
Seq: SequencePreShutdown <=====================
ST25R3916 : Write NCI Ctrl= 20 0 1 0 4
ST25R3916 :CORE_RESET_CMD keep
ST25R3916 :CORE_RESET_RSP has been kept
ST25R3916 :CORE_RESET_NTF has been sent
Seq: SequenceShutdownComplete
Seq: SequencePreInit
ST25R3916 : D0Entry NfcCxHardwareEvent error c0000001!
ST25R3916 : ReleaseHardware
ST25R3916 : DeInit()1!-------
ST25R3916 : DeInit()2! main_thread exiting-------550
ST25R3916 : st25r_main mainthread_func() End ----
ST25R3916 : DeInit()3!-------
ST25R3916 : DeInit()4 Exit!-------
ST25R3916 : ReleaseHardware 1
ST25R3916 : ReleaseHardware 1.1
ST25R3916 : ReleaseHardware 2
ST25R3916 : Destroy1!
ST25R3916 : Destroy2!
Driver unloaded

windows-10-networkwindows-hardwarewindows-hardware-certificationwindows-hardware-wdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers