-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Identify1_N returns 0 #13
Comments
Also in the Legacyenroll.py file, do you think that is a bug with the okid? before it was pointing at 0 the whole time. The checkenrolled returns true if the space is occupied. I think you have it the other way around. |
How are you connecting? Raspberry pi? I'm getting the same responses as you. It seems to me that the library simply doesn't work for pi users. I have to write for loops to read the fingerprint as the first one or two attempts always fail. Even after getting the 3 enrol commands through, and it apparently working, I cannot ever get it to verify. I always get 0 or 200 as the ID. I managed to get it to 'verify' my chin once, after I apparently enrolled successfully on one of my fingers. I once even managed to get it to verify as zero when the GT511C3 wasn't even plugged in. I'm thinking I might try connecting it to a Windows PC and using the 'official' SDK, limited as it is. I think there is either a problem with this library, or a problem with how the raspberry pi communicates with the device. Sadly, this is somewhat beyond my skills to debug :( |
''' @author: jeanmachuca SAMPLE CODE: This script is a test for device connected to GPIO port in raspberry pi For test purpose: Step 1: Step 2: Step 3: Step 4: This may be works fine, if don't, try to change the fingerprint baud rate with baud_to_115200.py sample code This script Enrolls your finger in the device internal database ''' def LegacyEnroll(fps):
if name == 'main': |
indentation is completely messed up. should have __ before and after |
Hi, I gave up on this library, and am now using this one instead which uses node.js: You can then use the supplied example to test everything, enroll your fingerprints and then test identifying. Make sure you edit the example to set the baud to 9600 and to change the /dev/ entry to what the pi uses. When enrolling with the example code, be sure to start enrolled, then p for fingerprint read, then enroll 1, then p, then enroll2, then p, then enroll 3. Make sure to remove and replace the same finger before each instance of pressing p. You can test the enrolment using "u". I've never touched node.js before, but after a day of learning and messing around with the example script provided, and merging it into my own project, I now have something that works very well indeed. I used the node.js code to enroll and test all of my fingers. So far not a single false positive, and just a few (maybe 2%ish?) false negatives. False negatives are fine for my use case, as long as they are minimal. False positives are simply no good at all, thus far not got any of those. I really wanted to like this library, but sadly it simply doesn't work for us pi users yet. Even after enrolling using the alternative library, this one still returned a result of 0 or 200 when trying to identify. I'm making the absurd assumption that this would work fine on a more vanilla desktop computer, as I assume that's what the author used. I have no idea why it would make a difference, but here we are. I'm guessing someone smarter than me will be along to fork and fix this. But if you want something that "just works" today on a raspberry pi, use the node.js library instead for now. |
I see. I'm not sure how to do multi-threading using node.js. I will defiantly give it a try. Just want to make sure, you are using Pi also? |
Hi ribs85, |
Hi, I know this issue is not active right now, but i think i figured out the problem. def Identify1_N(self):
'''
Checks the currently pressed finger against all enrolled fingerprints
Returns:
0-199: Verified against the specified ID (found, and here is the ID number)
200: Failed to find the fingerprint in the database
'''
cp = Command_Packet('Identify1_N',UseSerialDebug=self.UseSerialDebug)
packetbytes = cp.GetPacketBytes()
self.SendCommand(packetbytes, 12)
delay(1)
rp = self.GetResponse()
retval = rp.IntFromParameter()
if retval > 200:
retval = 200
del rp
del packetbytes
del cp
return retval I tried lower values, to be more accurate i let it be a sec. I hope it would help. |
Hi Scriptmonster, |
Hi cheatcodex, I was having exactly same problem with you. I don't have an osciloscope but I have debugged the code and recognised the same thing as you. Even if you want to use GetRawImage method it would more than 20 seconds. But it works fine, makes your code wait untild the response is ready. The problem occurs when FPS response does not start immediately. After changing the code a little, i am getting reliable responses with the python library. I can read and identify a finger around 2-3 seconds. If you know how much it takes to get response form Identify1_N method from node.js alternative, I would really like to know to compare performance. I am developing an application which requires, GUI, GPIO and FPS. I have no idea if i could use node.js to access GPIO, and develop a local GUI thus i am sticking with python. I believe if the serial receiving approach is fixed, library could be more reliable and fast. |
Hi Scriptmonster, |
I know many people probably think this is dead, but since I came across Josh Hawley's answer to this in CPP (I assume you took much of this from that collection since the comments are basically the same) I have made a simple observation about the logic. He implemented an example for enroll and part of it is CheckEnrolled. CheckEnrolled should return false if it is not enrolled and true if enrolled already. Yours assumes the opposite even though CheckEnrolled looks exactly the same in the main program... |
Hi Jean,
I've been working with this device for a couple of weeks now. Can't figure out the last and final step, the identification part.
I noticed there's a test_raw.py, but I think the default function comes with the device, should do the identification job right?
I'm calling the function of Identify1_N(). I started with serial timeout=1.0 and the actual identification takes time. I added a 2.5 seconds of delay, right before the GetResponse() inside of the identify1_N() function. The responses are either "55 aa 01 00 00 00 00 00 30 00 30 01" or 31 (not acknowledged) when I delay more than 5 seconds before the get response. In the 30 ACK event, the ID appears to be 0 when I use any finger on the scanner. I added delay because I can't get any reading back if there's no delay.
Would you have any advice?
Thanks a lot!
The text was updated successfully, but these errors were encountered: