PN532 Working...kind of

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
eros
 
Posts: 31
Joined: Wed Jun 04, 2014 1:58 am

PN532 Working...kind of

Post by eros »

I purchased a PN532 Breakout board to integrate to my RPi for a door access project. However I notice when I keep the Pi and the breakout on for a long period of time it's like it "times out". nfc-poll returns *lt-nfc-poll: ERROR: Unable to open NFC device.*

A reboot rectifies the issue. Is this a known problem? I read somewhere that this could have been an issue with the HSU (High Speed Unit) wakeup preamble string, but mine was set correctly.

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

Re: PN532 Working...kind of

Post by ktownsend »

Nothing jumps out at me and it's not something I've seen myself, but it's also not a common use case for me (waiting hours on end for a card to enter the field). If you have an Arduino Uno I would be interested to know if the issue is repeatable on the Uno or only on the Pi (if you start a test sketch and wait a few hours does the Uno also 'timeout')? My suspicion would be libnfc somehow timing out on something, but it's hard to say. There are a lot of revisions of libnfc and they've changes the UART interface more than once.

Have you tried posting up on the libnfc forum since that's probably the most logical place to see if anyone else has seen this issue?

eros
 
Posts: 31
Joined: Wed Jun 04, 2014 1:58 am

Re: PN532 Working...kind of

Post by eros »

ktownsend wrote:Nothing jumps out at me and it's not something I've seen myself, but it's also not a common use case for me (waiting hours on end for a card to enter the field). If you have an Arduino Uno I would be interested to know if the issue is repeatable on the Uno or only on the Pi (if you start a test sketch and wait a few hours does the Uno also 'timeout')? My suspicion would be libnfc somehow timing out on something, but it's hard to say. There are a lot of revisions of libnfc and they've changes the UART interface more than once.

Have you tried posting up on the libnfc forum since that's probably the most logical place to see if anyone else has seen this issue?
Hey ktownsend, I took a peek at the libnfc forum and without asking the question, there were a few people who are experiencing my same symptom. It seems to be the board itself using the uart protocol and a delay issue. They suggested using I2C but I didn't see an outcome or result from that.

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

Re: PN532 Working...kind of

Post by ktownsend »

I can't imagine this is a HW issue with the UART signals. They're simply two basic electrical signals, and very slow ones at that, so it's hard to imagine any timing issues at these speeds. UART is ridiculously slow in electrical terms, so even the level shifting shouldn't pose any problems.

Can you point me to the forum posts, though, just to get some context? You haven't mention a lot of details on your side either. Setup, libnfc version, etc.?

Without a consistent means of producing the error it's a bit hard to start guessing what could be going wrong, but the above details might at least help narrow things down.

eros
 
Posts: 31
Joined: Wed Jun 04, 2014 1:58 am

Re: PN532 Working...kind of

Post by eros »

Here is the link. If there is anything I misunderstood, let me know.

http://www.libnfc.org/community/topic/9 ... out-board/

My setup is the same as the adafruit instructions per https://learn.adafruit.com/adafruit-nfc ... spberry-pi

I'm using libnfc-1.7.0

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

Return to “General Project help”