by bjornfelle » Mon Jan 04, 2021 9:59 pm
I've just added a Waveshare NFC hat to a Pi 2 running ALARM. I installed ALARM fresh, installed base-devel and wiringpi, and compiled the sample C code to read the UID from an NFC tag. If there is a tag on the reader when I run the compiled programme, it will output the UID of the tag. If there is no tag present, the programme should stay within a while loop until a tag is presented, but the programme freezes on the line which attempts to read the tag. If I CTRL-C and then re-run the programme I get an error "Failed to detect the PN532". If I reboot and run the programme with no tag present, it will cycle through the loop once, and then get stuck again on the subsequent check so never detects the tag once presented. I have installed a Raspberry Pi OS image and compiled the exact same code, and it works perfectly. Any ideas? Thanks in advance!