ChameleonMini icon indicating copy to clipboard operation
ChameleonMini copied to clipboard

Bugfix with -I option

Open Klami opened this issue 4 years ago • 2 comments

If another command after the -I option is issues the script fails

I've edited the 'readResponse(self)' to read until the end of the response instead of only one line

Klami avatar Jan 13 '20 15:01 Klami

This poses a severe race condition problem! The protocol "framing" using CRLF was originally put in place (by me) to solve the issue of finding the end of the response. Whereas your code only works when the underlying operating system routines process the response in a single chunk. This however cannot be guaranteed. What exactly does trigger the problem?

skuep avatar Jan 13 '20 18:01 skuep

A Command like this: ./chamtool.py -p /dev/ttyACM0 -s1 -c ISO14443A_READER -I -s2 -c -U

without my fix I've get a error that ATQA is not parse able to int base10 because the the second line from the identify command is interpreted as status response from the next command. It's also possible to clear the buffer after each read and lose the rest of information or change the firmware that it responses as one line

Klami avatar Jan 14 '20 11:01 Klami