Skip to content

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

@infrastructure-ninja

Description

@infrastructure-ninja

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions