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

get_passive_target is asking for more data from the UART than is provided, so we are blocking #44

Closed
infrastructure-ninja opened this issue Jan 6, 2021 · 0 comments · Fixed by #63

Comments

@infrastructure-ninja
Copy link

greetings everyone!

I am presenting a card and the following line in the _read_data function (line #82 in uart.py):
frame = self._uart.read(count)
is never returning as we've [presumably] told it to expect more data than is available (being returned from PN532).

After some digging, I found the following in line #419 of adafruit_pn532.py:
response = self.process_response( _COMMAND_INLISTPASSIVETARGET, response_length=19, timeout=timeout )

So we hard-code to 19 bytes? I have adjusted the "response_length" parameter down to 10, and it appears to work properly, for the specific card I am using here.

Can someone explain how we derived this length, and more importantly - why is this not dynamic based on what the chip is sending back to us? I'm reading through the datasheet, which is how I got to where I am now - but it's honestly making my head hurt.

Hoping to get fresh eyes on this that are far more intimately familiar with the device and protocol already.

Thanks for talking this out with me! - Joel

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

Successfully merging a pull request may close this issue.

1 participant