techniq / node-pn532

Native Node.js driver for the PN532 NFC chip
70 stars 31 forks source link

pn532 in UART mode doesn't start properly on Raspberry PI #3

Closed viking closed 8 years ago

viking commented 9 years ago

I believe this is same problem as detailed here: https://answers.launchpad.net/nfcpy/+question/237349

viking commented 9 years ago

When turning on debug logging, it gets stuck:

debug: [hsu] Waking up PN532...
techniq commented 9 years ago

Did you upgrade to 0.0.4 yet? I was encountering this as well and pushed a work around. I was already calling SAMConfig but had a timing issue with the wakeup "prefix" being in a separate serial.write() and thus had to much delay between the two calls.

On Tue, Dec 16, 2014, 7:39 PM Jeremy Stephens notifications@github.com wrote:

When turning on debug logging, it gets stuck:

debug: [hsu] Waking up PN532...

— Reply to this email directly or view it on GitHub https://github.com/techniq/node-pn532/issues/3#issuecomment-67259604.

viking commented 9 years ago

Just tried 0.0.4. Same problem, unfortunately.

viking commented 9 years ago

If I run nfc-poll first from the libnfc examples directory, it wakes up the card and then the pn532 node module works fine.

viking commented 9 years ago

If it helps, I've got a Raspberry Pi B+ model and the PN532 is connected via UART.

techniq commented 9 years ago

I added some more delay in the wakeup that resolved an issue I was using on my Macbook using an FTDI cable. Maybe try again and let me know your findings (I haven't pushed an updated to NPM yet, so you'll need to pull from source until I do so).

techniq commented 9 years ago

I've tagged v0.0.5 if you want to give it a try

viking commented 9 years ago

Unfortunately I don't have the hardware at the moment to try it, but when I do again I will.