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?
Is it possible that the 7160 is missing firmware or has a wrong firmware?
Would trying with SPI help?
Hello Pawel,
Can you check the libnfc-nxp.conf, please?
You need to set the I2C alternative driver also here:
So for I2C -> NXP_TRANSPORT=0x02
BR
Tomas
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"
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:
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:
Also, one more thing I did at the beginning. I enabled the I2C in preferences:
BR
Tomas
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
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.