OM27160 raspberry i2c NfcService Init Failed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

OM27160 raspberry i2c NfcService Init Failed

跳至解决方案
441 次查看
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 项奖励
1 解答
330 次查看
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 项奖励
8 回复数
65 次查看
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 项奖励
415 次查看
paweljasinski
Contributor I

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

Would trying with SPI help?

0 项奖励
421 次查看
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 项奖励
419 次查看
paweljasinski
Contributor I
The setting are correct. I will attach strace log which shows opening /dev/i2c-1
0 项奖励
416 次查看
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 项奖励
331 次查看
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 项奖励
396 次查看
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 项奖励
430 次查看
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 项奖励