linux - 是否可以在 Raspbian 操作系统上安装 pcsc-lite 1.8.13?

标签 linux debian raspberry-pi raspbian pcsc

我正在开发一个 Raspberry Pi 项目。我正在尝试安装 driver package适用于 ACR1251U-A1 NFC 标签。

此软件包需要首先安装 pcsc-lite 软件包。但据我在互联网上搜索后了解到,pcsc-lite 1.8.13 不适用于 Raspbian OS。

我的主管坚持认为 pcsc-lite 1.8.13 应该安装在 Raspberry Pi 上才能使 NFC 标签正常工作。

可以在 Raspbian 上安装它吗?如果是这样,你能帮我怎么做吗?

最佳答案

我能够安装 pcscd 守护程序并使用 pcsc-lite wrapper in NodeJS在 Raspbian(Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux)上使用 Raspberry Pi B+ 和 Raspberry Pi 2。

这里是 full guide of mine project on GitHub 中的需求安装摘录:

  1. Install PC/SC and libnfc (references: nfc-tools, libnfc):

    sudo apt-get install pcscd libusb-dev libpcsclite1 libpcsclite-dev dh-autoreconf
    
    cd /opt/
    sudo wget https://github.com/nfc-tools/libnfc/archive/libnfc-1.7.1.zip
    sudo unzip libnfc-1.7.1.zip
    cd libnfc-libnfc-1.7.1/
    sudo autoreconf -vis
    sudo ./configure --with-drivers=all
    sudo make
    sudo make install
    

    Additionaly, you may need to grant permissions to your user to drive the device. Under GNU/Linux systems, if you use udev, you could use the provided udev rules. e.g. under Debian: sudo cp /opt/libnfc-libnfc-1.7.1/contrib/udev/42-pn53x.rules /lib/udev/rules.d/

  2. Make sure the NFC reader is properly recognized:

    sudo nfc-list
    
    1. To fix: error while loading shared libraries: libnfc.so.4: cannot open shared object file: No such file or directory (reference)

      echo '/usr/local/lib' | sudo tee -a /etc/ld.so.conf.d/usr-local-lib.conf && sudo ldconfig
      
    2. If you have kernel version > 3.5, probably pcscd and also nfc-list will report this error: Unable to claim USB interface (Device or resource busy) due to the automatic load of pn533 driver.

      To read the pcscd dameon output you can run it using: pcscd -f -d

      1. Check which kernel version is installed: uname -a
      2. Blacklist pn533 and nfc drivers (references: Arch Linux wiki Touchatag RFID Reader, nfc-tools forum):

        sudo nano /etc/modprobe.d/blacklist-libnfc.conf
        

        Add the following lines:

        blacklist pn533 blacklist nfc

      3. Disable kernel modules:

        modprobe -r pn533 nfc
        
      4. Restart the pcscd daemon: sudo service pcscd restart

关于linux - 是否可以在 Raspbian 操作系统上安装 pcsc-lite 1.8.13?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29834202/

相关文章:

linux - 如何在设备启动时在树莓派上自动执行程序?

c - 尝试写入 mtd 设备时获取 EINVAL

php - 在 Debian 中将 PHP 脚本作为守护进程运行

Debian Jessie 在 CTRL+ALT+DEL 上关闭

linux - Debian 启动没有桌面的 Qt GUI 应用程序

python - 使用串口通过 Arduino 将多个值发送到 Raspberry

c - 写数组到串口c

linux - 通过buildroot安装qt-mobility

json - Ajax 调用以检索 json 文件数据

java - 在 Java 中执行 Linux 命令