OM27160 raspberry i2c NfcService Init Failed

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

OM27160 raspberry i2c NfcService Init Failed

359 Views
paweljasinski
Contributor I

I have a OM27160A1HN connected to raspberry pi.

I have followed the instructions for i2c from https://www.nxp.com/docs/en/application-note/AN12991.pdf

When I run "nfcDemoApp poll", I get the "NfcService Init Failed".

 

What I tried so far:

I have double checked the board and it is i2c and not spi.

Scanning of the i2c with "i2cdetect -y 1" does not show anything.

I have tried with 2 different raspberries, which are knows to work with other i2c devices.

I have enabled debug, log is attached.

Any idea what should I check now?

0 Kudos
7 Replies

333 Views
paweljasinski
Contributor I

Is it possible that the 7160 is missing firmware or has a wrong firmware?

Would trying with SPI help?

0 Kudos

339 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Pawel, 

Can you check the libnfc-nxp.conf, please? 

You need to set the I2C alternative driver also here:

Tomas_Parizek_0-1710230229143.png

So for I2C -> NXP_TRANSPORT=0x02

BR

Tomas 

0 Kudos

337 Views
paweljasinski
Contributor I
The setting are correct. I will attach strace log which shows opening /dev/i2c-1
0 Kudos

334 Views
paweljasinski
Contributor I

here is the relevant snipped from the config. The config was changed before building.

NXP_TRANSPORT=0x02

###############################################################################
# Nfc Device Node name
NXP_NFC_DEV_NODE="/dev/i2c-1"

The strace file shows that the correct file is open. I have selected only the log from interesting thread.

The command was: "strace -ff -o strace.log nfcDemoApp poll"

 

0 Kudos

248 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Pawel, 

I just tested with the Raspberry Pi on my side 

I exactly followed the instructions listed in the App. Note you have mentioned. 

Here is the result:

Tomas_Parizek_0-1710863994273.png

You can see that for the first time, I also got the "NfcService Init Failed" error message as you. 

So I removed the PN7160 from the socket and put it back + I checked if the I2C was enabled. 

Then the NFC application started to work as you can see in the picture. 

Here is the information about HW that I am using: 

Tomas_Parizek_1-1710864521904.png

Also, one more thing I did at the beginning. I enabled the I2C in preferences:

Tomas_Parizek_2-1710864679129.png

 

BR

Tomas 

0 Kudos

314 Views
Tomas_Parizek
NXP Employee
NXP Employee

Hello Pawel, 

Ok, I see. Let me grab one Raspberry Pi and check with PN7160 on my side. 

BTW. Are you using a raspberry Pi "shield" or are you using a cable connection? 

BR


Tomas 

0 Kudos

348 Views
EduardoZamora
NXP TechSupport
NXP TechSupport

Hello @paweljasinski,

Hope you are doing well.

Could you please refer to the PN7160 Linux porting guide? This document describes in detail how to add support for a PN7160 controller to a generic GNU/Linux system.

Regards.
Eduardo.

0 Kudos