How to read/get Fingerprint unique id

Hello. This is my first post in this forum, i hope i'm doing right by posting this subject here :slight_smile:

I have Arduino UNO R3 and a module fingerprint scanner GT-511C1R. I'm planning to combine the fingerprint scanner with php mysql database through the Internet using ethernet shield. So to get this works, my idea is i'll read the unique ID of each fingerprint, then send that id to my php script. Maybe the concept is like RFID. As you know every RFID card has its own unique ID.

The point is, i don't want to store/enroll the fingerprint ID in my arduino because i will store it in mysql. I don't ask about the php, mysql, ethernet shield, or others. But only how i can read/get each of fingerprint unique id.

I've searched on many websites like instructables and also in this forum, all of them always give tutorial about enrolling the fingerprint ID in Arduino. None of them tell how to get the unique ID of each fingerprint.

Any help would be appreciated :slight_smile:

can anyone help me ? :slight_smile:

You may be making some false assumptions here, which is why you haven't had much response.

  1. The fingerprints are stored in the scanner itself, not the Arduino.

  2. A fingerprint doesn't have a "unique ID" in the same sense that an RFID has. During enrollment, there is an algorithm that analyses a number of fingerprint images (of the same finger) to extract recognisable features (i.e. patterns in the image) that are subsequently used during the recognition stage. So when an "unknown" finger is presented, a pattern matching algorithm is used to compare the unknown fingerprint with the database of known fingerprints to find a match with an acceptable level of certainty.

The database of fingerprints, their extracted features and the matching algorithm are all on the scanner unit.

Does this help clarify things?

In other words the scanner has its own database, you have to upload information to the
unit to identify each print during the "training" stage, then you will get back IDs from the
unit when it matchs, those IDs may be assignable during training, or assigned by the
unit itself, so you have to record them in your database during training (aka "enrollment")

So what does the manual for the unit say about this?

thank you for your answer.

i know that the fingerprint has its own database, but the database is very limited (it says that can only store 20 fingerprint). :smiley:

i've read this topic :

http://forum.arduino.cc/index.php?topic=45166.0

at post #7 he said that that HEX code was from the fingerprint. Isn't that the unique code ? Or it is not?

Also at post #27 he said :

And this is how the communication between scanner and Arduino has to be:

Arduino sends:
EF01FFFFFFFF010003010005

Scanner sends:
EF01FFFFFFFF07000302000C (wrong match!)
or
EF01FFFFFFFF07000300000A (match ok!)

computer sends: (when match ok!)
EF01FFFFFFFF01000402010008 (accept,13)

Scanner sends:
EF01FFFFFFFF07000300000A

computer sends:
EF01FFFFFFFF0100080401000000790087 (accept2,17)

Scanner sends:
EF01FFFFFFFF07000700000000A400B2 (id1)
or
EF01FFFFFFFF07000700000200B200C2 (id3)
or
EF01FFFFFFFF07000700000300CC00DD (id4)
or
EF01FFFFFFFF07000700000600A800BC (id7)
etc....

What are those codes mean? I mean these :

EF01FFFFFFFF07000700000000A400B2 (id1)
or
EF01FFFFFFFF07000700000200B200C2 (id3)
or
EF01FFFFFFFF07000700000300CC00DD (id4)
or
EF01FFFFFFFF07000700000600A800BC (id7)

And also Mark, you said : those IDs may be assignable during training, or assigned by the
unit itself, so you have to record them in your database during training

Is "may be assignable during training" means what i mean (i mean i can assign the ID to my mysql database) ?

I'm sorry'm a newbie. Please correct if i'm wrong. Thank you very much :slight_smile:

after a lot of searching, i think now i know what is "the unique ID" of each of the fingerprint that stored into fingerprint module. It called a "Template".

If we enroll a fingerprint, the fingerprint module will store the image and the template of that fingerprint. And based on this Josh Hawley's library https://github.com/sparkfun/Fingerprint_Scanner-TTL/blob/master/FPS_GT511C3/FPS_GT511C3.h :

// Gets a template from the fps (498 bytes) in 4 Data_Packets
// Use StartDataDownload, and then GetNextDataPacket until done
// Parameter: 0-199 ID number
// Returns:
// 0 - ACK Download starting
// 1 - Invalid position
// 2 - ID not used (no template to download
// Not implemented due to memory restrictions on the arduino
// may revisit this if I find a need for it
//int GetTemplate(int id);

It is a 498 bytes data, and can be gotten with this GetTemplate function.

I think i'll try this and post the result soon here.

A template is not a unique ID. Its a list of features of the fingerprint image(s) and their
relative position/orientation. You have to run a (probabalistic) matching algorithm between
two templates, which is compute-intensive.

MarkT:
A template is not a unique ID. Its a list of features of the fingerprint image(s) and their
relative position/orientation. You have to run a (probabalistic) matching algorithm between
two templates, which is compute-intensive.

thank you for your reply.

until this time, i still haven't try this and of course i also still don't know what the template looks like.

I think the concept is, after we have enrolled one finger, then the fingerprint scanner will store a template and an image of the finger to its database. so, if you say a template is a list of features of the fingerprint image(s) and their relative position/orientation, what does it looks like?

In the library, josh hawley said :

// Gets a template from the fps (498 bytes) in 4 Data_Packets

What the 498 bytes looks like? Because i think it's like a series of hexa or number.

Please correct me if i'm wrong.

I think the concept is, after we have enrolled one finger, then the fingerprint scanner will store a template and an image of the finger to its database. so, if you say a template is a list of features of the fingerprint image(s) and their relative position/orientation, what does it looks like?

As MarkT says, it's the result of analysis done on a fingerprint image to identify enough features and their locations to be able to compare two templates and decide whether they refer to the same finger. That data is quite likely held in some proprietary form and won't be easily human readable.

What the 498 bytes looks like? Because i think it's like a series of hexa or number.

Pull them from the device and serial.Print them. I suspect you'll have quite a task deducing what they mean unless you can find the manufacturer's documentation.

It seems that you wish to extend the use of your scanner to recognize more fingerprints - hence the need to store them in a database. It's not trivial though. It looks like you can use SetTemplate to pass a template to the device so you could in theory shuffle templates through the device twenty at a time and have it tell you if it matches any of them to the one you're seeking.

Personally, I'd be more inclined to upgrade to the scanner's big brother - assuming 200 prints is enough.

All you need to do if you want to see the templates is to hook up a TTL-USB converter to the scanner and use the free Windows software in the Sparkfun link to view/save/inspect the raw images, template data etc.

That's what I did, even before connecting it to the Arduino. Here's a sample of my fingerprint attached.

image.png

wildbill:
It seems that you wish to extend the use of your scanner to recognize more fingerprints - hence the need to store them in a database. It's not trivial though. It looks like you can use SetTemplate to pass a template to the device so you could in theory shuffle templates through the device twenty at a time and have it tell you if it matches any of them to the one you're seeking.

Yes this is exactly what i want :smiley: but, i still need a separated database because i dont want just to check is the id exist or not, but i want to do another various checking. Also i want to make all of my fingerprint scanner have one centralized database.

But okay. Thank you for any advice and clarification you all people give to me. And based on all replies, i feel like i make something wrong here.

So is the conclusion i really can't make the figer print scanner works with a separated databases? Because i think that my program will only work if i can get something unique from the fingerprint scanner and send it to my php program.

Or can anybody give me alternate solutions to make this works?

To do exactly what you want, I think you would need to reverse engineer the template format and reinvent the comparison algorithm that determines whether two templates are considered the same.

Alternatively, if two hundred fingerprints were enough and you used the better scanner, you could enroll people at your master scanner, which you would have to do anyway so that you could associate a person with their print. Then push their template to the same slot in every other scanner. Then the 0-199 ID returned from each scanner would be the same whichever one that person used.

If neither of those serves, perhaps a different scanner would give better options.

It may use ISO standard templates (with or without proprietry extensions). You pay a lot
of money to get the relevant ISO standard alas (grrr), but this paper has most of
the information you need I am led to believe:

[ I should add that the Univ. of Bologna has some great resources on biometrics:
http://biolab.csr.unibo.it/Research.asp

It's possible connect to another db?

hello guys i am unable to get the id number of a finger print.actually i have enrolled an id of a finger print as 12 but in the output it is printing my id as 0,
i'm unable to find where the bug is?

/***************************************************
This is an example sketch for our optical Fingerprint sensor

Designed specifically to work with the Adafruit BMP085 Breakout
----> Fingerprint sensor : ID 751 : $49.95 : Adafruit Industries, Unique & fun DIY electronics and kits

These displays use TTL Serial to communicate, 2 pins are required to
interface
Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada for Adafruit Industries.
BSD license, all text above must be included in any redistribution
****************************************************/

#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>

int getFingerprintIDez();

// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
SoftwareSerial mySerial(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup()
{
Serial.begin(9600);
Serial.println("fingertest");

// set the data rate for the sensor serial port
finger.begin(57600);

if (finger.verifyPassword()) {
Serial.println("Found fingerprint sensor!");
} else {
Serial.println("Did not find fingerprint sensor :(");
while (1);
}
Serial.println("Waiting for valid finger...");
}

void loop() // run over and over again
{
getFingerprintID();
delay(500); //don't ned to run this at full speed.
}

uint8_t getFingerprintID() {
uint8_t p = finger.getImage();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image taken");
break;
case FINGERPRINT_NOFINGER:
Serial.println("No finger detected");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_IMAGEFAIL:
Serial.println("Imaging error");
return p;
default:
Serial.println("Unknown error");
return p;
}

// OK success!

p = finger.image2Tz();
switch (p) {
case FINGERPRINT_OK:
Serial.println("Image converted");
break;
case FINGERPRINT_IMAGEMESS:
Serial.println("Image too messy");
return p;
case FINGERPRINT_PACKETRECIEVEERR:
Serial.println("Communication error");
return p;
case FINGERPRINT_FEATUREFAIL:
Serial.println("Could not find fingerprint features");
return p;
case FINGERPRINT_INVALIDIMAGE:
Serial.println("Could not find fingerprint features");
return p;
default:
Serial.println("Unknown error");
return p;
}

// OK converted!
p = finger.fingerFastSearch();
if (p == FINGERPRINT_OK) {
Serial.println("Found a print match!");
} else if (p == FINGERPRINT_PACKETRECIEVEERR) {
Serial.println("Communication error");
return p;
} 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);
}

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

Hi.

Use the data that fingerprint reader gives you and save it in ISO format (just a recommendation): ISO/IEC 19794-2:2005 - Information technology — Biometric data interchange formats — Part 2: Finger minutiae data

Then you can save that in database maybe as string field, and also in the table create an unique id, can be the fingerprint owner id or generate by yourself.

Is it compatible with CAMA-SM20 arduino?

can anyone tell m how we can store the data(templates) of fingerprint module into sd card

Any update rizal bro?