adafruit / Adafruit_CircuitPython_Fingerprint

CircuitPython library for talking to UART-based Fingerprint sensors
MIT License
54 stars 52 forks source link

Cannot find print #20

Closed jerryneedell closed 4 years ago

jerryneedell commented 4 years ago

Just started playing with the R503 fingerprint sensor on a grandcentral_m4_express. It seems to enroll fingerprints OK so it is communicating but it repeatedly fails when trying to find a match. I'm just using the fingerprint_simpletest.py from the examples. Any suggestions?

Adafruit CircuitPython 6.0.0-alpha.1-45-g37e77b21c on 2020-07-14; Adafruit Grand Central M4 Express with samd51p20
>>> import finger
----------------
Fingerprint templates: [1]
e) enroll print
f) find print
d) delete print
----------------
> e
Enter ID # from 1-127: 2
Place finger on sensor........................................................................................................................................Image taken
Templating...Templated
Remove finger
Place same finger again................................................................Image taken
Templating...Templated
Creating model...Created
Storing model #2...Stored
----------------
Fingerprint templates: [1, 2]
e) enroll print
f) find print
d) delete print
----------------
> f
Waiting for image...
Templating...
Searching...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "finger.py", line 185, in <module>
  File "finger.py", line 34, in get_fingerprint
  File "adafruit_fingerprint.py", line 279, in finger_fast_search
  File "adafruit_fingerprint.py", line 292, in _get_packet
RuntimeError: Failed to read data from sensor
>>> 
ladyada commented 4 years ago

i havent done the change that this needs for the sensor, it uses a different search algorithm function

jerryneedell commented 4 years ago

Ah -- not a problem -- no rush -- just playing -- I can take a deeper look to see if I can figure out what is needed or wait until it's ready. Thanks.

ladyada commented 4 years ago

you could add these two functions - that will let it work https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/commit/8792d131ed000ea21cac8d11a470eb8854a18a73#diff-e78dfca008f39f2023f2fa83f263ccb6R135 https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/commit/8792d131ed000ea21cac8d11a470eb8854a18a73#diff-e78dfca008f39f2023f2fa83f263ccb6R292

jerryneedell commented 4 years ago

Thanks I will give it a try.

On Jul 14, 2020, at 11:11 AM, ladyada notifications@github.com wrote:

you could add these two functions - that will let it work adafruit/Adafruit-Fingerprint-Sensor-Library@8792d13#diff-e78dfca008f39f2023f2fa83f263ccb6R135 https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/commit/8792d131ed000ea21cac8d11a470eb8854a18a73#diff-e78dfca008f39f2023f2fa83f263ccb6R135 adafruit/Adafruit-Fingerprint-Sensor-Library@8792d13#diff-e78dfca008f39f2023f2fa83f263ccb6R292 https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/commit/8792d131ed000ea21cac8d11a470eb8854a18a73#diff-e78dfca008f39f2023f2fa83f263ccb6R292 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/adafruit/Adafruit_CircuitPython_Fingerprint/issues/20#issuecomment-658237319, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY7JQXJDRCOFDXKZTIGFRTR3RYTBANCNFSM4OZTAZYQ.

jerryneedell commented 4 years ago

@ladyada That works! Thanks

ladyada commented 4 years ago

incredible, could you PR? it would be a blessing!

jerryneedell commented 4 years ago

sure -- will that also work in the original sensor? It looks like it has the same command. SO should I update the example to just j=use the new fingerseach? -- or should there be 2 different examples?

ladyada commented 4 years ago

ill test the PR but yeah its a tiny bit slower but works just the same

jerryneedell commented 4 years ago

OK -- just need to get pylint happy -- should have it in soon.

ladyada commented 4 years ago

thanks :)