Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pn532 nfc module #586

Open
Transmitt0r opened this issue Jul 11, 2023 · 5 comments
Open

Support pn532 nfc module #586

Transmitt0r opened this issue Jul 11, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@Transmitt0r
Copy link

Hey, I'm currently working on a new project where I'd love to use tinygo together with an pn532 module. I'd be happy to contribute a driver for the module myself! Just wanted to create an issue first per to Contribution.md :)

@deadprogram deadprogram added the enhancement New feature or request label Jul 28, 2023
@graugans
Copy link
Contributor

graugans commented Oct 6, 2023

Hej, @Transmitt0r I do own an PN532 based module. Anything I can help you with?

@graugans
Copy link
Contributor

graugans commented Oct 8, 2023

I did some rough prototype based on the Adafruit Arduino code currently it only supports the I2C bus and only reading of the firmware version, card reading not yet implemented. I personally find the PN532 User Manual much more of a help than the datasheet linked above.

Is there a good reference for a driver supporting both I2C and SPI and UART?

In general, the check between different busses is similar to the Arduino code by checking if pointers are set, with no fancy interface tricks.

@Transmitt0r
Copy link
Author

@graugans very cool, I was also using the adafruit Arduino code as reference but didn't get it working 😅

@graugans
Copy link
Contributor

@graugans very cool, I was also using the adafruit Arduino code as reference but didn't get it working 😅

It looks like the Chip is quite picky about initialization. It requires kind of a Voodoo dance. It failed the last time I tried it. So it is time for the logic Analyzer. I will update the issue once I do know more.

@graugans
Copy link
Contributor

graugans commented Nov 4, 2023

Hej @Transmitt0r I now have a working implementation of a PN532 driver I have tested this on a cheap NFC Module V3 from Elechouse. The RST Pin they made available on the board is an output, this is why it did not work for me in the first place. This driver does not use all features for anyone who owns an Adafruit breakout board with the correct reset being available. On the other hand spending 50€ for the Adafruit board here in Germany is a bit too much for a just for fun project for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants