Getting the PN544 NFC chip working on Ubuntu involves installing the necessary drivers and configuring the system to recognize the device. Here’s a step-by-step guide:
1. Check if the PN544 is Detected
First, verify if your system detects the NFC hardware:
lsusb | grep -i nfc
or
dmesg | grep -i nfc
If the device is listed, proceed to the next steps.
2. Install Required Packages
Install the necessary NFC tools and libraries:
sudo apt update
sudo apt install libnfc-dev libnfc-examples nfc-tools pcscd libpcsclite-dev
3. Install the PN544 Driver
The PN544 is supported by the libnfc library, but you may need to manually configure it.
Option A: Use libnfc with PN544 Support
-
Check if libnfc already supports PN544:
nfc-list
If the device is listed, it should work.
-
If not, you may need to compile libnfc from source with PN544 support:
sudo apt install git autoconf libtool libusb-dev
git clone https://github.com/nfc-tools/libnfc.git
cd libnfc
autoreconf -vis
./configure --with-drivers=pn544
make
sudo make install
Option B: Use pcsc-lite (Alternative)
If libnfc doesn’t work, try using pcsc-lite:
sudo apt install pcscd pcsc-tools
sudo systemctl restart pcscd
Check if the device is detected:
pcsc_scan
4. Configure UDEV Rules (If Needed)
If the device is not automatically detected, create a udev rule:
sudo nano /etc/udev/rules.d/99-pn544.rules
Add the following (adjust idVendor and idProduct based on lsusb):
SUBSYSTEM=="usb", ATTR{idVendor}=="04cc", ATTR{idProduct}=="2533", MODE="0666", GROUP="plugdev"
Reload udev rules:
sudo udevadm control --reload-rules
sudo udevadm trigger
5. Test NFC Functionality
Use nfc-list to check if the device is recognized:
nfc-list
If successful, you should see your PN544 device listed.
You can also try reading an NFC tag:
nfc-mfclassic r a dump.mfd
6. Troubleshooting
Conclusion
If everything is set up correctly, your PN544 NFC should now work on Ubuntu. If issues persist, check for firmware updates or additional driver patches.