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