2

nfc-poll command stops polling after 30000ms by default when using libnfc library.

I need an endless polling when calling this command from the raspberry pi 3 b+ (raspbian stretch) command line.

I´ve looked into the libnfc library source code and saw that the function nfc_initiator_poll_target that is in charge of polling the nfc target can receive a parameter 0xFF for configuring an endless polling, but this is a function written in C, and I haven´t found the way to pass this parameter from command line when executing nfc-poll.

// So I typed the following from command line of the raspberry pi 3 b+.

nfc-poll

Then I can see the resulting information after typing the above command as:

NFC device will poll during 30000ms (20 pollings of 300 ms for 5 modulations)

So, what I´m looking for is a way to configure an endless polling, not just 20 pollings.

Is there any way to configure or pass a parameter for setting up the endless polling from the command line?

Note: I´m asking this because I´m using this command of the libnfc library in a python script. So I do not want my script stops/crashes after the 30000ms timer expires which is configured by default by the libnfc library itself.

  • I already managed to do this. I had to modify the source code directly, then re-compiled the hole `libnfc` library to generate a new nfc-poll object file. After that, I was able to call this new `nfc-poll` command from my python script. Now I have my endless polling working. Cheers! – isael garcia luis May 20 '19 at 07:49

0 Answers0