1

At first im only using 1 NFC PN532 and libnfc as the library, but when im trying to connect it to 2 same devices, it still gives the same address which is 0x24(because of libnfc). Since controlling it need unique address, i tried to find a way to change it. And i come to final answer which it is fixed address(hard code in the chip), to solve it i can only use raspberry gpio as additional bus but it only make the device connected to it limited. So i use another option that is to use I2C expander/multiplexer, the mux i use is TCA9548A. But now im wondering how to do this, any advice what should i do and how to do it? And when using i2cdetect it only detects mux address, is it normal?

  • Hi @Wesly, Welcome and nice to meet you. Ah let me see. Yes, you can use TCA9548A. to MUX multiple I2C devices with the same device address 0x24 in your case. Another workaround is to use multiple I2C buses. For Rpi4B buster, you can use multiple I2C buses, each bus handling one PN532. Let me think harder and see if there are more workarounds. Cheers. – tlfong01 May 13 at 12:05
  • So I read my old post to refresh my memory: (1) Problem with detecting badge with PN532 and Raspberry Pi - tlfong01 StackOverflow 2020mar23 stackoverflow.com/questions/60819793/…. Now I remeber that PN532 can do all I2C, SPI, and UART. Let me read my other old post on using SPI. See you later. – tlfong01 May 13 at 12:12
  • 1
    yeah i know another way is to use raspi GPIO as additional bus but that will only restrict it to fewer device connected. – Wesly May 13 at 12:13
  • 1
    ok thx for helping, im still trying to find how to combine pn532 with mux. – Wesly May 13 at 12:24
  • 1
    Okay,ill consider SPI and UART but now ill stick to i2c first. – Wesly May 14 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.