0

PN532 not responding with FTDI cable
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

PN532 not responding with FTDI cable

by enzo on Mon Apr 09, 2012 5:44 pm

We connected the PN532 reader board (version 1.3) via a 3.3V FTDI cable to our host computer (Win7). We use the 5V from the FTDI cable to power the board. Next we opened the right COM port (115200 baud, 8 data, 1 stop, no parity) and send the bytes 0x00 0x00 0xff 0x02 0xfe 0xd4 0x2a 0x00 (GetFirmwareVersion) to the reader, but no response is received. The cable and serial tool we use work fine with other serial devices.

Any suggestions how to solve this?
enzo
 
Posts: 4
Joined: Mon Apr 09, 2012 5:31 pm

Re: PN532 not responding with FTDI cable

by adafruit on Mon Apr 09, 2012 8:26 pm

did you set the jumpers properly? are you using libnfc?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: PN532 not responding with FTDI cable

by enzo on Tue Apr 10, 2012 2:36 am

Yes, we set both jumper to OFF to select the UART. We don't use libnfc but our standard serial communication tool where we can send/receive any arbitrary binary data. We use this tool for testing serial devices, so hoped to test the PN532 too.

Are there special requirement for the PN532 in relation to any other serial device, other than setting the correct baudrate, parity, data bits and stop bits?
enzo
 
Posts: 4
Joined: Mon Apr 09, 2012 5:31 pm

Re: PN532 not responding with FTDI cable

by adafruit on Tue Apr 10, 2012 10:41 am

try libnfc as indicated in the tutorial

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: PN532 not responding with FTDI cable

by DavidKaufman on Tue Apr 24, 2012 6:01 pm

I received the PN532 breakout board a few days ago and have not been able to get a response. I have tried variable applications and now just tried libnfc (log below). I am using adafruit FTDI cable.

There is a possible solder bridge in the corner of the PN532 chip. I can send or upload a photo.

Please advise on a next step.

phosphor:examples david$ ./nfc-poll
/Users/david/DDK_Linux_Dev_Projects/libnfc-1.6.0-rc1/examples/.libs/nfc-poll uses libnfc 1.6.0-rc1 (r1326)
/dev/cu.usbserial-FTFXI984
trace libnfc.driver.pn532_uart Trying to find PN532 device on serial port: /dev/cu.usbserial-FTFXI984 at 115200 bauds.
trace libnfc.bus.uart Serial port speed requested to be set to 115200 bauds.
trace libnfc.chip.pn53x Diagnose
trace libnfc.chip.pn53x Timeout values: 500
trace libnfc.bus.uart TX: 55 55 00 00 00
trace libnfc.chip.pn53x SAMConfiguration
trace libnfc.chip.pn53x Timeout values: 1000
trace libnfc.bus.uart TX: 00 00 ff 03 fd d4 14 01 17 00
trace libnfc.bus.uart Timeout!
error libnfc.driver.pn532_uart Unable to read ACK
trace libnfc.general 0 device(s) found using pn532_uart driver
nfc-poll: ERROR nfc-poll.c:111
nfc-poll: Unable to open NFC device.
phosphor:examples david$
DavidKaufman
 
Posts: 11
Joined: Tue Apr 24, 2012 4:47 pm

Re: PN532 not responding with FTDI cable

by adafruit on Tue Apr 24, 2012 6:19 pm

can you post a photo of your setup? that would be the most helpful

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: PN532 not responding with FTDI cable

by DavidKaufman on Tue Apr 24, 2012 7:01 pm

DavidKaufman
 
Posts: 11
Joined: Tue Apr 24, 2012 4:47 pm

Re: PN532 not responding with FTDI cable

by ktownsend on Tue Apr 24, 2012 8:19 pm

Those two pins are connected together via a trace (both VDD) which is why you sometimes get bridging, but it has no effect on the board itself and isn't the problem in this case.

Have you tried running any of the Arduino examples and do you have the jumpers in the right position? There are no jumpers shown in this photo, and the pins are in an undefined state. For UART they should both be set to OFF.

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: PN532 not responding with FTDI cable

by DavidKaufman on Tue Apr 24, 2012 8:31 pm

Earlier and all other tests had jumpers in place.

Another post in the forum stated that the jumpers are not needed for UART. This picture was the only test without the jumpers.

I do not have an arduino, but I will be testing with a BusPirate when the cables arrive.

I tested with two different applications (one on a Mac OSX, and on on Windows 7) that both wrote the same 'GetVersion' command. Same results in all cases (no ack).

I did a test where I connected the RX and TX lines together on the FTDI cable (and on other cables I tested with, as well) to create a "loop back connector". In these cases the data sent out was read back. This verified that data was making the round trip on the wire and that the write and read parts of the code (in my test apps) were correct. (The PN532 board was not part of this test.)
DavidKaufman
 
Posts: 11
Joined: Tue Apr 24, 2012 4:47 pm

Re: PN532 not responding with FTDI cable

by ktownsend on Tue Apr 24, 2012 8:35 pm

If you're only testing this with a PC and don't have an Arduino or an LPC1343 board, the only way it can easily be tested is with libnfc as follows (though this is an older version of the library now);
http://www.microbuilder.eu/blog/11-02-1 ... Linux.aspx

I'm assuming this is what you are testing with? It should work out of the box with libnfc if you follow the steps above.

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: PN532 not responding with FTDI cable

by DavidKaufman on Tue Apr 24, 2012 8:37 pm

I followed the libnfc steps on my Mac. See my earlier post with my console output (above).
DavidKaufman
 
Posts: 11
Joined: Tue Apr 24, 2012 4:47 pm

Re: PN532 not responding with FTDI cable

by ktownsend on Tue Apr 24, 2012 8:57 pm

Do you have a Linux (Ubuntu, etc.) or Windows box you could test with? I just don't know off the top of my head if libnfc works properly with UART on a Mac with FTDI adapters, though I do know it's fully supported with the PN532 on Linux and Windows (though I haven't tested with the beta SW you are using ... it may be worth testing an older confirmed version).

ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: PN532 not responding with FTDI cable

by DavidKaufman on Tue Apr 24, 2012 9:28 pm

I have a Windows 7 laptop. If you can provide a link to instructions on how to build and test libnfc under Windows 7 I will give it a try.

Also, if you have a specific version of libnfc you want me to test (on the Mac), please let me know which version. Versions available are here: http://code.google.com/p/libnfc/downloads/list

Note I did test sending the GetVersion command on the Windows laptop (using a very simple test app) and did not get any ACK from the board.
DavidKaufman
 
Posts: 11
Joined: Tue Apr 24, 2012 4:47 pm

Re: PN532 not responding with FTDI cable

by scott_42 on Wed Apr 25, 2012 2:34 am

libnfc 1.6 works on Macs. I'm using the latest from the Google code svn repo on 10.7. See my other post about the slight change you need to make to the uart_posix.c file to find the USB serial adapters. Other than that it works fine.

This is the output of a list command.
Code: Select all | TOGGLE FULL SIZE
nfc-list uses libnfc 1.6.0-rc1 (r)
NFC device: pn532_uart:/dev/tty.usbserial-A4007TBx - PN532 v1.6 (0x07) opened
    ATQA (SENS_RES): 00  04 
       UID (NFCID1): ae  04  4b  9a 
      SAK (SEL_RES): 08

scott_42
 
Posts: 124
Joined: Mon May 30, 2011 10:46 am
Location: Santa Clara, CA

Re: PN532 not responding with FTDI cable

by DavidKaufman on Wed Apr 25, 2012 7:29 am

I saw the changes somewhere on this forum for finding the USB/Serial port. I tested yesterday with the "cu." device and this morning with the "tty." device. No success either time. Here is this morning's output with the tty device:


phosphor:examples david$ ./nfc-poll
/Users/david/DDK_Linux_Dev_Projects/libnfc-1.6.0-rc1/examples/.libs/nfc-poll uses libnfc 1.6.0-rc1 (r1326)
/dev/tty.usbserial-FTFXI984
trace libnfc.driver.pn532_uart Trying to find PN532 device on serial port: /dev/tty.usbserial-FTFXI984 at 115200 bauds.
trace libnfc.bus.uart Serial port speed requested to be set to 115200 bauds.
trace libnfc.chip.pn53x Diagnose
trace libnfc.chip.pn53x Timeout values: 500
trace libnfc.bus.uart TX: 55 55 00 00 00
trace libnfc.chip.pn53x SAMConfiguration
trace libnfc.chip.pn53x Timeout values: 1000
trace libnfc.bus.uart TX: 00 00 ff 03 fd d4 14 01 17 00
trace libnfc.bus.uart Timeout!
error libnfc.driver.pn532_uart Unable to read ACK
trace libnfc.general 0 device(s) found using pn532_uart driver
nfc-poll: ERROR nfc-poll.c:111
nfc-poll: Unable to open NFC device.
DavidKaufman
 
Posts: 11
Joined: Tue Apr 24, 2012 4:47 pm

Please be positive and constructive with your questions and comments.