Platform independent Near Field Communication (NFC) library

Overview
*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009      Roel Verdult
* Copyright (C) 2009-2015 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* Additional contributors:
* See AUTHORS file
-*

General Information

libnfc is a library which allows userspace application access to NFC devices.

The official web site is: http://www.nfc-tools.org/

The official forum site is: http://www.libnfc.org/community/

The official development site is: https://github.com/nfc-tools/libnfc

Important note: this file covers POSIX systems, for Windows please read README-Windows.md

Requirements

Some NFC drivers depend on third party software:

  • pcsc:

    • Support build with pcsc driver, which can be using all compatible readers, Feitian R502 and bR500 already passed the test.

The regression test suite depends on the cutter framework: http://cutter.sf.net

Installation

See the file INSTALL for configure, build and install details.

Additionnally, you may need to grant permissions to your user to drive your device. Under GNU/Linux systems, if you use udev, you could use the provided udev rules. e.g. under Debian, Ubuntu, etc.

sudo cp contrib/udev/93-pn53x.rules /lib/udev/rules.d/

Under FreeBSD, if you use devd, there is also a rules file: contrib/devd/pn53x.conf.

Configuration

In order to change the default behavior of the library, the libnfc uses a configuration file located in sysconfdir (as provided to ./configure).

A sample commented file is available in sources: libnfc.conf.sample

If you have compiled using:

./configure --prefix=/usr --sysconfdir=/etc

you can make configuration directory and copy the sample file:

sudo mkdir /etc/nfc
sudo cp libnfc.conf.sample /etc/nfc/libnfc.conf

To configure multiple devices, you can either modify libnfc.conf or create a file per device in a nfc/devices.d directory:

sudo mkdir -p /etc/nfc/devices.d
printf 'name = "My first device"\nconnstring = "pn532_uart:/dev/ttyACM0"\n' | sudo tee /etc/nfc/devices.d/first.conf
printf 'name = "My second device"\nconnstring = "pn532_uart:/dev/ttyACM1"\n' | sudo tee /etc/nfc/devices.d/second.conf

How to report bugs

To report a bug, visit https://github.com/nfc-tools/libnfc/issues and fill out a bug report form.

If you have questions, remarks, we encourage you to post this in the developers community: http://www.libnfc.org/community

Please make sure to include:

  • The version of libnfc

  • Information about your system. For instance:

    • What operating system and version
    • For Linux, what version of the C library

    And anything else you think is relevant.

  • A trace with debug activated.

    Reproduce the bug with debug, e.g. if it was:

      $ nfc-list -v
    

    run it as:

      $ LIBNFC_LOG_LEVEL=3 nfc-list -v
    
  • How to reproduce the bug.

    Please include a short test program that exhibits the behavior.

    As a last resort, you can also provide a pointer to a larger piece

    of software that can be downloaded.

  • If the bug was a crash, the exact text that was printed out

    when the crash occured.

  • Further information such as stack traces may be useful, but

    is not necessary.

Patches

Patches can be posted to https://github.com/nfc-tools/libnfc/issues

If the patch fixes a bug, it is usually a good idea to include all the information described in "How to Report Bugs".

Building

It should be as simple as running these two commands:

./configure
make

To build with specific driver(s), see option --with-drivers=... detailed in ./configure --help.

Note: if you're using directly the development repository and not the release sources, you will have to execute firstly autoreconf -vis.

Troubleshooting

Touchatag/ACR122:

If your Touchatag or ACR122 device fails being detected by libnfc, make sure that PCSC-lite daemon (pcscd) is installed and is running.

If your Touchatag or ACR122 device fails being detected by PCSC-lite daemon (pcsc_scan doesn't see anything) then try removing the bogus firmware detection of libccid: edit libccid_Info.plist configuration file (usually /etc/libccid_Info.plist) and locate <key>ifdDriverOptions</key>, turn <string>0x0000</string> value into 0x0004 to allow bogus devices and restart pcscd daemon.

ACR122:

Using an ACR122 device with libnfc and without tag (e.g. to use NFCIP modes or card emulation) needs yet another PCSC-lite tweak: You need to allow usage of CCID Exchange command. To do this, edit libccid_Info.plist configuration file (usually /etc/libccid_Info.plist) and locate <key>ifdDriverOptions</key>, turn <string>0x0000</string> value into 0x0001 to allow CCID exchange or 0x0005 to allow CCID exchange and bogus devices (cf previous remark) and restart pcscd daemon.

Warning: if you use ACS CCID drivers (acsccid), configuration file is located in something like: /usr/lib/pcsc/drivers/ifd-acsccid.bundle/Contents/Info.plist

SCL3711:

Libnfc cannot be used concurrently with the PCSC proprietary driver of SCL3711. Two possible solutions:

  • Either you don't install SCL3711 driver at all
  • Or you stop the PCSC daemon when you want to use libnfc-based tools

PN533 USB device on Linux >= 3.1:

Since Linux kernel version 3.1, a few kernel-modules must not be loaded in order to use libnfc : "nfc", "pn533" and "pn533_usb". To prevent kernel from loading automatically these modules, you can blacklist them in a modprobe conf file. This file is provided within libnfc archive:

sudo cp contrib/linux/blacklist-libnfc.conf /etc/modprobe.d/blacklist-libnfc.conf

FEITIAN bR500 and R502:

Libnfc can work with PCSC proprietary driver of bR500 and R502, which is already available on most Linux setups. To activate the PCSC support: ./configure --with-drivers=pcsc. Readers known to work:

  • Feitian bR500
  • Feitian R502 Dual interface reader
  • Feitian R502 CL(Contactless) reader

These readers are support by CCID since v1.4.25, make sure your CCID driver version higher or equal to 1.4.25.

On MacOS, you can check your CCID version with the following command, and if required, you can install latest CCID driver from https://github.com/martinpaljak/osx-ccid-installer/releases

grep -A 1 CFBundleShortVersionString /usr/local/libexec/SmartCardServices/drivers/ifd-ccid.bundle/Contents/Info.plist

On Linux, you can check your CCID version with the following command, and if required, you can install latest CCID driver from https://ccid.apdu.fr/

grep -A 1 CFBundleShortVersionString /usr/lib/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist

Proprietary Notes

FeliCa is a registered trademark of the Sony Corporation. MIFARE is a trademark of NXP Semiconductors. Jewel Topaz is a trademark of Innovision Research & Technology. All other trademarks are the property of their respective owners.

Comments
  • Unable to claim USB interface (Permission denied)

    Unable to claim USB interface (Permission denied)

    i run nfc-list on terminal Mac Yosemite But the error appears:

    nfc-list uses libnfc 1.7.1
    error   libnfc.driver.acr122_usb    Unable to claim USB interface (Permission denied)
    

    Please guide me to solve this problem.

    opened by syarizat 55
  • Unable to set alternate setting on USB interface (Connection timed out)

    Unable to set alternate setting on USB interface (Connection timed out)

    Hello,

    I get the following message using my ACR_122U

    $ sudo nfc-scan-device -v
    nfc-scan-device uses libnfc 1.7.1
    1 NFC device(s) found:
    error   libnfc.driver.acr122_usb        Unable to set alternate setting on USB interface (Connection timed out)
    nfc_open failed for acr122_usb:003:005
    

    Is someone familiar with this problem ? Any idea of what i can look for to troubleshoot this ?

    opened by alexandredubois 37
  • nfc-mfclassic doesn't work when used with mifare 4k emulated

    nfc-mfclassic doesn't work when used with mifare 4k emulated

    
    
    I have the following tools:
    - Feig Elettronics M02 reader e software tool.
    - Reader ACR122U102 - PN532,
    - Nokia 6212 with Mifare 4k,
    - MIFARE 4k (emulated)
    - Another Mifare 1k.
    
    If I use the Feig and proprietary software for windows, I get the following 
    dump:
    
    Nokia 6212 phone - sector 0:
    6b a0 22 02 .......... serial manufactor ......... etc ...
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    FF FF FF FF FF FF FF 07 80 69 00 00 00 00 00 00
    .....
    MIFARE 4K - sector 0:
    B0 57 34 11 .......... serial manufactor ......... etc. ..
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    FF FF FF FF FF FF FF 07 80 69 00 00 00 00 00 00
    .....
    MIFARE 1K - sector 0:
    c4 e3 06 0c .......... serial manufactor ......... etc. .....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    FF FF FF FF FF FF FF 07 80 69 00 00 00 00 00 00
    
    work well.
    
    If  use nfc-mfclassic, micmd  or another tools with libnfc and PN532:
    
    Nokia 6212 phone - sector 0:
    FF FF FF FF FF FF 6b a0 22 02 FF FF FF FF FF FF
    FF FF FF FF FF FF 6b a0 22 02 FF FF FF FF FF FF
    FF FF FF FF FF FF 6b a0 22 02 FF FF FF FF FF FF
    FF FF FF FF FF FF 6b a0 22 02 FF FF FF FF FF FF
    ..... for all areas ....   note UID ! 
    
    MIFARE 4K emulated - sector 0:
    FF FF FF FF FF FF B0 57 34 11 FF FF FF FF FF FF
    FF FF FF FF FF FF B0 57 34 11 FF FF FF FF FF FF
    FF FF FF FF FF FF B0 57 34 11 FF FF FF FF FF FF
    FF FF FF FF FF FF B0 57 34 11 FF FF FF FF FF FF
    ..... for all areas .... note UID !
    
    MIFARE 1K - sector 0:
    c4 e3 06 0c .......... serial manufactor ......... etc. .....
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    FF FF FF FF FF FF FF 07 80 69 00 00 00 00 00 00
    .... ok.
    
    libnfc correctly read the Mifare 1k,  but the 4k filled with FF and the UID. 
    This seems very strange .... libnfc Bug?
    
    

    Original issue reported on code.google.com by [email protected] on 11 Aug 2010 at 8:39

    opened by GoogleCodeExporter 32
  • acr122_usb: touchatag 'Too small reply'

    acr122_usb: touchatag 'Too small reply'

    Using nfc-list:
    
    info    libnfc.config   Unable to open file: /etc/nfc/libnfc.conf
    debug   libnfc.config   Unable to open directory: /etc/nfc/devices.d
    unkown  libnfc.general  log_level is set to 3
    debug   libnfc.general  allow_autoscan is set to true
    debug   libnfc.general  allow_intrusive_scan is set to false
    debug   libnfc.general  0 device(s) defined by user
    nfc-list uses libnfc libnfc-1.6.0-rc1-184-gff3d8f7
    debug   libnfc.general  0 device(s) found using pn53x_usb driver
    debug   libnfc.driver.acr122_usb    device found: Bus 003 Device 002 Name ACS ACR122
    debug   libnfc.general  1 device(s) found using acr122_usb driver
    debug   libnfc.driver.acr122_usb    3 element(s) have been decoded from 
    "acr122_usb:003:002"
    debug   libnfc.driver.acr122_usb    TX: 62  00  00  00  00  00  00  01  00  00  
    debug   libnfc.driver.acr122_usb    RX: 80  13  00  00  00  00  00  00  00  00  3b  
    be  95  00  00  41  03  00  00  00  00  00  00  00  00  00  02  90  00  
    debug   libnfc.driver.acr122_usb    ACR122 PICC Operating Parameters
    debug   libnfc.driver.acr122_usb    TX: 6b  05  00  00  00  00  00  00  00  00  ff  
    00  51  00  00  
    debug   libnfc.driver.acr122_usb    RX: 83  00  00  00  00  00  00  40  05  00  
    debug   libnfc.chip.pn53x   GetFirmwareVersion
    debug   libnfc.driver.acr122_usb    TX: 6b  07  00  00  00  00  00  00  00  00  ff  
    00  00  00  02  d4  02  
    debug   libnfc.driver.acr122_usb    RX: 83  00  00  00  00  00  00  40  07  00  
    error   libnfc.driver.acr122_usb    Too small reply
    debug   libnfc.general  Unable to open "acr122_usb:003:002".
    nfc-list: ERROR nfc-list.c:132
    nfc-list:     Unable to open NFC device: acr122_usb:003:002
    
    Seems like a duplicate of bug #201 but I'm using the latest from git, so it 
    should be fixed. Using the acr122_pcsc driver works. 
    
    

    Original issue reported on code.google.com by [email protected] on 9 Jan 2013 at 12:31

    opened by GoogleCodeExporter 29
  • Format/Overwrite of mifare classic

    Format/Overwrite of mifare classic "fails"

    I cloned a mifare classic card onto an empty card.Now everytime I write to this 
    card I get a error like this:
    [code]failed to write trailer block 3 
    xnfc_initiator_transceive_bytes: Timeout[/code]
    I tried to overwrite the card with the empty dump I got from 
    http://www.libnfc.org/_media/libnfc/documentation/empty_mfd_example.zip
    but it went like this:
    [code]thomas@pluto ~ $ nfc-mfclassic w b Downloads/14f1f9d7.mfd clean
    Connected to NFC reader: ACS ACR122U 00 00 / ACR122U103 - PN532 v1.6 (0x07)
    Found MIFARE Classic card:
        ATQA (SENS_RES): 00  04  
           UID (NFCID1): ec  c3  66  d3  
          SAK (SEL_RES): 08  
    Guessing size: seems to be a 1024-byte card
    Writing 64 blocks |nfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 3 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 7 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 11 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 15 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 19 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 23 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 27 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 31 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 35 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 39 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 43 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 47 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 51 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 55 
    xnfc_initiator_transceive_bytes: Timeout
    failed to write trailer block 59 
    x.|
    Done, 4 of 64 blocks written.
    thomas@pluto ~ $ nfc-mfclassic w b tim-100 Downloads/14f1f9d7.mfd 
    Connected to NFC reader: ACS ACR122U 00 00 / ACR122U103 - PN532 v1.6 (0x07)
    Expected MIFARE Classic card with UID starting as: 14f1f9d7
    Found MIFARE Classic card:
        ATQA (SENS_RES): 00  04  
           UID (NFCID1): ec  c3  66  d3  
          SAK (SEL_RES): 08  
    Guessing size: seems to be a 1024-byte card
    Writing 64 blocks |nfc_initiator_transceive_bytes: Mifare Authentication Error
    !
    Error: authentication failed for block 00
    thomas@pluto ~ $ nfc-mfclassic w b tim-100
    Connected to NFC reader: ACS ACR122U 00 00 / ACR122U103 - PN532 v1.6 (0x07)
    Found MIFARE Classic card:
        ATQA (SENS_RES): 00  04  
           UID (NFCID1): ec  c3  66  d3  
          SAK (SEL_RES): 08  
    Guessing size: seems to be a 1024-byte card
    Writing 64 blocks |nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    nfc_initiator_transceive_bytes: Mifare Authentication Error
    !
    Error: authentication failed for block 00
    thomas@pluto ~ $ mifare-classic-format 
    Found Mifare Classic 1k with UID ecc366d3. Format [yN] y
    Formatting 16 sectors [.mifare-classic-format: No known authentication key for 
    sector 0
    [/code]
    I also added the keys that were used to write to the card to the default keys 
    of mifare-classic-format.
    I'm using a touchatag pad 072f:2200 with the acsccid 1.0.2 driver and libnfc 
    1.5.1.
    

    Original issue reported on code.google.com by [email protected] on 24 Nov 2011 at 6:10

    enhancement 
    opened by GoogleCodeExporter 26
  • PN532 UART device is not getting connected

    PN532 UART device is not getting connected

    What steps will reproduce the problem?
    1.nfc-list
    2.
    3.
    
    What is the expected output? What do you see instead?
    device id, tag id
    
    What version of the product are you using? On what operating system?
    1.5.1
    
    Please provide any additional information below.
    
    hi when i tried to run libnfc in my PC its not detected. its showing that 
    device is not found
    i used nfc-list
    
    
    kserver@kserver:/media/kdata/packages/libnfc-1.5.1$ nfc-list 
    nfc-list uses libnfc 1.5.1 (r1175)
    No NFC device found.
    
    my pn532_uart driver is enabled and i am using it only. is it possible to give 
    the target device file with the command
    
    i ve used the below command also
    
    ./configure --with-drivers=pn532_uart --enable-serial-autoprobe
    
    but its not getting detected
    showing the same error
    

    Original issue reported on code.google.com by [email protected] on 18 Oct 2011 at 3:18

    opened by GoogleCodeExporter 22
  • PN532 UART support broken/unstable

    PN532 UART support broken/unstable

    What steps will reproduce the problem?
    1. Add a default PN532 NXP's demo-board.
    2. Compile libnfc with option "--with-drivers=pn532_uart 
    --enable-serial-autoprobe".
    3. Put a tag on the antenna and launch "nfc-list".
    
    What is the expected output? What do you see instead?
    
    This is the output of nfc-list execution:
    
    Connected to NFC reader: PN532 (/dev/ttyUSB0) - PN532 v1.6 (0x07)
    
     TX: 00  00  ff  04  fc  d4  4a  01  00  e1  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  03  fd  d5  4b  00  e0  00  
     RX: 00  00  ff  03  fd  d5  4b  00  e0  00  
     TX: 00  00  ff  09  f7  d4  4a  01  01  00  ff  ff  00  00  e2  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  03  fd  d5  4b  00  e0  00  
     RX: 00  00  ff  03  fd  d5  4b  00  e0  00  
     TX: 00  00  ff  09  f7  d4  4a  01  02  00  ff  ff  00  00  e1  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  03  fd  d5  4b  00  e0  00  
     RX: 00  00  ff  03  fd  d5  4b  00  e0  00  
     TX: 00  00  ff  05  fb  d4  4a  01  03  00  de  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  03  fd  d5  4b  00  e0  00  
     RX: 00  00  ff  03  fd  d5  4b  00  e0  00  
     TX: 00  00  ff  04  fc  d4  4a  01  04  dd  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  03  fd  d5  4b  00  e0  00  
     RX: 00  00  ff  03  fd  d5  4b  00  e0  00  
     TX: 00  00  ff  03  fd  d4  44  00  e8  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  03  fd  d5  45  00  e6  00  
     RX: 00  00  ff  03  fd  d5  45  00  e6  00  
     TX: 00  00  ff  04  fc  d4  32  01  00  f9  00  
     RX: 00  00  ff  00  ff  00  00  00  ff  02  fe  d5  33  f8  00  
     RX: 00  00  ff  02  fe  d5  33  f8  00 
    
    So no tag found.
    
    

    Original issue reported on code.google.com by emanuele.bertoldi on 11 Jun 2010 at 3:55

    opened by GoogleCodeExporter 21
  • Fix build on Windows (pn53x_transceive() usability in examples)

    Fix build on Windows (pn53x_transceive() usability in examples)

    Initial report by @JONIDi12P:

    undefined reference to pn53x_transceive

    i got error of undefined reference to pn53x_transceive' on file https://github.com/nfc-tools/libnfc/blob/master/examples/pn53x-diagnose.c

    on line 106+117

    but i saw here https://github.com/nfc-tools/libnfc/blob/master/libnfc/chips/pn53x.h the header of function pn53x_transceive

    that not depend on windows/linux thanks

    opened by JONIDi12P 20
  • tricky detection of touchatag under MacOS

    tricky detection of touchatag under MacOS

    What steps will reproduce the problem?
    
    1. Plug in a touchatag (real touchatag)
    2. Run nfc-list
    
    What is the expected output? What do you see instead?
    
    Expected output: "Connected to NFC device: ACS ACR 38U-CCID 00 00 / ACR122U102 
    - PN532 v1.4 (0x07)"
    
    What I see instead: "nfc-list: INFO: No device found."
    
    What version of the product are you using? On what operating system?
    
    Mac OS X 10.6.4
    PCSC Framework version 1.4.0 (stock one that comes with OS X 10.6)
    libnfc 1.3.9 (r794)
    
    Please provide any additional information below.
    
    The workaround to the above problem is to plug in touchatag without card, kill 
    pcscd, unplug touchatag, place card on touchatag, then plug touchatag back in 
    (with card on top), which will open pcscd again. Running nfc-list again will 
    show the expected output above.
    
    Note this does not happen in Fedora with same version. Also, I do not think 
    it's a problem with pcsc-lite, because even when nfc-list shows no readers, 
    pcsctest will show "Reader 01: ACS ACR38U-CCID 00 00".
    

    Original issue reported on code.google.com by [email protected] on 3 Nov 2010 at 4:04

    opened by GoogleCodeExporter 20
  • Remove binary blob in repository

    Remove binary blob in repository

    Source repository contains win32 subdirectory with some compiled objects.
    

    Original issue reported on code.google.com by [email protected] on 8 Sep 2009 at 8:00

    opened by GoogleCodeExporter 19
  • error: conflicting types for 'uint8_t', 'uint16_t'

    error: conflicting types for 'uint8_t', 'uint16_t'

    What steps will reproduce the problem?
    1.compiling libnfc for ltib using scbuild
    2.
    3.
    
    What is the expected output? What do you see instead?
    it should be compiled
    error: conflicting types for 'uint8_t', 'uint16_t'
    
    What version of the product are you using? On what operating system?
    its libnfc 1.5 with linux and ARM(iMX257)
    
    Please provide any additional information below.
    
    

    Original issue reported on code.google.com by [email protected] on 17 Oct 2011 at 12:16

    opened by GoogleCodeExporter 17
  • diagnose example code fix

    diagnose example code fix

    line 67 of pn53x-diagnose.c: const uint8_t pncmd_diagnose_communication_line_test[] = { Diagnose, 0x00, 0x06, 'l', 'i', 'b', 'n', 'f', 'c' }; should be (if just testing reply or communication is ok): const uint8_t pncmd_diagnose_communication_line_test[] = { Diagnose, 0x00, 0x00, 'l', 'i', 'b', 'n', 'f', 'c' };

    pn532 datasheet informs NumTst code 0x00 is reply test command , 0x06 is card presence test cmd. Example code checks if string libnfc is echoed back...

    opened by jussipo 0
  • Libnfc6 force using

    Libnfc6 force using "f" is not available

    I read to use at the end of the command " "f" Force using the keyfile KEYS even if UID does not match (optional)." I use in libnfc5 and is ok, but libnfc6 does not recognize "f" it in Debian11.. And the problem is that when you install libnfc5, Debian 11 updates you to libnfc6 by the dependences Do you know any solution? Thnx u so much!!

    opened by Gnu-Hack 0
  • Driver for MRFC522 ic

    Driver for MRFC522 ic

    Hello! Is a driver for MRFC522 IC from NXP desirable? I'm an embedded systems engineer and I'm willing to implement the missing bits if anyone is willing to provide some guidance.

    The current setup I have is an Arduino Nano connected to a RC522 module (wich in turn, uses a MRFC522 IC). Most likely I'll have to implement some sort of pass-through interface from the Arduino to the module but that does not seems to be a big problem.

    Thanks in advance.

    opened by danielfranzini-dock 1
  • "nfc-list: ERROR: Unable to open NFC device" on macOS Monterey with Identiv uTrust 3700 F CL Reader

    Hi everyone.

    I am trying to interface my uTrust 3700 F CL Reader in macOS Monterey, but it is not going well.

    % sudo nfc-list
    nfc-list uses libnfc 1.8.0
    nfc-list: ERROR: Unable to open NFC device: pcsc:Identiv uTrust 3700 F CL Reader
    

    I have also tried to disable idfreader:

    sudo launchctl remove com.apple.ifdreader
    sudo launchctl stop com.apple.ifdreader
    

    And even tried to install pcsc-lite.

    Additional info:

    % brew list libusb              
    /usr/local/Cellar/libusb/1.0.26/include/libusb-1.0/libusb.h
    /usr/local/Cellar/libusb/1.0.26/lib/libusb-1.0.0.dylib
    /usr/local/Cellar/libusb/1.0.26/lib/pkgconfig/libusb-1.0.pc
    /usr/local/Cellar/libusb/1.0.26/lib/ (2 other files)
    /usr/local/Cellar/libusb/1.0.26/share/libusb/ (9 files)
    
    % brew list nfcutils
    /usr/local/Cellar/nfcutils/0.3.2_1/bin/lsnfc
    
    opened by maziarzamani 0
  • BUG in nfc_initiator_select_passive_target

    BUG in nfc_initiator_select_passive_target

    int
    nfc_initiator_select_passive_target(nfc_device *pnd,
                                        const nfc_modulation nm,
                                        const uint8_t *pbtInitData, const size_t szInitData,
                                        nfc_target *pnt)
    {
      uint8_t *abtInit = NULL;
      uint8_t maxAbt = MAX(12, szInitData);
      uint8_t *abtTmpInit = malloc(sizeof(uint8_t) * maxAbt);
      size_t  szInit = 0;
      int res;
      if ((res = nfc_device_validate_modulation(pnd, N_INITIATOR, &nm)) != NFC_SUCCESS) {
        free(abtTmpInit);
        return res;
      }
      if (szInitData == 0) {
        // Provide default values, if any
        prepare_initiator_data(nm, &abtInit, &szInit);
        free(abtTmpInit);
      } else if (nm.nmt == NMT_ISO14443A) {
        abtInit = abtTmpInit;
        iso14443_cascade_uid(pbtInitData, szInitData, abtInit, &szInit);
      } else {
        abtInit = abtTmpInit;
        memcpy(abtInit, pbtInitData, szInitData);
        free(abtTmpInit);
        szInit = szInitData;
      }
      HAL(initiator_select_passive_target, pnd, nm, abtInit, szInit, pnt);
    
      free(abtTmpInit);
    }
    

    In this part:

        abtInit = abtTmpInit;
        memcpy(abtInit, pbtInitData, szInitData);
        free(abtTmpInit);
        szInit = szInitData;
    

    abtInit is abtTmpInit, will be used after freed.

    opened by versaloon 2
Releases(libnfc-1.8.0)
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.

Microsoft 7.2k Jan 2, 2023
A cross platform C99 library to get cpu features at runtime.

cpu_features A cross-platform C library to retrieve CPU features (such as available instructions) at runtime. Table of Contents Design Rationale Code

Google 2.2k Dec 22, 2022
A cross-platform protocol library to communicate with iOS devices

libimobiledevice A library to communicate with services on iOS devices using native protocols. Features libimobiledevice is a cross-platform software

libimobiledevice 5.4k Dec 30, 2022
LibOS is a modern C++17 library that makes OS-specific features cross-platform.

LibOS is a modern C++17 library that makes OS-specific features cross-platform. Ever tried to get Windows version after Windows 8? Or to send ke

Gavrilikhin Daniil 27 Sep 13, 2022
WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.

WAFer WAFer is a C language-based ultra-light scalable server-side web applications framework. Think node.js for C programmers. Because it's written i

Riolet Corporation 693 Dec 6, 2022
PRK is a keyboard firmware platform in PicoRuby

PRK is a keyboard firmware written and configured in PicoRuby which is an alternative mruby implementation targeting on one-chip microcontroller.

PicoRuby 393 Jan 1, 2023
A cross-platform OpenXR capabilities explorer and runtime switcher with a CLI and GUI.

OpenXR Explorer OpenXR Explorer is a handy debug tool for OpenXR developers. It allows for easy switching between OpenXR runtimes, shows lists of the

Nick Klingensmith 154 Dec 13, 2022
Isocline is a pure C library that can be used as an alternative to the GNU readline library

Isocline: a portable readline alternative. Isocline is a pure C library that can be used as an alternative to the GNU readline library (latest release

Daan 136 Dec 30, 2022
A linux library to get the file path of the currently running shared library. Emulates use of Win32 GetModuleHandleEx/GetModuleFilename.

whereami A linux library to get the file path of the currently running shared library. Emulates use of Win32 GetModuleHandleEx/GetModuleFilename. usag

Blackle Morisanchetto 3 Sep 24, 2022
Command-line arguments parsing library.

argparse argparse - A command line arguments parsing library in C (compatible with C++). Description This module is inspired by parse-options.c (git)

Yecheng Fu 533 Dec 26, 2022
Library that solves the exact cover problem using Dancing Links, also known as DLX.

The DLX Library The DLX library The DLX library solves instances of the exact cover problem, using Dancing Links (Knuth’s Algorithm X). Also included

Ben Lynn 44 Dec 18, 2022
Standards compliant, fast, secure markdown processing library in C

Hoedown Hoedown is a revived fork of Sundown, the Markdown parser based on the original code of the Upskirt library by Natacha Porté. Features Fully s

Hoedown 923 Dec 27, 2022
CommonMark parsing and rendering library and program in C

cmark cmark is the C reference implementation of CommonMark, a rationalized version of Markdown syntax with a spec. (For the JavaScript reference impl

CommonMark 1.4k Jan 4, 2023
A C library for parsing/normalizing street addresses around the world. Powered by statistical NLP and open geo data.

libpostal: international street address NLP libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP a

openvenues 3.6k Dec 27, 2022
Your friendly e-mail address validation library.

libvldmail Your friendly e-mail address validation library. Why? Did you know that parentheses, spaces and - according to the RFC 6531 document - emoj

Cthulhux 47 Sep 28, 2022
A protocol buffers library for C

PBC PBC is a google protocol buffers library for C without code generation. Quick Example package tutorial; message Person { required string name =

云风 1.6k Dec 28, 2022
An easy-to-use C library for displaying text progress bars.

What is this thing? progressbar is a C-class (it's a convention, dammit) for displaying attractive progress bars on the command line. It's heavily inf

Trevor Fountain 440 Dec 27, 2022
Library for writing text-based user interfaces

IMPORTANT This library is no longer maintained. It's pretty small if you have a big project that relies on it, just maintain it yourself. Or look for

null 1.9k Dec 22, 2022
Locate the current executable and the current module/library on the file system

Where Am I? A drop-in two files library to locate the current executable and the current module on the file system. Supported platforms: Windows Linux

Gregory Pakosz 382 Dec 27, 2022