0

Fingerprint question
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: Fingerprint question

by Rj_Viki on Mon Jan 23, 2017 3:10 am

I still cant fingure out how your library file works
Could you please explain the steps in simple procedure ?

Rj_Viki
 
Posts: 23
Joined: Wed Jan 18, 2017 2:10 am

Re: Fingerprint question

by adafruit_support_rick on Mon Jan 23, 2017 5:21 am

To enroll a fingerprint, call the following functions in order
fingerprint. getImage(); //scan finger
fingerprint. image2Tz(1); //extract image features into buffer #1
fingerprint. getImage() //scan finger again
fingerprint. image2Tz(2) //extract image features into buffer #2
fingerprint.createModel() //create match template from features
fingerprint. storeModel(ID); //store template as ID number

To match a fingerprint, call the following functions in order:
fingerprint. getImage(); //scan finger
fingerprint. image2Tz(); //extract image features
fingerprint.fingerFastSearch(); //perform match. Return ID.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Fingerprint question

by RAMEELALI123 on Thu Jan 26, 2017 8:35 am

please help me i want to extract the geryscale image after enrolling.

RAMEELALI123
 
Posts: 4
Joined: Thu Jan 26, 2017 8:21 am

Re: Fingerprint question

by Rj_Viki on Thu Feb 02, 2017 1:49 am

Hi RAMEELALI123,
Use SFGDemo software to save the image after enrolling it .

Rj_Viki
 
Posts: 23
Joined: Wed Jan 18, 2017 2:10 am

Re: Fingerprint question

by Rj_Viki on Fri Feb 03, 2017 3:59 am

Is the data getting stored in Buffer 1 and Buffer 2 are image file or some other data file ?
If it is a data file , how cold I be able to print it in Serial Monitor ? what is the command to print it ?

Rj_Viki
 
Posts: 23
Joined: Wed Jan 18, 2017 2:10 am

Re: Fingerprint question

by adafruit_support_rick on Fri Feb 03, 2017 9:12 am

The sensor has one Image Buffer, and two "character buffers". The sensor performs its feature extraction algorithm on the image to build a "template" in one of the character buffers.
Don Jeronimo's software uploads the template data to the computer. I believe he also echoes it to the Serial Monitor.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Fingerprint question

by Rj_Viki on Mon Feb 06, 2017 2:06 am

How to save image directly using the arduino code ,
Right now I am using another customized library to save image directly from the module without using the software , but that needs to run a python script to be running to save image .
Can i save the image just by using Arduino scketch ? if Yes , How to do it ?
--------------------------------------------------------------------------------------------------------------------------------
If there is any other method like How to work with the module if I am using USB to connect to my system ?
(Vcc , D+ , D- , Gnd )
- how to program the module to send a command to get image and save it in a folder
--------------------------------------------------------------------------------------------------------------------------------

This is the .cpp which to send image to PC
Code: Select all | TOGGLE FULL SIZE
// download fingerprint image to pc
uint8_t Adafruit_Fingerprint::sendImage(){
   uint8_t packet[] = {FINGERPRINT_IMGUPLOAD};
    writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet);
    uint16_t len = getReply(packet);
   
    if ((len != 1) || (packet[0] != FINGERPRINT_ACKPACKET)){
        return -1;
    }
    Serial.print('\t');   // signifies start of data packet to pc
    int count = 0;       // counts the number of data packets received
    while (packet[0] != FINGERPRINT_ENDDATAPACKET){
       uint16_t len = getReply(packet, DATA);
       count++;
       if ((packet[0] != FINGERPRINT_DATAPACKET) && (packet[0] != FINGERPRINT_ENDDATAPACKET)){
          return -1;
       }
    }
    Serial.println(count);   // reports number of bytes received
    return 1;
}


This is the Arduino sketch for imagetoPC

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
SoftwareSerial myser(2, 3);

Adafruit_Fingerprint finger = Adafruit_Fingerprint(&myser);
void setup() {
  Serial.begin(57600);
  finger.begin(57600);
  if (finger.verifyPassword()){
    Serial.println("Fingerprint sensor detected");
  }
  else {
    Serial.println("Sensor was not detected!");
    while (1);
  }
 delay(100);
}

void loop() {
  sendtoPC();
  delay(100);
}

void sendtoPC(){
  int p = -1;
  Serial.println("Waiting for valid finger");
  while (p != FINGERPRINT_OK) {
    p = finger.getImage();
    switch (p) {
    case FINGERPRINT_OK:
      Serial.println("Image taken");
      break;
    case FINGERPRINT_NOFINGER:
      Serial.println(".");
      break;
    case FINGERPRINT_PACKETRECIEVEERR:
      Serial.println("Communication error");
      break;
    case FINGERPRINT_IMAGEFAIL:
      Serial.println("Imaging error");
      break;
    default:
      Serial.println("Unknown error");
      break;
    }
  }

  Serial.println("Remove finger");
  delay(1000);
  p = finger.sendImage();
  if (p == -1){
    Serial.println("Error sending image.");
  }
  else if (p == 1){
    Serial.println("Image sent.");
  }
}


https://drive.google.com/file/d/0B-903x23TTkaajRrSVhDSE9ONWs/view this is the library file I am using

Rj_Viki
 
Posts: 23
Joined: Wed Jan 18, 2017 2:10 am

Re: Fingerprint question

by adafruit_support_rick on Mon Feb 06, 2017 9:08 am

I don't have any code that will save the image on arduino. Your sendImage function doesn't look like it does anything like that. I don't know what it's supposed to do.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Fingerprint question

by Rj_Viki on Mon Feb 06, 2017 9:20 am

Okay ,
I am using USD to Serial convertor to connect the module to my PC directly ,is it possible to give instruction and make the module respond for it ? and How to do it ?

Rj_Viki
 
Posts: 23
Joined: Wed Jan 18, 2017 2:10 am

Re: Fingerprint question

by adafruit_support_rick on Tue Feb 07, 2017 8:57 am

The sensor is controlled by commands sent over serial. This is what the adafruit library does. You will have to write a PC app that does the same thing as the Adafruit library. If you write your app in C++, you can use the adafruit code largely unchanged.

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Fingerprint question

by Vishal1605 on Sun Feb 12, 2017 1:25 pm

When I store one fingerprint using 'enroll' sketch, It gets store with ID#0 (irrespective of which Id I type in serial monitor) and when I try to store another fingerprint the previous fingerprint gets overwritten and new fingerprint is also stored with ID#0. Please help me How can I store multiple fingerprints using enroll sketch?

Vishal1605
 
Posts: 1
Joined: Sun Feb 12, 2017 1:22 pm

Re: Fingerprint question

by adafruit_support_rick on Mon Feb 13, 2017 9:49 am

Make sure you're using the latest version of the Fingerprint library.
Alo, make sure you have Serial Monitor set to send both CR and NL. There's a dropdown at the bottom of the serial monitor window

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Fingerprint question

by Rj_Viki on Tue Feb 28, 2017 6:12 am

As I was working with this fingerprint i found something that if we are using Arduino code to extract image byte data I am getting 36865 bytes.
But if I am using USBtoSerial convertor to get image byte data directly from Fingerprint module I am getting 40044 bytes where does these extra 3179 bytes comes from ?
How do i exclude them ? will these data will be in the front of at last ?

Rj_Viki
 
Posts: 23
Joined: Wed Jan 18, 2017 2:10 am

Re: Fingerprint question

by adafruit_support_rick on Tue Feb 28, 2017 10:03 am

Honestly, I don't know. You're far beyond what I know about the fingerprint sensor. What happens if you try to display the image data?

adafruit_support_rick
 
Posts: 35095
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Fingerprint question

by aclecio_ul on Sat Mar 04, 2017 8:16 pm

How do I get back to the factory setting of the player?

aclecio_ul
 
Posts: 3
Joined: Sat Mar 04, 2017 8:15 pm

Please be positive and constructive with your questions and comments.