Skip to content
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

Template comparison #9

Open
nonthanut opened this issue Feb 9, 2016 · 97 comments
Open

Template comparison #9

nonthanut opened this issue Feb 9, 2016 · 97 comments

Comments

@nonthanut
Copy link

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.)

@kalyanisoholkar
Copy link

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..

@information-security
Copy link

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.

@alphashuro
Copy link

has anyone figured this out yet? i'm also trying to do this

@qwerty13
Copy link

qwerty13 commented Jul 19, 2017

It's my question too

@drichardcarl
Copy link

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.

@Obaid-ur-Rehman
Copy link

Please post a sample code to extract template.
I see there is no function to extract template in the library.
Thanks

@drichardcarl
Copy link

drichardcarl commented Nov 2, 2017

@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

@Try-Parser
Copy link

Try-Parser commented Nov 23, 2017

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

@Obaid-ur-Rehman
Copy link

@drichardcarl Thank you.
Unfortunately the link does not works, could be broken. Can you please share an alternative link?

@Obaid-ur-Rehman
Copy link

@Try-Parser Can you please share the source code. Thank you

@ladyada
Copy link
Member

ladyada commented Nov 28, 2017

@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!

@MeghanShark
Copy link

I get the error "no matching function for call to 'Adafruit_Fingerprint::Adafruit_Fingerprint(SoftwareSerial*)'

@vilipwong
Copy link

Is there a way to upload template into the sensor for matching ?

@qwerty13
Copy link

Yes, there is upChar in datasheets, but there isn't upChar function in the library...

@ricarduscat
Copy link

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

@one-player
Copy link

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?

@ricarduscat
Copy link

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

@marianodato
Copy link

Anyone found a solution to upload a template to the sensor?

@chhass
Copy link

chhass commented Mar 12, 2018

@drichardcarl did you solve this problem, matching fingerprint templates data?
I mean comparing data directly, without loading data in sensor...

@m-jayson
Copy link

Hi guys,
Is there a way where I can get the ff:

  1. 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

@chhass
Copy link

chhass commented Mar 13, 2018

@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.

@m-jayson
Copy link

@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.

@joseluissegura
Copy link

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

@kamsri81
Copy link

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));
  
    }

}

@dheeptuck
Copy link

I am also looking for a way to authenticate the captured fingerprint outside the FP sensor.

@kamsri81
Copy link

kamsri81 commented Jul 3, 2018

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.

@beerni
Copy link

beerni commented Aug 18, 2018

Any news on this?

@qwerty13
Copy link

qwerty13 commented Nov 4, 2018

Any Success for make use of DownChar?

@hanifizzudinrahman
Copy link

Use delay for uploading each packet and time of delay is greater than before (if can'nt)
If can'nt again change your baudrate module fingerprint (9600)
For example, here:

writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet);
	 delay(25);
	 writePacket(theAddress, FINGERPRINT_DATAPACKET, 128+2, packet2);
         delay(25);
	 writePacket(theAddress, FINGERPRINT_DATAPACKET, 128+2, packet3);
         delay(25);
	 writePacket(theAddress, FINGERPRINT_DATAPACKET, 128+2, packet4);
         delay(25);
	 writePacket(theAddress, FINGERPRINT_DATAPACKET, 128+2, packet5);
         delay(25);
	 writePacket(theAddress, FINGERPRINT_DATAPACKET, 128+2, packet6);
         delay(25);
	 writePacket(theAddress, FINGERPRINT_DATAPACKET, 128+2, packet7);

The buffer has a capacity of 512 bytes, you send 128 * 7 = 896 bytes - this is an error. You should have only 4 packets of 128 bytes 128 * 4 = 512

hmmm
but, in my program is working well.
have you the solution? so long time i didnt open my code again

@pattz1005
Copy link

external templates into the flash memory of the sensor. This is the

what is your getReply(recvPacket); ?

@pattz1005
Copy link

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

I'm trying to use your lib, but when it compile, it error

@hanifizzudinrahman
Copy link

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

I'm trying to use your lib, but when it compile, it error

Could you tell me what is an error?

@pattz1005
Copy link

pattz1005 commented May 28, 2020

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

I'm trying to use your lib, but when it compile, it error

Could you tell me what is an error?

now, I can fix it. It show that ";" was missing in getReply()
Other questions, 1. could you explain how is your "uploadModel" works? I have read the whole comment in here and still a bit confusing.

  1. when I try your get template i get
    uint8_t packet2[] = {03035B0E100183017B0000000000000000000000000000000000000000000000000000000000000000000000000000AA5101010101820000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000};
    uint8_t packet3[] = {00000000000000000000000000000000010000000F4500100100000000C2012001CDEF01FFFFFFFF02008203035415000120017F000000000000000000000000000000000000000000000000000000000000000000000000000000140005007300330CF33FFFFFFFFF3FEEAAAAAAAAAAAA654114545455511445540004400000};
    uint8_t packet4[] = {00000000000000000000000000000000000000000000000000000000000000000FAFEF01FFFFFFFF0200824813D71E5199991E499D169E0C43E13E602106FF472B56BF5FB64A1F33C147DF3E368A1C2EB54CFD2036E4FD23398B9B2040213B40B30A181EBDC91842308BB93131A77952C220394DC188B64A41DF973D2F8F3300};
    uint8_t packet5[] = {000000000000000000000000000000000000000000000000000000000000000021CEEF01FFFFFFFF08008200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000};

but when I try to print all of it without printing "uint8_t packet", I got 03035B0E100183017B0000000000000000000000000000000000000000000000000000000000000000000000000000FF4501010101FF0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000F4500100100000000C2012001CDEF01FFFFFFFF02008203035415000120017F000000000000000000000000000000000000000000000000000000000000000000000000000000140005007300330CF33FFFFFFFFF3FEEAAAAAAAAAAAA654114545455511445540004400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FAFEF01FFFFFFFF0200824813D71E5199991E499D169E0C43E13E602106FF472B56BF5FB64A1F33C147DF3E368A1C2EB54CFD2036E4FD23398B9B2040213B40B30A181EBDC91842308BB93131A77952C220394DC188B64A41DF973D2F8F33000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021CEEF01FFFFFFFF08008200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

the results are different, I want to know what happen?

@hanifizzudinrahman
Copy link

On UploadModel(), you can learn from the datasheet that I give it on the folder GitHub. And you can learn it by matching the code on Arduino.

When you comment on the code that prints the "uint8_t packet", it should only not print the "uint8_t packet" and will not change the template fingerprint.

@jendo42
Copy link

jendo42 commented Jun 2, 2020

Hello, do anybody know how are the finger templates encoded? Is there some kind of paper that documents the finger template format? I was searching thru some datasheets of these compatible "chinese" fingerprint sensors but I think technically are all the same. I would like to offload finger detection and search routines to higher system - away from sensor because it's capacity is not enough to serve in production environment.

@FrancXPT
Copy link

Hi did anyone find a way to offload the finger detection to another system the capacity is not enough.

@rickyanwar
Copy link

Anybody know how to store fingerprint image?
Because with limited storage of sensor need to save finger print data on web

@Abedi98
Copy link

Abedi98 commented Apr 10, 2021

Hello . Friends who were able to fix this problem, please share your information so that I can solve this problem as well.
I want to store the fingerprint information in the server (mysql) and everything is stored and checked in the server.
Has anyone been able to solve this problem?
Thankful

@Abedi98
Copy link

Abedi98 commented Apr 11, 2021

What can the data given in the show_fingerprint_template example be used for?

@hanifizzudinrahman
Copy link

hanifizzudinrahman commented Apr 12, 2021 via email

@Abedi98
Copy link

Abedi98 commented Apr 12, 2021

It give the template of your fingerprint, every module have different amount of data

On Sun, Apr 11, 2021 at 7:44 PM Hossein Abedi @.***> wrote: What can the data given in the show_fingerprint_template example be used for? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#9 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMXTE3B473TPHNCYZPBFKLTIGKSLANCNFSM4B22KJ7Q .

Can I save this fingerprint template in the database and perform fingerprint recognition in my personal application?

@hanifizzudinrahman
Copy link

hanifizzudinrahman commented Apr 13, 2021 via email

@Abedi98
Copy link

Abedi98 commented Apr 13, 2021

Yes, you can save it the fingerprint template to database, but to perform fingerprint recognition in database, you must create your own algorithm. Because all this time, matching process is on the module fingerprint On Mon, Apr 12, 2021 at 10:53 AM Hossein Abedi @.> wrote:

It give the template of your fingerprint, every module have different amount of data … <#m_1860978676421871125_> On Sun, Apr 11, 2021 at 7:44 PM Hossein Abedi @.
> wrote: What can the data given in the show_fingerprint_template example be used for? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#9 (comment) <#9 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMXTE3B473TPHNCYZPBFKLTIGKSLANCNFSM4B22KJ7Q . Can I save this fingerprint template in the database and perform fingerprint recognition in my personal application? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#9 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALMXTE6X3BTVRGJQ7IXZMQTTIJVCLANCNFSM4B22KJ7Q .

Well, I think it is better to do fingerprint recognition in the same module.
I just want to know if I keep the template of each finger in the server, if in the future the fingerprint module is lost for any reason and I wanted to change the module, I can put the template information of each finger stored in the server in the new module. Without redefining the fingers for the new module from scratch.
is it possible ? If so, please help

Thanks

@Abedi98
Copy link

Abedi98 commented Apr 13, 2021

And in this example, how do I print the fingerprint on the module?

https://github.com/adafruit/Adafruit-Fingerprint-Sensor-Library/blob/master/examples/fingerprint/fingerprint.ino

@hanifizzudinrahman
Copy link

hanifizzudinrahman commented Apr 16, 2021 via email

@adafruit adafruit deleted a comment from Arpit-exe Jun 2, 2021
@hashmak
Copy link

hashmak commented Nov 8, 2021

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.


There's a SDK named SFGDemo which tests fingerprint capture from sensor, storing it and matching it. it has other features as well

SFGDemo

@danial2016
Copy link

I have the same problem as Abedi. The storage on the sensor is too small to enroll many fingerprints, so I'd like to save them externally. So has anyone found a way to upload an extracted template to the sensor just for matching?

@Gitare420
Copy link

@hanifizzudinrahman Hello, Does your library help me to copy all the fingerprints of a reader and copy them in another reader? And if so, how could I do it?

Thank you very much in advance and greetings from Chile :)

@hanifizzudinrahman
Copy link

I've already solved this problem. What module do you use?

@hanifizzudinrahman
Copy link

Yes bro, u can do it by download the template, than upload it to another module. Btw, what module do you use?

@Gitare420
Copy link

Could you tell me which examples should I use and in what order exactly please?
I use the 071405 model, it is the least used from what I have seen so it may be the reason why it does not work for me.

@dhsont
Copy link

dhsont commented Oct 19, 2022

Yes bro, u can do it by download the template, than upload it to another module. Btw, what module do you use?

Hi @hanifizzudinrahman
I use R307 module

I want to copy all the fingerprints of a R307 module in another R307 module.

@Gitare420
Copy link

I have modified and combined adafruit's enroll code with show fingerprint template to generate a workable code which scans a finger gets the image and converts it to a template and upload it to the serial monitor. Successfully

Can you please share your code here?

In a few hours I will have access to my pc and I will be able to share the code

@Gitare420
Copy link

I have modified and combined adafruit's enroll code with show fingerprint template to generate a workable code which scans a finger gets the image and converts it to a template and upload it to the serial monitor. Successfully

Can you please share your code here?

I use an esp32, for an arduino you must change the serial2 part for softwareserial.

#include <Adafruit_Fingerprint.h>
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&Serial2);

String Template;

uint8_t f_buf[512]; //here is where the template data is sotred
uint8_t id;
char Button;
int Condition_Read_Finger = '1';

void store_template_to_buf() {

Serial.println("Waiting for valid finger....");
while (finger.getImage() != FINGERPRINT_OK) { // press down a finger take 1st image
}
Serial.println("Image taken");

if (finger.image2Tz(1) == FINGERPRINT_OK) { //creating the charecter file for 1st image
Serial.println("Image converted");
} else {
Serial.println("Conversion error");
return;
}

Serial.println("Remove finger");
delay(2000);
uint8_t p = 0;
while (p != FINGERPRINT_NOFINGER) {
p = finger.getImage();
}

Serial.println("Place same finger again, waiting....");
while (finger.getImage() != FINGERPRINT_OK) { // press the same finger again to take 2nd image
}
Serial.println("Image taken");

if (finger.image2Tz(2) == FINGERPRINT_OK) { //creating the charecter file for 2nd image
Serial.println("Image converted");
} else {
Serial.println("Conversion error");
return;
}

Serial.println("Creating model...");

if (finger.createModel() == FINGERPRINT_OK) { //creating the template from the 2 charecter files and saving it to char buffer 1
Serial.println("Prints matched!");
Serial.println("Template created");
} else {
Serial.println("Template not build");
return;
}

Serial.println("Attempting to get template...");
if (finger.getModel() == FINGERPRINT_OK) { //requesting sensor to transfer the template data to upper computer (this microcontroller)
Serial.println("Transferring Template....");
} else {
Serial.println("Failed to transfer template");
return;
}

if (finger.get_template_buffer(512, f_buf) == FINGERPRINT_OK) { //read the template data from sensor and save it to buffer f_buf
Serial.println("Template data (comma sperated HEX):");
for (int k = 0; k < (512 / finger.packet_len); k++) { //printing out the template data in seperate rows, where row-length = packet_length
for (int l = 0; l < finger.packet_len; l++) {
Serial.print("0x");
Serial.print(f_buf[(k * finger.packet_len) + l], HEX);
Serial.print(",");
}
Serial.println("");
}
}
Condition_Read_Finger = '1';
}

void setup() {
Serial.begin(115200);
finger.begin(57600); //set your sensor's baudrate
if (finger.verifyPassword()) {
Serial.println("Found fingerprint sensor!");
} else {
Serial.println("Did not find fingerprint sensor :(");
while (1);
}

Serial.print("write 't' to the serial monitor followed by the 'id' ");
Serial.println("EXAMPLE 't21' for id 21");

Serial.println("write 'Y' in the serial monitor to delete all fingerprints");
}

void loop()
{
if (Condition_Read_Finger == '1') {
getFingerprintID();
delay(50); //don't ned to run this at full speed.
}

if (Serial.available() != 0) {
Button = Serial.read();

if (Button == 't') {
  Template = "";
  Condition_Read_Finger = '0';
  id = Serial.parseInt();
  Serial.print("Enrolling ID #");
  Serial.println(id);
  store_template_to_buf();
}

if (Button == 'Y') {
  finger.emptyDatabase();
  Serial.println("Now database is empty :)");
}

}
}

uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
return p;
}

// OK success!

p = finger.image2Tz();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
}

// OK converted!
p = finger.fingerSearch();
if (p == FINGERPRINT_OK) {
Serial.println("Found a print match!");
} else if (p == FINGERPRINT_NOTFOUND) {
Serial.println("Did not find a match");
return p;
} else {
Serial.println("Unknown error");
return p;
}

// found a match!
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);

return finger.fingerID;
}

// returns -1 if failed, otherwise returns ID #
int getFingerprintIDez() {
uint8_t p = finger.getImage();
if (p != FINGERPRINT_OK) return -1;

p = finger.image2Tz();
if (p != FINGERPRINT_OK) return -1;

p = finger.fingerFastSearch();
if (p != FINGERPRINT_OK) return -1;

// found a match!
Serial.print("Found ID #"); Serial.print(finger.fingerID);
Serial.print(" with confidence of "); Serial.println(finger.confidence);
return finger.fingerID;
}

@UtkarshDeoli
Copy link

@Gitare420 it gives error

if (finger.get_template_buffer(512, f_buf) == FINGERPRINT_OK) { //read the template data from sensor and save it to buffer f_buf
            ^~~~~~~~~~~~~~~~~~~
            getTemplateCount

exit status 1

Compilation error: 'class Adafruit_Fingerprint' has no member named 'get_template_buffer'; did you mean 'getTemplateCount'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests