美文网首页
build libnfc and detect nfc faci

build libnfc and detect nfc faci

作者: 413x | 来源:发表于2018-09-21 10:59 被阅读0次

    build libnfc and detect nfc facility

    build libnfc

    1. clone from github
    ➜  utils git:(master) ✗  git clone https://github.com/nfc-tools/libnfc.git
    
    1. config and make
     ➜  utils git:(master) ✗ autoreconf -vis
     ➜  utils git:(master) ✗ ./configure --prefix=/usr --sysconfdir=/etc
     ➜  utils git:(master) ✗  make
     ➜  utils git:(master) ✗  sudo make install
    

    detect nfc facility

    ➜  utils git:(master) ✗  sudo nfc-list #will not find it
    ➜  utils git:(master) ✗  sudo LIBNFC_LOG_LEVEL=3 nfc-list 
    info    libnfc.config   Unable to open file: /usr/local/etc/nfc/libnfc.conf
    debug   libnfc.config   Unable to open directory: /usr/local/etc/nfc/devices.d
    debug   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 true
    debug   libnfc.general  0 device(s) defined by user
    nfc-scan-device uses libnfc libnfc-1.7.1-199-ga9af192
    debug   libnfc.driver.arygon    Trying to find ARYGON device on serial port: /dev/ttyUSB0 at 9600 baud.
    debug   libnfc.bus.uart Serial port speed requested to be set to 9600 baud.
    ...
    

    so I create /usr/local/etc/nfc/libnfc.conf

    device.name = "my-nfc-chip"
    device.connstring = "pn532_uart:/dev/ttyUSB0"
    

    then I use nfc-list

    ➜  utils git:(master) ✗ sudo nfc-list                          
    nfc-list uses libnfc libnfc-1.7.1-199-ga9af192
    NFC device: my-nfc-chip opened
    

    相关文章

      网友评论

          本文标题:build libnfc and detect nfc faci

          本文链接:https://www.haomeiwen.com/subject/eolanftx.html