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?
Solved! Go to Solution.
***UPDATE***
We see that the PN7160 returns "NfcService Init Failed" for latest Raspian Linux version 12 (Bookworm).
For Linux version 11 (bullseye), the issue should not occur.
NXP is working to fix it as as soon as possible.
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
***UPDATE***
We see that the PN7160 returns "NfcService Init Failed" for latest Raspian Linux version 12 (Bookworm).
For Linux version 11 (bullseye), the issue should not occur.
NXP is working to fix it as as soon as possible.
Has this been resolved to work on the latest Pi releases?
Thanks!
--Ken
I have the same issue. I've checked the I2C, unplugged and rebooted multiple times but I always get the "NfcService Init Failed". Do you have any more suggestions I could try to get my setup running?
The error message is the same whether the OM27160 is plugged in or not. Is there a easy way to verify whether the PN7160 is responding? Maybe my hardware has some defect?
Thanks
Stephan
Hello Stephan_B,
Can you share more details about your setup.... what Raspberry and OS are you using, please?
It seems that the latest Raspberry has an issue with our PN7160, our SW team is already checking that.
BR
Tomas
Hello @Tomas_Parizek
Today, I got my setup working. I had to install an old Rasbian version (bullseye) and then it compiled without error and it works.
Would have been nice to have some pointers in the "get started guide" concerning which OS / HW versions this has been tested with.
Regards
Stephan
Hello @Tomas_Parizek
I used a tried with a Raspberry Pi 5 as well as with a Raspberry Pi 3 B+. I tested both 32 and 64bit versions. Though when compiling for the 64bit version I needed to correct some of the code as I later found in the 64bit patch file.
I then assumed, that it is a HW problem, as I can see the I2C signals being sent with the oscilloscope. So I bought another EvalBoard, but it still not working.
"NfcService Init Failed"
"Leaving ..."
is all i get. As for the OS, I am working with Rasbian. I use the Raspberry Shield, that came with the Developmentkit and setup/installed everything via the Terminal (SSH/Putty)
Regards Stephan
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.