After some time ( around more than 3 hr )RFID not detected.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

After some time ( around more than 3 hr )RFID not detected.

321 Views
jitendra_thakare
Contributor II

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

0 Kudos
9 Replies

114 Views
jitendra_thakare
Contributor II

Hi Tomas,

Kindly find attached  log file in RFID not getting detected issue.
We suspecting bellow loges causing issue.

Line  320: App[462]: 2024:02:13-10:47:21.061 NxpExtns:   GetNxpByteArrayValue: NXP Config Parameter : NXP_CORE_CONF_EXTN
Line  339: App[462]: 2024:02:13-10:47:21.070 NxpExtns:   GetNxpByteArrayValue: NXP Config Parameter : NXP_CORE_MFCKEY_SETTING
Line  340: App[462]: 2024:02:13-10:47:21.070 NxpExtns:   GetNxpByteArrayValue: NXP Config Parameter : NXP_CORE_RF_FIELD
Line  360: App[462]: 2024:02:13-10:47:21.079 NxpExtns:   GetNxpByteArrayValue: NXP Config Parameter : NXP_CORE_STANDBY
Line  408: App[462]: 2024:02:13-10:47:21.087 NxpExtns:   GetNxpByteArrayValue: NXP Config Parameter : NXP_CORE_CONF

 
Can you please help to check in loges in RFID_Detect_fail.txt file.

Thank You,

Jitendra

0 Kudos

86 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello jitendra_thakare, 

The issue seems to be generally in I2C communication. 

I see that you write the following via I2C :

Tomas_Parizek_0-1707982741837.png

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 

0 Kudos

274 Views
jitendra_thakare
Contributor II

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

0 Kudos

268 Views
Tomas_Parizek
NXP Employee
NXP Employee

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 

 

0 Kudos

265 Views
jitendra_thakare
Contributor II

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

0 Kudos

292 Views
Tomas_Parizek
NXP Employee
NXP Employee

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 

 

0 Kudos

231 Views
jitendra_thakare
Contributor II
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
0 Kudos

196 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello  Jitendra_thakare, 

can you please share your configuration files, please? 

  • libnfc-nxp-init.conf
  • libnfc-nxp-pn548.conf

Can you also check if you have all LOG levels set to 03h, please?

Tomas_Parizek_0-1707478297873.png

After you enable them, please share the logs again. It will help us more understand the issue. 

BR

Tomas 

 

 

0 Kudos

148 Views
jitendra_thakare
Contributor II
Hi Tomas,
I have kept the log level at 0x03, and the board has been on for three days.
I haven't observed any issues during this time. I have also noticed the following logs,
but the RFID is still being detected.


Added Patch.
diff --git a/conf/libnfc-nxp-init.conf b/conf/libnfc-nxp-init.conf
index 9079dda..5bc32fb 100644
--- a/conf/libnfc-nxp-init.conf
+++ b/conf/libnfc-nxp-init.conf
@@ -19,13 +19,13 @@
# NXPLOG_WARN_LOGLEVEL 0x02
# NXPLOG_ERROR_LOGLEVEL 0x01
# NXPLOG_SILENT_LOGLEVEL 0x00
-NXPLOG_GLOBAL_LOGLEVEL=0x00
-NXPLOG_EXTNS_LOGLEVEL=0x00
-NXPLOG_NCIHAL_LOGLEVEL=0x00
-NXPLOG_NCIX_LOGLEVEL=0x00
-NXPLOG_NCIR_LOGLEVEL=0x00
-NXPLOG_FWDNLD_LOGLEVEL=0x00
-NXPLOG_TML_LOGLEVEL=0x00
+NXPLOG_GLOBAL_LOGLEVEL=0x03
+NXPLOG_EXTNS_LOGLEVEL=0x03
+NXPLOG_NCIHAL_LOGLEVEL=0x03
+NXPLOG_NCIX_LOGLEVEL=0x03
+NXPLOG_NCIR_LOGLEVEL=0x03
+NXPLOG_FWDNLD_LOGLEVEL=0x03
+NXPLOG_TML_LOGLEVEL=0x03

Logs :
[152532.045660] pn54x_dev_ioctl, cmd=1074063617, arg=1
[152532.045711] pn544_enable power on
[152532.046772] pn54x_dev_read: i2c_master_recv returned -121
[164863.925139] pn54x_dev_ioctl, cmd=1074063617, arg=1
[164863.925190] pn544_enable power on
[164864.143541] pn54x_dev_ioctl, cmd=1074063617, arg=0
[164864.143568] pn544_disable power off
[164864.144839] pn54x_dev_read: i2c_master_recv returned -121
[164864.146958] pn54x_dev_read: i2c_master_recv returned -121
[164864.149036] pn54x_dev_read: i2c_master_recv returned -121
[164864.211438] pn54x_dev_read: i2c_master_recv returned -121
[164864.213541] pn54x_dev_read: i2c_master_recv returned -121
[164865.226909] pn54x_dev_ioctl, cmd=1074063617, arg=1
[164865.226959] pn544_enable power on
[164865.228021] pn54x_dev_read: i2c_master_recv returned -121

I will update you as needed.
Thank You,
Jitendra
0 Kudos