jurajsarinay / ifdnlnfc

IFD Handler exposing Linux NFC devices to PCSC lite
GNU General Public License v2.0
5 stars 1 forks source link

Additional proprietary NCI configuration #2

Open StarGate01 opened 3 weeks ago

StarGate01 commented 3 weeks ago

As detailed in https://github.com/nfc-tools/libnfc/issues/455#issuecomment-2221979571 , the NXP chip in my Lenovo Yoga X1 Gen3 needs some additional configuration commands to operate in a stable mode.

Without this configuration, the chip does somewhat work, and also detects tags - but any longer running data transmissions fail due to the connection dropping. I presume this is because of the misconfigured power and firmware parameters.

I tried reaching @krzk via email, to get some pointers on how custom NCI commands could be passed to the chip via the Netlink and nxp-nci systems.

StarGate01 commented 3 weeks ago

For reference, here is a debug log of pcscd while pcsc_scan is running and trying to scan a NXP P71D321 Javacard. The connection breaks and re-establishes in quick succession. This matches my obervations from linux_libnfc-nci without the config parameters applied.

pcscd log ``` Nov 05 17:04:58 redpulsar pcscd[265027]: 00000123 ../src/pcscdaemon.c:794:main() Starting suicide alarm in 60 seconds Nov 05 17:05:07 redpulsar pcscd[265027]: 09125083 ../src/winscard_msg_srv.c:253:ProcessEventsServer() Common channel packet arrival Nov 05 17:05:07 redpulsar pcscd[265027]: 00000019 ../src/winscard_msg_srv.c:264:ProcessEventsServer() ProcessCommonChannelRequest detects: 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000002 ../src/pcscdaemon.c:130:SVCServiceRunLoop() A new context thread creation is requested: 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00013651 ../src/winscard_svc.c:362:ContextThread() Authorized PC/SC client Nov 05 17:05:07 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:365:ContextThread() Thread is started: dwClientID=11, threadContext @0x8c5cbf0 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000009 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_VERSION from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:395:ContextThread() Client is protocol version 4:5 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:418:ContextThread() CMD_VERSION for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00000041 ../src/winscard_svc.c:383:ContextThread() Received command: ESTABLISH_CONTEXT from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000012 ../src/winscard.c:210:SCardEstablishContext() Establishing Context: 0x4D6D75D4 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:501:ContextThread() ESTABLISH_CONTEXT for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00000024 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000026 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00001054 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00000020 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000018 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00000085 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READERS_STATE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000023 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READERS_STATE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000029 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000017 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00000016 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:07 redpulsar pcscd[265027]: 00000100 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000018 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:07 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 03254319 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000058 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 132, supported protocols: 10. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000006 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:11 redpulsar pcscd[265027]: 00000034 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 132, Protocol: 4. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000014 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:11 redpulsar pcscd[265027]: 00000006 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:11 redpulsar pcscd[265027]: 00000002 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00000008 Card ATR: 3B 80 80 01 01 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000128 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000094 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000017 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00067499 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000015 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000079 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00332257 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:11 redpulsar pcscd[265027]: 00002158 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:11 redpulsar pcscd[265027]: 00002427 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000009 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00000041 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000009 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000036 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000005 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00000147 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000018 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000051 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00399806 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000047 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 133, supported protocols: 10. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000007 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:11 redpulsar pcscd[265027]: 00000018 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 133, Protocol: 4. Nov 05 17:05:11 redpulsar pcscd[265027]: 00000014 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:11 redpulsar pcscd[265027]: 00000007 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:11 redpulsar pcscd[265027]: 00000003 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00000010 Card ATR: 3B 80 80 01 01 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000035 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000010 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000034 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:11 redpulsar pcscd[265027]: 00066646 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000014 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000065 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:11 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:12 redpulsar pcscd[265027]: 00333249 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:12 redpulsar pcscd[265027]: 00002497 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:12 redpulsar pcscd[265027]: 00002933 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:12 redpulsar pcscd[265027]: 00000008 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:12 redpulsar pcscd[265027]: 00000125 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000105 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:12 redpulsar pcscd[265027]: 00000129 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000100 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000005 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:12 redpulsar pcscd[265027]: 00399613 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:12 redpulsar pcscd[265027]: 00000079 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 134, supported protocols: 10. Nov 05 17:05:12 redpulsar pcscd[265027]: 00000007 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:12 redpulsar pcscd[265027]: 00000028 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 134, Protocol: 4. Nov 05 17:05:12 redpulsar pcscd[265027]: 00000020 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:12 redpulsar pcscd[265027]: 00000010 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:12 redpulsar pcscd[265027]: 00000003 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:12 redpulsar pcscd[265027]: 00000011 Card ATR: 3B 80 80 01 01 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000064 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000009 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000033 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000005 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:12 redpulsar pcscd[265027]: 00061797 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000014 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000037 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:12 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00338124 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:13 redpulsar pcscd[265027]: 00002529 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:13 redpulsar pcscd[265027]: 00001777 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:13 redpulsar pcscd[265027]: 00000007 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000021 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00000074 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000010 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000030 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00000068 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000005 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000025 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00400318 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:13 redpulsar pcscd[265027]: 00000059 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 135, supported protocols: 10. Nov 05 17:05:13 redpulsar pcscd[265027]: 00000006 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:13 redpulsar pcscd[265027]: 00000016 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 135, Protocol: 4. Nov 05 17:05:13 redpulsar pcscd[265027]: 00000012 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:13 redpulsar pcscd[265027]: 00000006 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:13 redpulsar pcscd[265027]: 00000002 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00000007 Card ATR: 3B 80 80 01 01 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000057 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000007 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000042 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00061812 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000014 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000044 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000008 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00338099 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:13 redpulsar pcscd[265027]: 00001989 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:13 redpulsar pcscd[265027]: 00002200 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:13 redpulsar pcscd[265027]: 00000008 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00000108 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000008 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000111 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:13 redpulsar pcscd[265027]: 00000112 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000021 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:13 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:14 redpulsar pcscd[265027]: 00400008 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:14 redpulsar pcscd[265027]: 00000078 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 136, supported protocols: 10. Nov 05 17:05:14 redpulsar pcscd[265027]: 00000006 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:14 redpulsar pcscd[265027]: 00000029 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 136, Protocol: 4. Nov 05 17:05:14 redpulsar pcscd[265027]: 00000012 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:14 redpulsar pcscd[265027]: 00000005 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:14 redpulsar pcscd[265027]: 00000002 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:14 redpulsar pcscd[265027]: 00000007 Card ATR: 3B 80 80 01 01 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000061 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000019 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000030 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:14 redpulsar pcscd[265027]: 00060211 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000011 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000032 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:14 redpulsar pcscd[265027]: 00339915 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:14 redpulsar pcscd[265027]: 00002099 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:14 redpulsar pcscd[265027]: 00001900 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:14 redpulsar pcscd[265027]: 00000008 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:14 redpulsar pcscd[265027]: 00000086 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000028 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:14 redpulsar pcscd[265027]: 00000075 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000025 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:14 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00399862 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000054 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 137, supported protocols: 10. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000007 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:15 redpulsar pcscd[265027]: 00000018 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 137, Protocol: 4. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000014 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:15 redpulsar pcscd[265027]: 00000005 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:15 redpulsar pcscd[265027]: 00000002 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00000009 Card ATR: 3B 80 80 01 01 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000066 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000021 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000030 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00066437 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000016 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000035 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00333919 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:15 redpulsar pcscd[265027]: 00003057 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:15 redpulsar pcscd[265027]: 00002385 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000008 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00000080 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000028 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00000076 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000005 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000037 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000021 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00399887 ifdnlnfc.c:384:event_handler() NFC_TARGETS_FOUND. Adapter index:0. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000048 ifdnlnfc.c:235:get_targets_handler() NFC target found. Index: 138, supported protocols: 10. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000007 ifdnlnfc.c:929:IFDHPowerICC() IFD_POWER_UP Nov 05 17:05:15 redpulsar pcscd[265027]: 00000014 ifdnlnfc.c:772:connect_target() Connected to NFC target. Index: 138, Protocol: 4. Nov 05 17:05:15 redpulsar pcscd[265027]: 00000012 ifdnlnfc.c:279:get_target_ats_handler() ATS not present Nov 05 17:05:15 redpulsar pcscd[265027]: 00000006 ../src/eventhandler.c:404:EHStatusHandlerThread() powerState: POWER_STATE_POWERED Nov 05 17:05:15 redpulsar pcscd[265027]: 00000002 ../src/eventhandler.c:421:EHStatusHandlerThread() Card inserted into Linux Netlink NFC 00 00 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00000008 Card ATR: 3B 80 80 01 01 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000033 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000006 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000029 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:15 redpulsar pcscd[265027]: 00063296 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000014 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000071 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:15 redpulsar pcscd[265027]: 00000005 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:16 redpulsar pcscd[265027]: 00337051 ifdnlnfc.c:943:IFDHPowerICC() IFD_POWER_DOWN Nov 05 17:05:16 redpulsar pcscd[265027]: 00002121 ../src/eventhandler.c:480:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED Nov 05 17:05:16 redpulsar pcscd[265027]: 00002051 ifdnlnfc.c:559:poll_for_targets() NFC target poll started. Adapter index:0. Nov 05 17:05:16 redpulsar pcscd[265027]: 00000007 ../src/eventhandler.c:356:EHStatusHandlerThread() Card Removed From Linux Netlink NFC 00 00 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000004 ../src/winscard_svc.c:871:MSGSignalClient() Signal client: 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000002 ../src/winscard_svc.c:874:MSGSignalClient() SIGNAL for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:16 redpulsar pcscd[265027]: 00000106 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000008 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000094 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_STOP_WAITING_READER_STATE_CHANGE from client 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000018 ../src/winscard_svc.c:467:ContextThread() CMD_STOP_WAITING_READER_STATE_CHANGE for client 11, rv=SCARD_S_SUCCESS Nov 05 17:05:16 redpulsar pcscd[265027]: 00000110 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_WAIT_READER_STATE_CHANGE from client 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:883:MSGSendReaderStates() Send reader states: 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000022 ../src/winscard_svc.c:383:ContextThread() Received command: CMD_GET_READER_EVENTS from client 11 Nov 05 17:05:16 redpulsar pcscd[265027]: 00000003 ../src/winscard_svc.c:482:ContextThread() CMD_GET_READER_EVENTS for client 11, rv=SCARD_S_SUCCESS ```
jurajsarinay commented 3 weeks ago

connection dropping

At the moment there appears to be a hard-coded timeout of 700 ms for most exchanges with tags. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/include/net/nfc/nci_core.h#n55 A generous increase leads to better stability. Probably unrelated, but worth a try.

In fact, it is the pcscd that explicitly powers the card down if not in use. See here.

My handler then reports the tag as removed. The kernel wipes the list of targets when a connection is closed, a new poll is necessary prior to any further activation. I experimented with reporting the card as present even after IFD_POWER_DOWN, but ran into other problems. The current state of the library is not satisfactory, but it was a reasonable first shot.

Once a client actually connects to the tag, the connection stays alive. Try interacting with the tag instead of simply running pcsc_scan.

StarGate01 commented 3 weeks ago

I have recompiled the kernel with an NCI_DATA_TIMEOUT of 5000, KeePassXC seems to have a better time now, but the connection is still unstable / cycling (due to the missing power config I guess).

Commercial NFC-enabled PC/SC readers (eg. the ACR1252U) report the NFC card as inserted all the time when the card is in the RF field, even when no PC/SC client session is active. Some applications, like e.g. KeePassXC and the Yubico Authenticator (OTP) depend on that behavior to properly list connected devices.

zolfariot commented 1 week ago

I am currently testing this driver together with ATR kernel patch (https://lore.kernel.org/netdev/20241103124525.8392-1-juraj@sarinay.com/) and the built-in NXP chip of my ThinkPad T16G2 (NXP NPC300).

While ATR detection now works, I was unable to get any PC/SC transaction to work with the PKCS#11 driver for my eID card, while using NXP out-of-three kernel modules coupled with @StarGate01 IFD library everything works. (What I tried was to list the stored certificate on Firefox PKCS#11 configuration).

Could the NCI_DATA_TIMEOUT be the issue? I will try soon but at the moment I am a bit hardware and time constrained to run another kernel recompilation