Libnfc:FAQ

From NFC Tools
(Difference between revisions)
Jump to: navigation, search
(No NFC device found error)
(Unable to claim USB interface (Device or resource busy))
 
Line 15: Line 15:
  
 
Udev rules have not been installed...
 
Udev rules have not been installed...
 +
 +
On modern kernels, another cause is the pn533 modules.
 +
 +
The libnfc package should have installed a /etc/modprobe.d/blacklist-libnfc.conf to blacklist modules "nfc" and "pn533".
 +
 +
You might also need to add a /etc/modprobe.d/blacklist-libnfc-extra.conf with as content
 +
<pre>
 +
blacklist pn533_usb
 +
</pre>
 +
 +
These blacklists will be taken into account at next boot, use "modprobe -r" to remove the kernel modules immediately.
  
 
==''Too small reply'' error==
 
==''Too small reply'' error==

Latest revision as of 20:25, 9 January 2019

Contents

[edit] No NFC device found error

[edit] with a UART-based reader

Since v1.7.0, your PN532 UART device needs some configuration in newly introduced configuration file (eg. /etc/nfc/libnfc.conf).
Please read README file, then copy libnfc.conf.sample to the right place.
Make sure to put the file in SYSCONFDIR/nfc/libnfc.conf
If you don't want SYSCONFDIR to be /usr/local/etc, use ./configure --sysconfdir=/etc

[edit] with an ACR122U under Windows

Remove ACR122U drivers from ACS

[edit] Unable to claim USB interface (Device or resource busy)

You did not read the README!

Udev rules have not been installed...

On modern kernels, another cause is the pn533 modules.

The libnfc package should have installed a /etc/modprobe.d/blacklist-libnfc.conf to blacklist modules "nfc" and "pn533".

You might also need to add a /etc/modprobe.d/blacklist-libnfc-extra.conf with as content

blacklist pn533_usb

These blacklists will be taken into account at next boot, use "modprobe -r" to remove the kernel modules immediately.

[edit] Too small reply error

[edit] With Touchatag or ACR122U

Avoid using pcscd and libnfc with acr122_usb driver all together.
You can stop pcscd or disable support of that reader by pcscd by changing the libccid list of supported readers.

You've to know that those readers are very bad regarding all NFC features and you can expect troubles when using any command not sending immediately a reply: nfc-poll, emulation and p2p modes.

[edit] How do I change the libccid list of supported readers?

  • Get the libccid source code;
  • edit the file readers/supported_readers.txt;
  • remove the line with the VID/PID of the reader you want to disable;
  • reinstall the libccid driver, or just the regenerated src/Info.plist.

[edit] How to get some communication between a phone and a libnfc reader?

You've basically three options to communicate between phone and libnfc device:

[edit] NFC p2p

Check Libllcp

[edit] phone emulates a card, libnfc device reads/writes to the card

For PN544 based NFC phones, only possible with a patched Android, e.g. CyanoGenMod 10.1 contains already the required patches.
See e.g. http://nelenkov.blogspot.com/2012/10/emulating-pki-smart-card-with-cm91.html

[edit] libnfc device emulates a card, phone reads/writes to the card

Check nfc-emulate-forum-tag2.c and nfc-emulate-forum-tag4.c here: Libnfc:nfc-emulate

Personal tools
Namespaces

Variants
Actions
Navigation
Documentation
Misc
Toolbox
Partners