PN532 NFC library


#1

Hi, does any of you have the courage to help port the PN532 + NDEF libs to the Particle platform ?


#2

@ekarlso, I had ported the Adafruit PN532 library for the Core a while back.

Perhaps if you provide links to the specific libraries you want ported, I could look.


#3

Not sure what the specific differences are but:


#4

I’ve done it here. It’s mixed in with all my kegerator code but you should be able to just pull out the files you need.


#6

@jlkalberer do you have code for PN532 in I2C mode? Can you share it? I’ve just purchased a grove NFC http://wiki.seeed.cc/Grove-NFC/ and want to use it in I2C mode
Thanks


#7

OK, I look like I just have to download the library from https://github.com/Seeed-Studio/PN532 , move some files to correct folders so that I can compile with Particle IDE, use the sample source code from here http://wiki.seeed.cc/Grove-NFC/ and it works. I’ll publish soon a library so that others can reuse it more easily.


#8

Yeah, that’s what I started with but I used the NDEF library as well.

I had to do a bunch of tweaks to make it work better with photon like removing the sleep calls but that library should work for you.


#9

I don’t have much experience with NFC but as I understand, NDEF is more for P2P mode, right? Can you share the code you optimize for NDEF also as a reference for me? I don’t need P2P mode at this moment but maybe in the future.


#10

No, NDEF is basically a container/packet so you don’t have to work with raw data.

Here’s my latest version - https://github.com/Brewskey/Brewskey.Device/tree/master/Source/PN532

Here is the I2C code before I removed it from my repo - https://github.com/Brewskey/Brewskey.Device/tree/dbe112c0345d7ab559ec41b33036563934b0b7e7/Source/PN532_I2C