NFC PN7160A1 select() not working as expected

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

NFC PN7160A1 select() not working as expected

187 次查看
loadit
Contributor I

Hello everyone,


I am currently working on a simple piece of software that uses a PN7160A1 to detect Mifare NFC tags. I am using the Linux kernel driver for this. It works for now. I can use the device /def/nxpnfc to communicate with the chip. I am also already able to read the tags. So the setup seems to be working. But I noticed that the call to select(), which is made before the actual reading, returns immediately. Regardless of whether data is available or not. I got this combination of select() and read() from several examples, such as NfcFacrotyTest, but linux_libnfc-nci also uses it. And it makes sense, because I want to check if the device has data before reading, but it doesn't work. Select returns immediately and then reading blocks until a message arrives. Am I doing something wrong? I also checked the Linux driver, which currently does not support poll. Will this be added at some point, or is there a better way that I am not currently seeing? Does anyone have any advice?

标签 (2)
0 项奖励
回复
1 回复

113 次查看
jimmychan
NXP TechSupport
NXP TechSupport

FYI.

i.MX6ULL EVK running Yocto Linux + PN7160 - NXP Community

There is the nfcDemoApp. The above link show you how to build it in Yocto. You could take it for reference.

 

0 项奖励
回复