NFC Shield for Arduino - PN532 & LibNFC
Moderators: adafruit_support_bill, adafruit

Re: NFC Shield for Arduino - PN532 & LibNFC

by amlll on Mon Nov 26, 2012 8:24 am

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.
amlll
 
Posts: 2
Joined: Fri Nov 16, 2012 5:38 am

Re: NFC Shield for Arduino - PN532 & LibNFC

by adafruit_support_rick on Mon Nov 26, 2012 1:12 pm

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.

@Mimi_Salade -
@satspace -

Please give this a try and report back.

Sorry for the problems! :oops:
User avatar
adafruit_support_rick
 
Posts: 11660
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: NFC Shield for Arduino - PN532 & LibNFC

by satspace on Wed Nov 28, 2012 11:34 am

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.

@Mimi_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
satspace
 
Posts: 4
Joined: Wed Nov 21, 2012 9:47 am

Re: NFC Shield for Arduino - PN532 & LibNFC

by Mimi_Salade on Fri Nov 30, 2012 8:43 am

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... :(
Mimi_Salade
 
Posts: 11
Joined: Sun Aug 12, 2012 2:24 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by adafruit_support_rick on Mon Dec 03, 2012 10:41 am

@Mimi_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 support@adafruit.com if you'd like to arrange for an exchange. Include a link to this thread and your original order number.
User avatar
adafruit_support_rick
 
Posts: 11660
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: NFC Shield for Arduino - PN532 & LibNFC

by Mimi_Salade on Tue Dec 04, 2012 10:27 am

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... :)
Mimi_Salade
 
Posts: 11
Joined: Sun Aug 12, 2012 2:24 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by anoxy78 on Sun Feb 10, 2013 8:29 am

@Mimi_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 !
anoxy78
 
Posts: 1
Joined: Fri Sep 28, 2012 12:37 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by jeje on Tue Apr 16, 2013 9:08 am

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
jeje
 
Posts: 1
Joined: Tue Apr 16, 2013 9:02 am
Location: Paris, France

Re: NFC Shield for Arduino - PN532 & LibNFC

by rkadeFR on Sun Jul 28, 2013 10:16 am

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 | TOGGLE FULL SIZE
 $ 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 4:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by rkadeFR on Sun Jul 28, 2013 12:19 pm

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

Not working neither, same thing : timeout
rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 4:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by adafruit_support_rick on Sun Jul 28, 2013 3:04 pm

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

You probably also need a ground connection on your FTDI cable.
User avatar
adafruit_support_rick
 
Posts: 11660
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: NFC Shield for Arduino - PN532 & LibNFC

by rkadeFR on Sun Jul 28, 2013 4:00 pm

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.
rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 4:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by adafruit_support_rick on Sun Jul 28, 2013 4:07 pm

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.
User avatar
adafruit_support_rick
 
Posts: 11660
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: NFC Shield for Arduino - PN532 & LibNFC

by rkadeFR on Mon Jul 29, 2013 1:45 pm

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
rkadeFR
 
Posts: 15
Joined: Thu May 16, 2013 4:33 pm

Re: NFC Shield for Arduino - PN532 & LibNFC

by adafruit_support_rick on Mon Jul 29, 2013 3:17 pm

The 'Busy' light flashes when a card is being read. It's not related to the serial communications
User avatar
adafruit_support_rick
 
Posts: 11660
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY