Open PierreRust opened 8 years ago
Same issue here, what's wrong ? Any workaround ?
I tried with the original mxgxw/MFRC522-python class and the issue is the same :o
Well the workaround I found was this: On successful reading a tag, I call rdr.request()
a second time without processing it's results. Not nice, but it works for me until this gets fixed.
I was experiencing the same thing with the lua port.
Curiously, two subsequent .request()
calls do work correctly when you replace the tag with an other between the calls. So it doesn't seem that the library gets stuck in an inconsistent state or something like that; rather that the tag is not responding correctly when it is left on the reader.
This observation made me try calling halt()
after reading the serial. This makes it work, but I'm not sure if it is the right thing to do. The example in the lua port does seem to imply that calling halt is not necessary when you're not selecting a tag.
When polling the state while a while loop (like in the example) the
rdr.request()
fails one time in two if the tag is always kept close to the reader.More precisely : when I place my tag on the reader and leave it there I would expect
rdr.request()
to returnTrue
at each iteration of the loop, but instead it returns a sequence like this :This behavior make it more complicated to detect a tag removal.