NFC Shield for Arduino - PN532 & LibNFC

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
amlll
 
Posts: 2
Joined: Fri Nov 16, 2012 6:38 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by amlll »

I already posted this in the PN542 NFC Shield + FTDI forum:
I found out that SEL0 maps to PN532 pin 17 which is I1 and SEL1 maps to pin 16 that is I0.
That seems like a little error in the silk screen???
So I will try to leave SEL0 and put a solder blob on SEL1 when using the high speed uart connection.
For me it works but don't forget to send 0x55 and 30x 0x00 to get past the PN532 wake-up.
Hope this is of any use.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by adafruit_support_rick »

amlll wrote:Hope this is of any use.
Absolutely! Good find - thank you very much.

The board designer has verified this, and the silkscreen will be corrected on the next release of the board. Meanwhile, we are updating the product pages with notes about this.

@BANNED_Salade -
@satspace -

Please give this a try and report back.

Sorry for the problems! :oops:

satspace
 
Posts: 5
Joined: Wed Nov 21, 2012 10:47 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by satspace »

driverblock wrote:
amlll wrote:Hope this is of any use.
Absolutely! Good find - thank you very much.

The board designer has verified this, and the silkscreen will be corrected on the next release of the board. Meanwhile, we are updating the product pages with notes about this.

@BANNED_Salade -
@satspace -

Please give this a try and report back.

Sorry for the problems! :oops:

Ok, now it "works"

At least now "nfc-list" gives me something. (not always....but this I suspect is another issue)
Anyway it's a mess to build the environment of libnfcx.x.x and various auditing tools like mfoc or rfidiot or similar: when I find a working libnfc version, I'm not able to compile the tools because some incompatibility ... now I have to dig in this direction.

Thanks

Mimi_Salade
 
Posts: 11
Joined: Sun Aug 12, 2012 3:24 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by Mimi_Salade »

I had already tried every selector combination (none - 0 - 1 - 0+1) but it didn't work.
I'll try again to see if I had forgotten something and I'll tell you if it works.
Thanks for your help.

Edit : It's a fail... :(

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by adafruit_support_rick »

@BANNED_Salade-
I'm sorry you are unable to make it work. I don't know what your problem could be.

The designer says that you really should be using the breakout board instead of the shield for serial communication. Contact [email protected] if you'd like to arrange for an exchange. Include a link to this thread and your original order number.

Mimi_Salade
 
Posts: 11
Joined: Sun Aug 12, 2012 3:24 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by Mimi_Salade »

Thank you very much for your kindness.
I'll give it a new try (just to check) before bothering you.
If different versions of LibNFC, selectors, wiring etc... don't make it work, i'll think about it, even if it was nice to have an Arduino shield.
I thought I could use it for both Arduino and PC.
Nevermind, thanks a lot for your help, and here I go for the last try... :)

anoxy78
 
Posts: 1
Joined: Fri Sep 28, 2012 1:37 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by anoxy78 »

@BANNED_Salade : We just had the same problem over here. So to sum up :
The silk screen on "old boards", i.e. previous to the correction mentioned in this topic (nov 12 ?), is wrong, so to use UART SEL0 should be OPEN, and SEL1 CLOSED.
Second, as amlll said, it is important to wait a time long enough to pass the pn532 wake up sequence, so do send a 0x55 followed by some 30 0x00. To do so, edit libnfc/drivers/pn532_uart.c line 275 and change the pn5328wakeup_preamble[] by adding several 0x00.

Good luck !

jeje
 
Posts: 1
Joined: Tue Apr 16, 2013 10:02 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by jeje »

As I went through many of the issues explained in previous posts and as it was a PITA to get it working, I've written some notes on a blog post, if that helps:
http://www.jerome-bernard.com/blog/2013 ... ia-libnfc/

IHTH

rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 5:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by rkadeFR »

Hi all,

Sorry to up this thread, but I can't make my adafruit pn532 shield work with the libnfc.

I read the thread (and followed the last link to the tutorial) and did that :
- I do everything as su user
- edit libnfc/drivers/pn532_uart.c and add lots (30) of 0x00 in the pn532_wakeup_preamble
- then create the directory /usr/local/etc/nfc/devices.d
- copy libnfc.conf.example to the /usr/local/etc/nfc/libnfc.conf
- edit the libnfc.conf to set :
device.name = "UartSBee"
device.connstring = "pn532_uart:/dev/ttyUSB0"

I checked my dmesg, and the FTDI cable is connected to the /dev/ttyUSB0.

Then hardware :
I have the adafruit PN532 shield v1.0
I close the SEL1 with a blob.
I connect the 5V and Gnd to my arduino through cable. I have the two leds (busy and PWR) on.
I connect MOSI to the brown cable of my FTDI cable
I connect SS to the red cable of my FTDI cable

it's a 3.3V FTDI cable, but I use the power of the arduino. Is it bad ?

Then, I compiled the libnfc library with --with-drivers=pn532_uart
make, make install

When I launch nfc-list, I have the timeout answer.

Code: Select all

 $ nfc-list -v
nfc-list uses libnfc 1.7.0-rc7
pn53x_check_communication: Timeout
nfc-list: ERROR: Unable to open NFC device: pn532_uart:/dev/ttyUSB0
Some pictures of the hardware :
http://rkade.fr/static/img/IMG_20130728_170203.jpg
http://rkade.fr/static/img/IMG_20130728_170213.jpg
http://rkade.fr/static/img/IMG_20130728_170224.jpg

If you can help me ?

thank you

rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 5:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by rkadeFR »

PS : I tried to close the SEL1 and open SEL0 too.

Not working neither, same thing : timeout

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by adafruit_support_rick »

You should have SEL1 open and SEL0 closed for UART operation.

You probably also need a ground connection on your FTDI cable.

rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 5:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by rkadeFR »

I now set up the SEL1 open and SEL0 close.

I tried to wire the black cable to the GND of my arduino, then I tried with the yellow one (I didn't know which one is the Gnd).

Same problem.

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by adafruit_support_rick »

Hmmm ... not sure what to tell you.

You soldered the pin headers on the wrong side of the board - it could be that the pins are now too short to make good contact inside the FTDI cable header.

rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 5:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by rkadeFR »

Not sure it comes from the pins.

I would like to know, if there's "data" coming from my computer through the FTDI cable, the busy led should flicker ?

I never see the busy light flickered

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: NFC Shield for Arduino - PN532 & LibNFC

Post by adafruit_support_rick »

The 'Busy' light flashes when a card is being read. It's not related to the serial communications

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”