PN532 Breakout Board Troubles

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
Kwami
 
Posts: 6
Joined: Sat Aug 14, 2010 12:15 am

PN532 Breakout Board Troubles

Post by Kwami »

Hello,

I'm trying to use the PN532 Breakout Board (v1.3) with one of your USB FTDI cables and a Pandaboard ES that's running Ubuntu 12.04 (Precise). I've compiled and installed libnfc (1.6.0-rc1, but I also tried 1.4.0) according to the Debian/Ubuntu instructions on the libnfc website (I've also tried to do it with the instructions here on adafruit.com). I've soldered the FTDI cable and jumper headers and I have both jumpers in the OFF position to select UART. The power light on the breakout board is on and lsusb recognizes the FTDI cable. But, nfc-poll and nfc-list can't find any NFC devices.

Any ideas? What's the second LED for? The schematics seem to be for v1.0, which isn't helpful to me.

Thanks!

EDIT: It looks like this was all a permissions problem. Add yourself to the dialout group and you'll be all set!

Code: Select all

usermod -a -G dialout username
Last edited by Kwami on Thu Jan 10, 2013 8:57 pm, edited 1 time in total.

Kwami
 
Posts: 6
Joined: Sat Aug 14, 2010 12:15 am

Re: PN532 Breakout Board Troubles

Post by Kwami »

I hate to bump a thread that's still on the first page, but it's been three days since I posted about this problem and still no response from support.

Do you need more information? Is there some other way to get tech support for Adafruit products?

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

Re: PN532 Breakout Board Troubles

Post by ktownsend »

Without access to a Panda board and having never used one it's difficult to see since there are a lot of config options that can cause problems. Have you looked at the requirements to get the NFC boards working on the Pi, which might help with something: http://learn.adafruit.com/adafruit-nfc- ... -on-the-pi

The method I've always used on Linux is described here: http://www.ladyada.net/products/rfidnfc/libnfc.html

I suspect this may be a config issue with the Pandaboards, though, or perhaps a conflict if UART is being used for something else?

You might want to have a look at the libnfc forum to see if there is someone there that has tried this with the Panda board since it's not something I'm able to offer any concrete advice on myself with no access to the HW or experience with it.

The original v1.3 files for the breakout are available here: http://www.microbuilder.eu/Projects/PN532.aspx

There should only be one LED, though? Which board do you have ... the shield or the breakout? The second LED on the shield simply indicates the state of the IRQ pin (IRQ is asserted or not), but this is only relevant for I2C mode.

Kwami
 
Posts: 6
Joined: Sat Aug 14, 2010 12:15 am

Re: PN532 Breakout Board Troubles

Post by Kwami »

I looked over the Pi instructions, but no luck. I checked /boot/boot.script, but I don't see anything that would spawn a console:

Code: Select all

sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ cat /boot/boot.script
        fatload mmc 0:1 0x80000000 uImage
        fatload mmc 0:1 0x81600000 uInitrd
        setenv bootargs ro elevator=noop vram=40M mem=456M@0x80000000 mem=512M@0xA0000000 root=UUID=e7406b37-a55b-41cf-85ae-BANNED fixrtc quiet splash
        bootm 0x80000000 0x81600000
This version of Ubuntu isn't using inittab, but I stopped the equivalent upstart services:

Code: Select all

sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ sudo stop tty1
sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ sudo stop tty2
sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ sudo stop tty3
sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ sudo stop tty4
sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ sudo stop tty5
sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ sudo stop tty6
I configured and built libnfc-1.6.0-rc1 like this:

Code: Select all

sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ ./configure --with-drivers=pn532_uart --enable-serial-autoprobe
sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ make clean && make
I'm running nfc-list and nfc-poll from the build directory instead of running a "make install". This is the output from utils/nfc-list:

Code: Select all

sjo@pandaboard-01:~/libnfc-1.6.0-rc1/utils$ ./nfc-list
/home/sjo/libnfc-1.6.0-rc1/utils/.libs/lt-nfc-list uses libnfc 1.6.0-rc1 (r1326)
No NFC device found.
This is the output from examples/nfc-poll

Code: Select all

sjo@pandaboard-01:~/libnfc-1.6.0-rc1/examples$ ./nfc-poll
/home/sjo/libnfc-1.6.0-rc1/examples/.libs/lt-nfc-poll uses libnfc 1.6.0-rc1 (r1326)
lt-nfc-poll: ERROR: Unable to open NFC device.
Here is the output from dmesg when I connect the FTDI USB cable:

Code: Select all

[ 6278.523803] hub 1-1:1.0: state 7 ports 5 chg 0000 evt 0008
[ 6278.524291] hub 1-1:1.0: port 3, status 0101, change 0001, 12 Mb/s
[ 6278.675872] hub 1-1:1.0: debounce: port 3: total 100ms stable 100ms status 0x101
[ 6278.761779] usb 1-1.3: new full-speed USB device number 7 using ehci-omap
[ 6278.878662] usb 1-1.3: ep0 maxpacket = 8
[ 6278.881164] usb 1-1.3: default language 0x0409
[ 6278.885559] usb 1-1.3: udev 7, busnum 1, minor = 6
[ 6278.885589] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[ 6278.885650] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 6278.885681] usb 1-1.3: Product: TTL232R-3V3
[ 6278.885711] usb 1-1.3: Manufacturer: FTDI
[ 6278.885711] usb 1-1.3: SerialNumber: FTG967R9
[ 6278.886657] usb 1-1.3: usb_probe_device
[ 6278.886688] usb 1-1.3: configuration #1 chosen from 1 choice
[ 6278.886962] usb 1-1.3: adding 1-1.3:1.0 (config #1, interface 0)
[ 6278.889282] usbserial_generic 1-1.3:1.0: usb_probe_interface
[ 6278.889312] usbserial_generic 1-1.3:1.0: usb_probe_interface - got id
[ 6278.889434] ftdi_sio 1-1.3:1.0: usb_probe_interface
[ 6278.889465] ftdi_sio 1-1.3:1.0: usb_probe_interface - got id
[ 6278.889526] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 6278.889831] usb 1-1.3: Detected FT232RL
[ 6278.889862] usb 1-1.3: Number of endpoints 2
[ 6278.889892] usb 1-1.3: Endpoint 1 MaxPacketSize 64
[ 6278.889923] usb 1-1.3: Endpoint 2 MaxPacketSize 64
[ 6278.889953] usb 1-1.3: Setting MaxPacketSize 64
[ 6278.891052] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
[ 6278.892211] hub 1-1:1.0: state 7 ports 5 chg 0000 evt 0008
Finally, here are the other parts of dmesg that involve tty:

Code: Select all

sjo@pandaboard-01:~/libnfc-1.6.0-rc1$ dmesg | grep tty
[    0.000000] console [tty0] enabled
[    1.436279] omap_uart.0: ttyO0 at MMIO 0x4806a000 (irq = 104) is a OMAP UART0
[    1.436889] omap_uart.1: ttyO1 at MMIO 0x4806c000 (irq = 105) is a OMAP UART1
[    1.437469] omap_uart.2: ttyO2 at MMIO 0x48020000 (irq = 106) is a OMAP UART2
[    1.438110] omap_uart.3: ttyO3 at MMIO 0x4806e000 (irq = 102) is a OMAP UART3
[ 6278.891052] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
I notice the "console [tty0] enabled" lined at the start, but "fuser /dev/tty0" returns nothing. Neither does "fuser /dev/ttyUSB0", "fuser /dev/ttyS0", "fuser /dev/ttyO0", or anything similar.

Any other ideas?

Kwami
 
Posts: 6
Joined: Sat Aug 14, 2010 12:15 am

Re: PN532 Breakout Board Troubles

Post by Kwami »

Looks like this is a libnfc problem, not a problem with the breakout board. When I run the same commands as root, they run in debug mode and detect the PN532 (and the 1k card) just fine. I'll take further discussions to the libnfc forum and I'll update this thread with a solution if I find one.

Thanks for the tips. :)

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

Return to “Other Products from Adafruit”