Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling responses with length >= 256 #38

Open
BrightSoul opened this issue Nov 3, 2017 · 0 comments
Open

Handling responses with length >= 256 #38

BrightSoul opened this issue Nov 3, 2017 · 0 comments

Comments

@BrightSoul
Copy link

BrightSoul commented Nov 3, 2017

I'm sending ADPU commands using the inDataExchange method. The PN532 breakout board is communicating to an Arduino UNO via its SPI interface.
Everything worked fine so far but now I'm sending an INTERNAL AUTHENTICATE command which is expecting a response of length 256.
Unfortunately, the length variable is defined as a uint8_t and read off of a single preamble octet.

uint8_t length = pn532_packetbuffer[3];

Actually, no more than 252 bytes may be read into the responseBuffer.

length -= 3;

But the packetBuffer size is even smaller.

#define PN532_PACKBUFFSIZ 64

The INTERNAL AUTHENTICATE command doesn't seem to allow the reading of a response in chunks like the READ BINARY command does.

If I don't go wrong, the library is not supporting the extended frame response that's documented here:
https://cdn-shop.adafruit.com/datasheets/PN532C106_Application+Note_v1.2.pdf#page=10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants