# Rasp Pi 3a+ not detecting NFC hat pn532

**URL:** <https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376>\
**Category:** Uncategorized\
**Created:** [29 September 2025 06:12 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376 "2025-09-29T06:12:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Renee294992](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Renee294992](https://forum.core-electronics.com.au/u/Renee294992)\
**Post date:** [29 September 2025 06:12 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/1 "2025-09-29T06:12:41Z")

</div>

Hi there,

I have been trying to get a 3a+ to detect a pn532 Hat. I have tested the UART, I2C and SPI, and could not detect any. I have gone through troubleshooting with a range of different code and even attempted a VE. Wondering if anyone has had this trouble / managed to get these to connect?

Cheers, Ren

---

<div class="post-metadata">

**Author:** ![ahsrab292840](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@ahsrab292840](https://forum.core-electronics.com.au/u/ahsrab292840)\
**Post date:** [29 September 2025 17:51 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/2 "2025-09-29T17:51:54Z")

</div>

> [@Renee294992](#):
>
> I have been trying to get a 3a+ to detect a pn532 Hat. I have tested the UART, I2C and SPI, and could not detect any. I have gone through troubleshooting with a range of different code and even attempted a VE. Wondering if anyone has had this trouble / managed to get these to connect?

Some PN532 boards **default to UART** even if you think you’re using I²C/SPI. Always set the DIP/jumper explicitly.  
If `i2cdetect` shows nothing, but wiring + config are right, your board might be **stuck in HSU (UART) mode**.

---

<div class="post-metadata">

**Author:** ![Renee294992](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Renee294992](https://forum.core-electronics.com.au/u/Renee294992)\
**Post date:** [29 September 2025 22:45 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/3 "2025-09-29T22:45:53Z")

</div>

Thanks, I ended up defaulting to set it up on UART but still could not get it to detect, have you managed to get these to work before?

---

<div class="post-metadata">

**Author:** ![Jane](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jane/32/12622_2.png) [@Jane](https://forum.core-electronics.com.au/u/Jane)\
**Post date:** [3 October 2025 03:06 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/4 "2025-10-03T03:06:09Z")

</div>

Hi @Renee294992,

I am very sorry for the delay in my response. There has been a lot of sickness in the office this past week. However, I can say that ater experimenting some more with the Waveshare code, I was able to get UID’s of NFC cards read from PN532 connected to a Pi 3 A+ via UART, including from my phone’s own NFC chip.

Steps to replicate:

1. Place device in UART mode likeso:  

2. Do the below steps:  
`sudo raspi-config`  
Set Interfacing Options \> Serial \> Yes

3. Do each of the below commands in the BASH shell:

```auto
sudo apt-get install p7zip-full python3-lgpio
wget https://files.waveshare.com/upload/6/66/Pn532-nfc-hat-code.7z
7z x Pn532-nfc-hat-code.7z -r -o./Pn532-nfc-hat-code
sudo chmod 777 -R Pn532-nfc-hat-code/

```

1. cd into /PN532-nfc-hat-code/raspberrypi/python
2. Edit example\_get\_uid.py so that the SPI and I2C sections are hashed out so that PN532 is recognised as UART.
3. Run `python3 example_get_uid.py`
4. Read a NFC tag.

EDIT: All the examples worked after running example\_get\_uid.py first. The system must need something in its code to initialise.

---

<div class="post-metadata">

**Author:** ![Renee294992](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Renee294992](https://forum.core-electronics.com.au/u/Renee294992)\
**Post date:** [3 October 2025 03:17 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/5 "2025-10-03T03:17:57Z")

</div>

Amazing, thanks so much Jane I will give it a try! Hope you have a spectacular weekend!

---

<div class="post-metadata">

**Author:** ![Renee294992](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Renee294992](https://forum.core-electronics.com.au/u/Renee294992)\
**Post date:** [7 October 2025 08:01 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/6 "2025-10-07T08:01:18Z")

</div>

> [@Jane](#):
>
> ```auto
> sudo apt-get install p7zip-full python3-lgpio
> 
> ```

Hi Jane, I tried the above and once I got to sudo chmod 777 -R Pn532-nfc-hat-code/ I got the following message “chmod: cannot access ‘Pn532-nfc-hat-code/’: Not a directory - did this come up for you at all?

---

<div class="post-metadata">

**Author:** ![Jane](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/jane/32/12622_2.png) [@Jane](https://forum.core-electronics.com.au/u/Jane)\
**Post date:** [9 October 2025 01:30 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/7 "2025-10-09T01:30:40Z")

</div>

Hi Renee,

Ooph, sorry, I do remember that happening to me.

Replace:

```auto
7z x Pn532-nfc-hat-code.7z -r -o./Pn532-nfc-hat-code

```

With:

```auto
7z x Pn532-nfc-hat-code.7z

```

That should extract the .7z archive in the same directory that you’re currently in. Then proceed with the next steps.

As an aside, I was reading the 7z manual page to double check this and they actually advice not to use -r as, in the manual’s words, ‘It does not do what you think it does.’

---

<div class="post-metadata">

**Author:** ![Renee294992](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Renee294992](https://forum.core-electronics.com.au/u/Renee294992)\
**Post date:** [13 October 2025 09:07 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/8 "2025-10-13T09:07:20Z")

</div>

Thanks Jane, I tried again with the above suggested and still got the chmod: cannot access msg. I think I might have to look into get some different kit for the project I am doing.

---

<div class="post-metadata">

**Author:** ![Cheese71011](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/cheese71011/32/9181_2.png) [@Cheese71011](https://forum.core-electronics.com.au/u/Cheese71011)\
**Post date:** [15 October 2025 04:43 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/9 "2025-10-15T04:43:52Z")

</div>

You won’t need to specify the folder and change permissions with that command (as Jane pointed out, you didn’t extract it to that folder by omitting that argument)

---

<div class="post-metadata">

**Author:** ![Renee294992](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Renee294992](https://forum.core-electronics.com.au/u/Renee294992)\
**Post date:** [18 October 2025 02:10 UTC](https://forum.core-electronics.com.au/t/rasp-pi-3a-not-detecting-nfc-hat-pn532/23376/10 "2025-10-18T02:10:25Z")

</div>

Just updating everyone on this one. I purchased a new NFC hat with Raspberry Pi 3b+ and got this working easy testing UIDs. I then tested the old NFC hat on the new Pi with the same UID’s and it still could not be detected, so this was probably a hardware issue. Thanks so much for all your support.
