OM27160 raspberry i2c NfcService Init Failed

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

OM27160 raspberry i2c NfcService Init Failed

Jump to solution
978 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
Reply
1 Solution
128 Views
Tomas_Parizek
NXP Employee
NXP Employee

***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. 

Tomas_Parizek_0-1722347889218.png

NXP is working to fix it as as soon as possible. 

 

View solution in original post

0 Kudos
Reply
13 Replies
602 Views
paweljasinski
Contributor I
guys, I had no time to perform the full install and try to use the driver which I believe can change something.
At the same time what is marked as solution, does not solve anything. If you read my description, I have no problem talking to different devices using I2C. So the marked solution solves only the problem it created itself by disabling I2C.
0 Kudos
Reply
952 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
Reply
958 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
Reply
956 Views
paweljasinski
Contributor I
The setting are correct. I will attach strace log which shows opening /dev/i2c-1
0 Kudos
Reply
953 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
Reply
867 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
Reply
129 Views
Tomas_Parizek
NXP Employee
NXP Employee

***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. 

Tomas_Parizek_0-1722347889218.png

NXP is working to fix it as as soon as possible. 

 

0 Kudos
Reply
377 Views
Stephan_B
Contributor I

Hi @Tomas_Parizek 

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

0 Kudos
Reply
355 Views
Tomas_Parizek
NXP Employee
NXP Employee

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 

0 Kudos
Reply
274 Views
Stephan_B
Contributor I

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

0 Kudos
Reply
291 Views
Stephan_B
Contributor I

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

0 Kudos
Reply
933 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
Reply
967 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
Reply