Template comparison
I notice I could extract a fingerprint's template from the library. I wonder whether there is anyway to upload the template to my server where I can compute the matching score.
(As the FP sensor could store a limited number of fingerprints, I plan to keep a database for all the templates on the server instead. The issue now is how to match a template at the server.)
I have the same problem. I have to save the template in a mysql database and then again retrieve it to match. I extracted the template now i need to send this template for matching,but i dont know where to send this template for matching..Please help..
Any hints on this? a SDK is a must have for this product. If anyone has any idea what is the algorithm I can do the coding part.
has anyone figured this out yet? i'm also trying to do this
It's my question too
Does anyone know how to match fingerprint templates when you have them ? I can extract the templates generated after the enrollment. In my case, after enrollment, I don't store the template to the internal memory of the device but I store the template to my computer.
Please post a sample code to extract template. I see there is no function to extract template in the library. Thanks
@Obaid-ur-Rehman the sample code is here. I hope this will help you and the others. Note that the format of the template is specified by the manufacturer, it is neither in ISO nor ANSI template format. https://pastecode.xyz/view/2c8914d0
I am now able to get then finger print template and store in a db using base64 encoding and load it to the sensor for match. it should be 556 + 12 = 568 bytes with the headers
@drichardcarl Thank you. Unfortunately the link does not works, could be broken. Can you please share an alternative link?
@Try-Parser Can you please share the source code. Thank you
@drichardcarl the code has been added to the show_fingerprint_templates example! @Try-Parser please check out the example and send over a PR if you have some other code that may work for htis and we'll integrate it!
I get the error "no matching function for call to 'Adafruit_Fingerprint::Adafruit_Fingerprint(SoftwareSerial*)'
Is there a way to upload template into the sensor for matching ?
Yes, there is upChar in datasheets, but there isn't upChar function in the library...
Yes, I would like to have this function implemented, I tried to fix the library but doesn't work... Anyone can help me? I just opened a new issue
How to synchronize prints between two modules. Tell me please. For example, if I use two modules and one will fail. How do I make a module dump in order to unload it into a new module?
I'm doing this function, to put external templates into the flash memory of the sensor. This is the function:
uint8_t Adafruit_Fingerprint::downloadModel(uint16_t id, uint8_t packet_1[], uint8_t packet_2[], uint8_t packet_3[], uint8_t packet_4[], uint8_t slot) { uint8_t packet[] = {FINGERPRINT_DOWNLOAD, slot}; writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet); uint8_t len = getReply(recvPacket); uint8_t x; if ((len != 1) && (recvPacket[0] != FINGERPRINT_ACKPACKET)) return -1; if (recvPacket[1] == 0x00) { writePacket(theAddress, 0x02, 66, packet_1); writePacket(theAddress, 0x02, 66, packet_2); writePacket(theAddress, 0x02, 66, packet_3); writePacket(theAddress, 0x08, 66, packet_4); return recvPacket[1]; } else { return -1; } }
This works. You have to call this function in the arduino code and it saves the fingerprint to buffer1, later, you have to call the SaveModel function to save the template with the ID. But there is a problem. There is no control ACK packets for the datapackets you send, so you can't control if the entire template is reaching the sensor. The decumentations says nothing about it... so... really?? No ACK paquets for every datapacket?? The down Char functon it's totally useless without this control... You will never be able to put an entire template to buffer 1
Anyone found a solution to upload a template to the sensor?
@drichardcarl did you solve this problem, matching fingerprint templates data? I mean comparing data directly, without loading data in sensor...
Hi guys, Is there a way where I can get the ff:
- get the equivalent hash or byte value of my FP and send it over to the backend via Serial for saving to DB. 2.get the earlier FP template sent via Serial then use it for the Sensor to match against the current FP which i just put into the sensor?
My goal is to save the FP to the DB and later on retrieve via Arduino UNO and FP sensor to compare against different FP until matched.
Thanks
@mgonzaga1990,
you can do that, but, perhaps serial data rate, can take a lot of time if you need to search several FP's.
With 115200bps, you will be able to send 28 FP's/second, that's too slow!
We need a algorith to match FP template/char file.
@chhass I'm working on a project where the FP from the sensor should be saved in the database. I have a frontend (VB.NET) and backend (Java) and database connected to the backend.
the FP sensor is connected to the frontend via serial. While VB.net is connected to Java via RestAPI.
so initially, the user would sign in and register his FP (that's why i need the FP template and save it in the DB). then later on once the user has login using his FP. The FP stored in the DB will be used to compare against the FP template that he use to login.
I send to the fp-module the following package 0xEF01 0xFFFFFFFF 0x08 0x01 sum and it returns 0xEF01 0xFFFFFFFF 0x07 0x0003 0x00 0x000A (ack package saying "ready to transfer the following data packet") I wait 5 secs and starts reading the serial port but it only receives 0xEF01 0xFFFFFFFF 0x02 0x0042 (and 54 more bytes) it never sends more than that, no matter how much time I wait for the rest of the bytes.
I have 2 fp scanners and they both return the same
ps: I have the sysparam of the package size set to 64 I already tried 32, 128 and 256
Hi, I have my fingerprint sensor connected to my linux laptop using /dev/ttyUSB0. I am trying to upload a fingerprint template image from the sensor to the PC. This works fine using the UpChar() command.Then i try to dump the same data back to the fingerprint sensor using DownChar() and match it with the live finger using Match command.However the match command returns error( 0x01h: error when receiving data package).My packet length is set to 256.The data sent by the sensor exactly matches with the data sent to the sensor..I would really appreciate if someone could help me out...
Here is a snippet of my code for Downloading code from the laptop to the sensor. unsigned char DownChar(unsigned char * pDataBuffer,unsigned int bufferid,unsigned int buflen) {
unsigned char PLen=0x04;
unsigned char CheckSum=0;
unsigned int written = 0;
unsigned int packetLen=256;
memset(packet, 0, sizeof(packet));
memset(RecPacket, 0, sizeof(RecPacket));
memset(SendDataPacket1, 0, sizeof(SendDataPacket1));
memset(SendDataPacket2, 0, sizeof(SendDataPacket2));
CheckSum=CalCheckSum(PID,PLen,FINGERPRINT_DOWNCHAR,bufferid);
packet[0] = (FINGERPRINT_STARTCODE >> 8) & 0xFF;
packet[1] = FINGERPRINT_STARTCODE & 0xFF;
packet[2] = (theAddress >> 24) & 0xFF;
packet[3] = (theAddress >> 16) & 0xFF;
packet[4] = (theAddress >> 8) & 0xFF;
packet[5] = theAddress & 0xFF;
packet[6] = PID & 0xFF;
packet[7] = (PLen >> 8) & 0xFF;
packet[8] = PLen & 0xFF;
packet[9] = FINGERPRINT_DOWNCHAR & 0xFF;
packet[10] = bufferid;
packet[11]= (CheckSum >> 8) & 0xFF;
packet[12]= CheckSum & 0xFF;
while (buflen > packetLen){
PrepareDataPacket1(theAddress, FINGERPRINT_DATAPACKET, packetLen+2, pDataBuffer+written);
written += packetLen;
buflen -= packetLen;
}
PrepareDataPacket2(theAddress, FINGERPRINT_ENDDATAPACKET, buflen+2, pDataBuffer+written);
write(FPS,packet,sizeof(packet));
delay(1000);
read(FPS,RecPacket,sizeof(RecPacket));
delay(1000);
if (RecPacket[9] == 0x0){
write(FPS,SendDataPacket1,sizeof(SendDataPacket1));
write(FPS,SendDataPacket2,sizeof(SendDataPacket2));
}
}
I am also looking for a way to authenticate the captured fingerprint outside the FP sensor.
Hi dheeptuck, Did you have any luck with the DownChar() command? Whenever i write the data (Same data which i read using UpChar() command) back to the sensor it gives error( 0x01h: error when receiving data package).I have contacted the Rhydolabz support team but they have still not got back on this.
Any news on this?
Any Success for make use of DownChar?
Hi, @dheeptuck and everyone else interested in validating the "template" externally! I have been developing a solution for access control for a long time. However, a large majority of readers (financially viable) can not do external validation (servers - LINUX/Windows/MAC). What I have evaluated and accomplished is the work of a genius, named: Robert Važan - https://github.com/robertvazan/sourceafis-java Have a look, incredible!
Alhamdulillah, i have finished our Project for Research and Development for Fingerprint Module (with ZFM20 or DY50/FPM10A) This is include file C for Arduino and surely the libraries Enroll + Match + Upload Template + Show Template + Delete & Empty + Show Image Template + SFG Demo
So, i uploaded in github, you can visit it in https://github.com/hanifizzudinrahman/Module-Fingerprint-DY50-FPM10A