Hi Team,
I am using Linux kernel version 5.4 in that for NXP diver, with nxp-pn5xx/pn5xx_i2c and the library is libnfc_nci_linux-1.so.0.0.0 , RFID chip :- PN71506.
After reboot RFID cad start getting detected every time, But if we keep devices in idea for some time, After some time RFID not getting detected. we are observing "pn54x_dev_read: i2c_master_recv returned -121" fail loges.
Kindly find the failure log.
[10947.359030]
read in write = 0
[10977.385221] pn54x_dev_ioctl, cmd=1074063617, arg=1
[10977.385271] pn544_enable power on
[10977.484195]
read in write = 0
[10977.604298] pn54x_dev_ioctl, cmd=1074063617, arg=0
[10977.604357] pn544_disable power off
[10977.605610] pn54x_dev_read: i2c_master_recv returned -121
[10977.606819] pn54x_dev_read: i2c_master_recv returned -121
[10977.717686] pn54x_dev_read: i2c_master_recv returned -121
[10977.718824] pn54x_dev_read: i2c_master_recv returned -121
[10977.719958] pn54x_dev_read: i2c_master_recv returned -121
[10977.824193] pn54x_dev_ioctl, cmd=1074063617, arg=1
[10977.824239] pn544_enable power on
[10978.946808] pn54x_dev_ioctl, cmd=1074063617, arg=1
[10978.946857] pn544_enable power on
[10979.164083] pn54x_dev_ioctl, cmd=1074063617, arg=0
[10979.164110] pn544_disable power off
Can you please help in this.
Thank You,
Jitendra
Hi Tomas,
Kindly find attached log file in RFID not getting detected issue.
We suspecting bellow loges causing issue.
Can you please help to check in loges in RFID_Detect_fail.txt file.
Thank You,
Jitendra
Hello jitendra_thakare,
The issue seems to be generally in I2C communication.
I see that you write the following via I2C :
Do you have some logic analyzer available? Can you check the stability of the I2C line? E.g., pull-up resistors, Noise....
How long are the I2C traces?
BR
Tomas
Hi Tomas,
Thank you for your reply.
After some time, devices unable to read the card, we lose the communication with PN7150.
Other functionality working fine.
Before losing the communication we observer bellow loges.
[125881.423820] pn54x_dev_read : RFID reading 1 bytes.
[125881.425378] pn54x_dev_read : RFID reading 3 bytes.
[125882.769116] pn54x_dev_read : RFID reading 6 bytes.
[125882.770855] pn54x_dev_ioctl, cmd=1074063617, arg=1
[125882.770892] pn544_enable power on
[125882.770985] pn54x_dev_read : RFID reading 3 bytes.
[125882.982994] pn54x_dev_ioctl, cmd=1074063617, arg=0
[125882.983020] pn544_disable power off
[125882.984282] pn54x_dev_read: i2c_master_recv returned -121
[125882.984369] pn54x_dev_read : RFID reading 3 bytes.
[125882.985462] pn54x_dev_read: i2c_master_recv returned -121
[125882.985503] pn54x_dev_read : RFID reading 3 bytes.
[125882.986617] pn54x_dev_read: i2c_master_recv returned -121
[125882.986658] pn54x_dev_read : RFID reading 3 bytes.
[125882.987748] pn54x_dev_read: i2c_master_recv returned -121
[125882.987786] pn54x_dev_read : RFID reading 3 bytes.
[125882.988908] pn54x_dev_read: i2c_master_recv returned -121
[125883.097316] pn54x_dev_read : RFID reading 3 bytes.
[125883.098438] pn54x_dev_read: i2c_master_recv returned -121
[125883.098480] pn54x_dev_read : RFID reading 3 bytes.
[125883.099623] pn54x_dev_read: i2c_master_recv returned -121
[125883.203163] pn54x_dev_ioctl, cmd=1074063617, arg=1
[125883.203211] pn544_enable power on
[125883.323201] pn54x_dev_write : RFID writing 4 bytes.
[125884.325840] pn54x_dev_ioctl, cmd=1074063617, arg=1
[125884.325891] pn544_enable power on
[125884.543112] pn54x_dev_ioctl, cmd=1074063617, arg=0
[125884.543138] pn544_disable power off
[125884.763161] pn54x_dev_ioctl, cmd=1074063617, arg=1
[125884.763211] pn544_enable power on
[125884.883246] pn54x_dev_write : RFID writing 4 bytes.
[125885.885884] pn54x_dev_ioctl, cmd=1074063617, arg=1
If driver is already on why it is trying to ON and OFF again.
[125882.770855] pn54x_dev_ioctl, cmd=1074063617, arg=1
[125882.770892] pn544_enable power on
[125882.770985] pn54x_dev_read : RFID reading 3 bytes.
[125882.982994] pn54x_dev_ioctl, cmd=1074063617, arg=0
[125882.983020] pn544_disable power off
Can you please help.
Thank you,
Jitendra
Hello jitendra_thakare,
Ok, thanks for the logs.
Does the device lose communication during an NFC card reading? Or is the PN7150 just polling and after 3 hours you lose the communication?
After you lose the communication, can your device work again (after a break). Or is the device permanently "dead" ?
Thanks !
BR
Tomas
Hi Tomas,
"No, the device does not lose communication during an NFC card reading. We observe the issue if we keep the devices in an idle state for 3 to 4 hours.
For debugging purposes, I added one log in the pn54x_dev_read function:
pr_err("%s: RFID reading %zu bytes.\n", __func__, count);
These logs always appear, and the RFID gets detected.
However, once we observe the failure log "pn54x_dev_read: i2c_master_recv returned -121,"
the RFID is not getting detected.
Thank You,
Jitendra
Hello jitendra_thakare,
Do you mean that after 3 hours the device does not work at all or e.g., after 30 minutes of "break" the device can operate again?
Does the device cannot read the cards? Or did you completely lose the communication with PN7150?
BR
Tomas
Hello Jitendra_thakare,
can you please share your configuration files, please?
Can you also check if you have all LOG levels set to 03h, please?
After you enable them, please share the logs again. It will help us more understand the issue.
BR
Tomas