Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Linux how to install libnfc and open serial port PN532

Shulou Source: shulou.com Published: 2022-06-02 01:46:31 10月02日 Update

This article introduces linux how to install libnfc and open the serial port PN532, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Hardware preparation:

USB to serial port

4-pin Dupang line

PN532 module

One IC card (e. G. access card, meal card, etc.)

Software preparation:

One Ubuntu physical machine

Access to the Internet

1. Connect PN532 to USB through serial port and place an IC card near the PN532 module.

2. Install libnfc:

Chunli@ubuntu:~$ sudo apt-get install libusb-dev chunli@ubuntu:~$ wget https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.7.1/libnfc-1.7.1.tar.bz2chunli@ubuntu:~$ tar xf libnfc-1.7.1.tar.bz2 chunli@ubuntu:~$ cd libnfc-1.7.1/chunli@ubuntu:~/libnfc-1.7.1 $. / configure-- prefix=$ {HOME} / NFC & & make & & make installchunli@ Ubuntu:~/libnfc-1.7.1$ mkdir-p ${HOME} / NFC/etc/nfc/chunli@ubuntu:~/libnfc-1.7.1$ vim ${HOME} / NFC/etc/nfc/libnfc.confdevice.name = "microBuilder.eu" device.connstring = "pn532_uart:/dev/ttyUSB0" chunli@ubuntu:~/libnfc-1.7.1 $

3. Check the connection status between Pn532 and the host:

Chunli@ubuntu:~/libnfc-1.7.1$ sudo ${HOME} / NFC/bin/nfc-list/home/chunli/NFC/bin/nfc-list uses libnfc 1.7.1NFC device: pn532_uart:/dev/ttyUSB0 opened1 ISO14443A passive target (s) found:ISO/IEC 14443A (106kbps) target: ATQA (SENS_RES): 00 04 UID (NFCID1): 7e d592 90 SAK (SEL_RES): 08 chunli@ubuntu:~/libnfc-1.7.1$ driver is installed. On linux how to install libnfc and open the serial port PN532 to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Serial port content more modules preparation help yes host Internet interests guys buddies articles physics status knowledge hardware articles software access control Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Information Docker Shulou Tech Info vpn