Git Product home page Git Product logo

fpm's Introduction

FPM

This is an Arduino library for most of the FPMxx/R30x/ZFMxx/R551 optical fingerprint sensors.
(See notes below.)

There are several examples included to demonstrate usage -- the enroll example is a great place to start, especially if you have an ESP32.
(This is because ESP32 requires usage of its HardwareSerial ports, since the Arduino ESP32 core doesn't support SoftwareSerial. The enroll example shows how to setup those ports, guarded under the macro ARDUINO_ARCH_ESP32.)

Also included is a Python 3 script for extracting fingerprint images to a PC over a Virtual COM port. To use it:

  • The image_to_pc example must first be uploaded to the Arduino, which is connected to the sensor.
  • The script requires the pyserial Python package, so you need to install that first with pip3 install pyserial on your command line.
  • Run python3 getImage.py -h to see general usage help. (For instance, usage on Windows could look like this: python3 getImage.py COM3 57600 print.bmp)

To get the most reliability with SoftwareSerial, baud rates should not exceed 57600, especially during sustained data transfers e.g. extracting fingerprint images. (This recommendation is based off old tests with an Arduino Uno -- more powerful chips like the ESPxxxx may be able to handle higher rates just fine. Test and find out.)

A generic list of commands for these sensors can be found here. Keep in mind that not all sensors (few, really) support all commands. You'll just have to try them out for yourself.
To match templates on your PC/server, check here.
A device-agnostic version of this library in C.
An Arduino library for the GT511C3 (and similar GT5x) fingerprint sensors.\

Notes

  • The R308 sensor is tentatively supported for now. Since its settings cannot be read by the usual commands, they have to be set manually to defaults based on the datasheet, at the risk that these defaults may be wrong. In any case, make sure to check the setup() of the R308_search_database example for how to properly initialize your sensor.

  • The R551 seems to have several clones, and a datasheet/SDK that's inconsistent with the sensor's actual behaviour. To use one of these sensors, make sure to uncomment FPM_R551_MODULE in FPM.h.
    Despite that, you may still encounter problems, especially with more advanced functionality like image/template downloads. So instead, you may want to buy an FPM10, R305/7, ZFM60 or R503. Naturally, caveat emptor.

  • If you have an ESP32, the enroll example already shows how to setup the HardwareSerial ports, so this is basically clearer repetition:

#include <HardwareSerial.h>
#include <fpm.h>

/* select UART1 */
HardwareSerial fserial(1);

FPM finger(&fserial);
FPMSystemParams params;

void setup(void) {
    Serial.begin(57600);
    
    /* ESP32 RX = IO25, TX = IO32 */
    fserial.begin(57600, SERIAL_8N1, 25, 32);
    
    /* the rest of the code follows, same as in the examples */
    if (finger.begin()) {
        ...
    }
}

void loop(void) {
    ...
}

fpm's People

Contributors

brianrho avatar oskarn97 avatar seeers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fpm's Issues

R302/R551 Did not find fingerprint sensor

[+]Response timeout

Did not find fingerprint sensor :(

I tried switching RX/TX and Adafruit example even. (pin 2 and 3, Arduino Micro)
Based on closed issue, I tried using set_password example as well.

Nothing seems to work. If anyone can suggest some troubleshooting suggestions, I'd really appreciate it.

R551 sensor does not get right image imgae_to_pc

python output:
----------Extract Fingerprint Image------------

Options:
Press 1 to enter serial port settings
Press 2 to scan a fingerprint and save the image
Press 3 to view help
Press 4 to exit

1

Enter Arduino serial port number: COM3
Enter serial port baud rate: 57600

Options:
Press 1 to enter serial port settings
Press 2 to scan a fingerprint and save the image
Press 3 to view help
Press 4 to exit

2

Enter filename/path of output file (without extension): asd
SEND IMAGE TO PC test

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 17
0 0 0 0 0 1 F4 0 3 FF FF FF FF 0 2 0 6
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 17
0 0 0 0 0 1 F4 0 3 FF FF FF FF 0 2 0 6
[+]Read complete
Found fingerprint sensor!
Capacity: 500
Packet length: 128

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 17
0 0 0 0 0 1 F4 0 3 FF FF FF FF 0 2 0 6
[+]Read complete
Packet length set to 128 bytes
Waiting for a finger...

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
2
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0
[+]Read complete
Image taken

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0
[+]Read complete
Starting image stream...
Image saved as asd.bmp
FF FF FF FF FF FF FF FF FF FF FF FF FF EF �1 FF FF FF FF �2 0 82 FF FF FF FF

Picture is this:

asd

Arduino seriam monitor shows this:
[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x2
[+]Length: 128
⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮FF ⸮EF �1 ⸮FF ⸮FF ⸮FF ⸮FF �2
Read data failed: -1

Error receiving packet 67

R551 Did not find fingerprint sensor :(

Hie,
I have purchased a R551 sensor it was working nice when I uploaded some of the codes and was able to save the fingerprints and access those templates, but all of the sudden it stopped working and I am getting the message "Did not find fingerprint sensor :(" on the serial monitor.
If anyone knows how to solve the issue please help me out.
Thanks in advance

Can not connect AS608 to Arduino UNO

Hello! Thanks for your useful code, but I seem meet some problems. I try to solve it by searching much website by failed.
I use Arduino UNO to control the AS608, when I upload the enroll example code, I get some mistake:

Adafruit Fingerprint sensor enrollment
Did not find fingerprint sensor :(

On the other hand, I try the same program on Arduino Nano. Its mistake is same to UNO's.

And I have check my line connection, it seems without problems:

  • Green link to 2
  • White link to 3
  • VDD link to 3.3v
  • GND link to GND

I try to put finger.begin(57600); into loop function, but it is helpless.

My main program is the enroll code which in example folder

Hope I can get some useful suggestions to solve my problems, thanks!

Wrong read length on POST request

Hi, it's me again, first of all, sorry for not texting you back, I was awaiting for my arduino mega, since uno didn't had enough memory to run the code so couldn't test it until yesterday. I think the code is almost done, when my readers are correct (with the println() before the --X-ARDUINO_MULTIPART), it cannot read the fingerprint correctly, every time I get a error of wrong read length: -1, sometimes it says packet to long: 130, but it's rare. I don't know why this is happening, my server responds with unexpected end of file, so I know that at least one chunk of the file is being send. My code is:

uint16_t count = 0;
bool read_finished;
/* indicate the max size to read, and also returns how much was actually read */
uint16_t readlen = TRANSFER_SZ;

client.println("POST /post HTTP/1.1");
client.println("Host: 192.168.1.107");
client.println("Content-Type: multipart/form-data; boundary=X-ARDUINO_MULTIPART");
client.println("Connection: close");
client.println("Content-Length: 36864");
client.println();
client.println("--X-ARDUINO_MULTIPART");

while (true) {
  bool ret = finger.readRaw(FPM_OUTPUT_TO_BUFFER, buffer, &read_finished, &readlen);
  if (ret) {
    count++;
    client.println("Content-Disposition: form-data; name=\"blah.bmp\"");
    client.println("Content-Type: application/octet-stream");
    client.print("Content-Length: ");
    client.println(readlen);
    client.println();
    client.write(buffer, readlen);

    /* indicate the length to be read next time like before */
    readlen = TRANSFER_SZ;
    if (read_finished){
      client.println();
      client.println("--X-ARDUINO_MULTIPART--");
      client.println();
      client.flush();
      break;
    }
    client.println();
    client.println("--X-ARDUINO_MULTIPART");
    client.flush();
  }
  else {
    Serial.print("\r\nError receiving packet ");
    Serial.println(count);
    return;
  }
  yield();
}

I think that could help. My serial monitor messages:

Image taken
Starting image stream...

[+]Wrong chksum: 0x9444
[+]Response timeout

[+]Wrong read length: -1

Error receiving packet 29

Also, thanks a lot for the help, I didn't had any idea of how could I post the image, if I progress sometime, I will notify here.

A better translated version of datasheet?

Hi, I have read the datasheet manual linked in the README.md file, and it looks wired on my computer, so I did a little search and found out that maybe the original version of that datasheet file is this one from adafruit website. And now since adafruit provides a translated version of the user manual, could you please update the link so it points to a relatively better version of user manual?

And here is the link to adafruit's download page: https://learn.adafruit.com/adafruit-optical-fingerprint-sensor/downloads
Doing fingerprint-related development is a little harder due to lack of documents. 😂 I would suggest to add that link in README file too to provide more information.

R503 led_control problem

hi please help me R503 sensor led_control problem "no matching function for call to 'FPM :: led_control ()' '

Uploading image to R305

Hii brianrho. Can you help me in uploading an image file to R305 using arduino. As i dont want to enroll by scanning through FPS. R305 datasheet contains DownImage command description so just needed help in implementing that functionality.

image over udp python example?

hello, did u have an example python code for getting the fingerprint image over udp? i tried modifying your getImage.py code but the result is just a white image like this...

sorry i have never tinker with binary data so i don't know how u assemble it in the code

image

Unable to save image using c language

Hi i am getting some problem while trying to save image using c getting problem in writing header , color platte and image buffer to file in c lanuage. Pls help

Occasionally triggers when nobody touched sensor

I am using a DY50 3.3V sensor from eBay. The FPM software works very well, but occasionally triggers when nobody touched the sensor. It happens randomly thus does not seem to be when sun, sundown, sunrise, or any specific atmospheric event occurs.

Is it a bug somewhere in FPM or the sensor itself?

Verify Sensor

Hello!
How do I make sure that nobody exchanges the sensor attached to my controller board?
Can I change the address of the sensor?

Send image over http request

Hi, I found out the FPM library two weeks ago, I used it to store fingerprints on my pc using the python example, after that I used some C# code to compare the generated images and it worked. But I need to send the image to my web server that is in laravel (php framework) and has a path just for the image upload, I can upload the file using a web form, but I don't figured out how I can create a post request using the Arduino with the fingerprint image, I am using the ENC28J60 module, so I can do post requests using UIPEthernet library

The following code is used to do a post request with a text message:

client.println("POST /test HTTP/1.1");
client.println("Host: 192.168.1.104");
client.println("Content-Type: multipart/form-data");
client.println("Connection: close");
client.print("Content-Length: ");
client.println(message.length());
client.println();
client.print(message);
client.println();

If I understood correctly, the image_to_udp example has the function readRaw and the buffer variable is where the image is stored, but how can I send it over the post request?

finger.readRaw(FPM_OUTPUT_TO_BUFFER, buffer, &read_finished, &readlen);

Thanks for the help!

Template file download time

Hi @brianrho

Could you please let me know how much time does it take to download the template file from sensor to host PC?

It will be very helpful to me.

ESP Crash when downloading template

Brian,

Your library is excellent, I have 2 readers of which both should be FPM10 format.

Old style works perfect downloading template to array, I have adapted this and now store to spiffs file and retrieve as well, works really well. One problem encountered with getTemplate is that when wifi connection is present sometimes times out or incorrect bytes returned 384 bytes instead of 512. Turning of wifi connection returns 512 template bytes every time.

I ordered some new readers which I thought were the same but ended up slightly different. Plugged in works in a normal way for all operations testes apart from getTemplate which crashes ESP with stack error.

new reader: http://www.ebay.co.uk/itm/322197616177?_trksid=p2060353.m1438.l2649&ssPageName=STRK%3AMEBIDX%3AIT

Byte format seems to be slightly different I think, have you tested this type of reader?

Transferring Image to Pc

Hi,
with the help of your library i am able to enroll, and get template but when i try to use "image to pc code"
it gives me following output
OUTPUT:

Waiting for a finger...
.
.
.
.
.
.
.
.
.
.
Image taken
Starting image stream...

and after this the execution stops ..can you help me out here i want to display the thump impression in my java application . Thank You

Upload prints to finger module

Hi Brian been a long time.
I am revisiting an old project and have the R503 reader types. Your library is excellent and all of my old code ported over fine.

Currently I have stored all the finger prints from the module to SD card in separate files, all looks good I can read these all back and the data is the same as downloaded. Total byte size is 1536 per finger print.

I want to now load these back in to a blank R503 Reader, can you tell me the functions I need to call in order to achieve this in your library please.

e.g: (1) Load template in to buffer
(2) Call store model and define slot ID etc

This is an example of the first finger bytes loaded from the array. `Template 1 loaded
Printing template:

2 5 99 5B 8B 2E A3 0 84 9B 9 9B 0 7E A 1F
55 45 3F C6 2A D6 F1 4F F1 F0 FD EC 53 FC 86 72
97 14 FF 27 47 E0 85 3F CC 47 B9 11 4F F3 63 A2
A0 53 FC DC BB 96 14 FF 39 94 2F 85 3F FF 8E 8B
10 5B 0 84 88 F 86 41 AF 5 9D D4 45 1A 4 8B
16 31 46 41 C4 A5 E0 52 2C 72 47 75 14 5F 20 20
A2 85 12 4A 2 4B 41 46 A2 B8 5E 90 52 24 B0 8F
83 14 4D 2D 3E A6 5 1A 8B ED 18 C1 45 93 50 7A
EC 51 B8 DA 68 B2 14 50 3F C 68 85 1A D4 AF B9
B1 48 85 A0 63 20 52 3F 8E 8B B0 C3 0 84 DA 16
D9 F6 AE 10 4F C 85 1B 86 B4 11 E1 45 F1 C3 13
DC 51 54 78 4D CF 14 6F 27 A2 38 45 13 8A 72 51
B1 43 E2 A3 98 A4 51 8 D7 42 4C 14 3F 37 35 C2
48 4F CF 83 6B 51 46 4 23 F9 38 50 F9 12 E5 A
14 3E 45 D5 D0 85 13 51 8E A5 81 43 F4 64 24 F8
51 5D 1D 2E 5F 14 43 4D 22 28 C5 12 93 8A C3 31
44 D4 E8 A2 6C 51 A5 40 FD 48 14 3F 51 B8 9B 5
12 55 4A A8 41 44 9F 8E 8B B2 CB 0 84 DA 13 DA
20 B2 D BE C3 85 21 47 33 23 21 46 D2 6C CC 78
51 6C 9E B8 F5 14 50 28 90 75 C5 1C C A7 AD F1
45 13 63 60 A4 51 C D9 19 1D 14 3D 41 CD 13 5
12 50 AC 90 91 B4 44 90 9A DC 51 A5 36 EC 52 14
54 4F B4 40 85 14 14 54 73 E1 45 75 23 DD 8 51
65 4C DA 58 14 5B 53 C7 97 C5 15 16 47 6A D1 46
75 AA 68 54 51 6F 8E 8B 73 E3 0 84 B7 10 B6 4A
B2 12 B5 44 5 21 8 50 C3 21 46 C2 BC 44 78 51
68 B2 94 F7 14 51 2D 87 75 C5 1E 8D E5 6E 11 46
3 AA F8 90 50 FC EA F3 1D 14 3D 47 44 93 5 12
D1 EA 50 91 44 45 33 31 40 51 CD 52 B1 6 14 70
56 48 D0 85 1B 15 AD 54 1 47 A5 7B F1 7C 51 A1
60 B8 42 14 75 8E 8B B6 DB 0 84 DB 14 DB C7 76
E BF C3 85 21 47 93 83 41 46 D2 7C D4 88 51 74
A2 BC F7 14 50 29 90 F5 45 1B 8C E7 EE 31 44 F3
73 70 AC 51 8 DD 1B 1F 14 3C 42 CD 93 85 12 10
CC B0 51 D4 54 90 AA E4 51 8D 3C F0 50 14 55 50
B5 C1 85 15 94 AF 94 1 45 A5 2D 25 8 51 5D 4E
DC 58 14 5A 54 48 18 45 15 16 47 8B 11 46 25 A0
62 8C 51 DD 6C 9C 13 14 57 8E 8B B2 DB 0 84 D4
18 D5 17 B5 7 CD C7 5 18 2 B 8F 71 45 90 91
7 4C 51 CC 4E 7C E3 14 56 16 38 89 85 10 85 B1
91 D1 44 22 2C D1 38 51 10 8E C9 9 1F 43 29 A
AD C5 18 8B CE E5 1 44 C3 B 44 18 51 2C C9 45
42 14 49 32 BD D0 5 14 4D D A5 81 44 83 44 71
7C 51 8 E6 76 A7 14 41 3A 6 27 45 18 8F 8A 67
1 44 64 1D C9 C0 51 9D 8 96 80 14 48 52 CB 1E
5 14 55 9 97 31 46 35 72 1D 58 51 99 62 A9 88
14 6A 8E A6 C1 47 45 5 C9 EC 51 81 44 FC C3 14
5D 51 AD C5 C5 16 95 71 EA 61 46 5F 8E 74 75 19
AC 51 ED 1E 44 84 14 61 4A 47 9B 5 1B 16 4D A7
81 46 85 99 1D BC 51 E7 8E 1D 5C C5 1B 3F 8E F3
55 80 51 AB 8E 8E 0 0 7B D 21 5 3A E7 7A 58
58 8A AB 22 3E 8E 40 8A 57 15 3D 7C 20 A C7 16
40 86 CC A 4E 1D 3F 6E 4 8B B5 1D 3E 27 78 8A
97 14 3F 36 4 8B A2 14 40 4C 70 89 7B 24 3E 80
CC 9 CD 16 3F 70 0 A 52 1B 40 6B 8 A AB 1D
3E 74 34 A 4F 1E 4C 9E 74 A C8 22 3F 53 C4 8A
3B 20 42 6B 88 B B7 14 4D 60 CC B 41 14 57 4
84 8A 20 14 4C 19 8C 89 82 14 46 22 10 89 76 14
4A 7A A0 1 63 1D 3F 5D 90 81 41 14 41 63 60 1
6A 14 42 39 FC B AF 14 68 AE 60 9 65 14 45 C1
1C A 65 14 41 6E D8 88 E3 14 49 90 98 88 88 14
5F C4 20 89 66 14 57 A3 9C 8 7A 14 64 72 50 88
B2 14 5C 3 6C 81 89 14 5C 24 4 0 5E 14 71 3
A4 1 78 14 5F D2 4C 8A 5C 14 4B EB 94 81 D9 14
65 4A 20 C B3 14 6C 1A 58 89 7C 14 4D 1 E4 1
7D 14 53 B7 28 C C3 14 57 D6 C8 A D3 14 4F 8B
0 8D BE 14 73 EB 14 A D9 14 5D F4 54 3 5D 14
66 5F 38 C B6 14 5D D6 E8 8B CD 14 66 B3 14 85
C5 14 80 1F 74 8B 33 14 50 49 FC 89 8B 24 3D 11
34 2 91 14 3F C3 10 8D C9 14 86 F7 5C C D4 14
88 BB E8 2 88 14 4F DD 8 8D CF 14 8F B2 1C 81
73 14 51 ED D8 9 E7 14 6B 4A 5C 8A 95 25 40 C
35 4 DD 14 8A 27 10 8B 9F 14 49 7E 10 8B 9F 14
4B 3C 10 84 3D 14 69 7E FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

1536 bytes read.`

Not sure if I can reduce this array size settings for this that work are:
#define BUFF_SZ 36864UL //768 // R305 BUFFER SIZE ELSE 512 STANDARD
uint8_t template_buffer[BUFF_SZ];

Cool project, really having some fun with this. Any pointers will be brilliant. Huge thanks Dans

Get free/available index for new fingerprint enrollment

I am enrolling and deleting many fingerprints one after another on random indexes for testing purposes.
I want to find the very first available index for next enrollment. I read the FPM.cpp file and find this function.
int16_t FPM::getFreeIndex(uint8_t page, int16_t * id)
Is this function is for this task? and is there any example code available to use this function?
Thanks.

Waiting for valid finger to enroll - finger not detected

Hi @brianrho,

I just wanted to try your library to test my new FMP10 sensor with an Arduino Nano. Connection and the detection of the sensor module itself is working properly (pin 2+3).

ENROLL test
Found fingerprint sensor!
Capacity: 150
Packet length: 128
Handshake command is supported.
Send any character to enroll a finger...
Searching for a free slot to store the template...
Free slot at ID 0
Waiting for valid finger to enroll
.
.
.
.
.
.
.
.

From here I only receive dots, nothing else. So it seems to me my finger is not being detected. Can you support me with that?

Thank you and best regards!

issue with sunlight

hi . i use ZFM60 for my project and i use from your library for this module.
everything is Ok but i have a issue ...
when module is under the sunlight , the module want to try read finger and return error .. without put finger on it .
it means the Ghost try to put his finger :))) but system cannot recognized and return error (not found in database) .
but into building everything is ok .

how can i fix the sunlight issue ?
is this for security level ?
how can i change the security level on this line of library ?
is this line for change security ?

src/FPM.h:134
/* security levels */ enum { FPM_FRR_1 = 1, FPM_FRR_2, FPM_FRR_3, FPM_FRR_4, FPM_FRR_5 };

Getting "packet too long" using the templates example

I am trying to get the fingerprint template using the library, what I did up until now is i used the enroll example to store a fingerprint then i tried to read it using the Templates code, but i am getting the "Packet too long" error as you can see here.

template_read

Hardware used:
->Arduino Mega2560
->FPM10A Fingerprint Sensor

Enroll:
https://github.com/brianrho/FPM/blob/master/examples/enroll/enroll.ino

Templates:
https://github.com/brianrho/FPM/blob/master/examples/templates/templates.ino

Touch

How to Use Touch PIN?

I can not save over 164 fingerprints

I have in poseseion a fingerprint sensor FPM10A, like this link (). In the description it says that it has capacity for 1000 fingerprints. The bookstore tells me that it has capacity for 300 prints.

However, when I try to store some fingerprint with an ID greater than 163, it tells me that it has been stored correctly, but then in the sketch "fingerprint" does not recognize the fingerprint (if it does when the ID is lower). When I pass the ID 300 it gives me an error of "FINGERPRINT_BADLOCATION" and it tells me that it can not save the fingerprint.

I use an Arduino DUE and the last commit of your library.

Thanks and regards!

templates example fails

I'm unable to use the read_template function in the templates example with the FPM10A sensor. Fails with a "packet too long: 130" error.

R551 Trouble in templates.ino (SoftwareSerial buffer size and check answer length)

Hello. I use Wemos R1. I was able to run this example by increasing the buffer of the SoftwareSeries to 768 by default there is 64.
SoftwareSerial fserial(D1, D2, false, BUFF_SZ);
It seems that the R551 writes to the buffer too quickly, and it overflows. Also had to comment out checking the length of the answer in FPM::readRaw
/* check the length
if (len != chunk_sz) {
FPM_DEBUG_PRINT("Read data failed: ");
FPM_DEBUG_PRINTLN(len);
return false;
} */
because last packet was:
[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x8
[+]Length: 54
21 0 BE A4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 19 64
len (54) <> chunk_sz (from enum = 128)
There must be another length check for the last packet.

Thanks for the library, here more docs, for R551 too
Https://www.dropbox.com/sh/orprmb3bgb6lqb6/AACpiIXOF91R7-RQ9OkD4JXha?dl=0

Upload template to AS608

I have a problem with uploading the downloaded template from AS608 FPM (also known as JM-101) and get "Packet too long: 130" in serial.
I also changed BUFF_SZ to 1024 so I able to download the template from the sensor.

Best sensor to use?

Hi,
At first, thank you for providing this code. I have a couple of questions regarding this library.

  • Is there a sensor which worked best in the past?

  • Is it also possible to use capacitive sensors?

  • Did I get that right from the documentation, that I am also able to read out the "raw" fingerprint from the sensor to the computer?

Thanks a lot for your answers

Send image via UDP

Hello

Is there a way to send image not to the serial port but via UDP?

Thank you in advance

Unable to run templates example in R551

Hie,
I tried running the templates example but was not able to successfully run it I am getting the following message please help me resolve it. I have changed the buffer size to 496

TEMPLATES test
Found fingerprint sensor!
Capacity: 500
Packet length: 128
Enter the template ID # you want to get...
Template 1 loaded
Error receiving packet


Below is the text which I am getting after I have removed the debug comment

TEMPLATES test

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0 
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 17
0 0 0 0 0 1 F4 0 3 FF FF FF FF 0 2 0 6 
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 17
0 0 0 0 0 1 F4 0 3 FF FF FF FF 0 2 0 6 
[+]Read complete
Found fingerprint sensor!
Capacity: 500
Packet length: 128
Enter the template ID # you want to get...

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0 
[+]Read complete
Template 1 loaded

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x7
[+]Length: 1
0 
[+]Read complete

[+]Got header
[+]Address: 0xFFFFFFFF
[+]PID: 0x2
[+]Length: 128
4 B 6B 0 B2 9A 85 64 C2 B 42 E8 D AB 85 E0 40 DA 3B 7 1A 43 86 6A 41 DC 79 DF 39 33 87 66 41 A 78 E7 91 63 88 63 C2 8 38 E8 CE 6B 87 D9 68 EF 1 0 0 0 0 0 EF 1 FF FF 32 0 0 
Read data failed: -1
Error receiving packet
Enter the template ID # you want to get...

Thanks and Regards
Maaz Shaikh.

[+]Response timeout

I am using Wemos D1 Mini, ESP8266-12E based development board. ESP8266 is controlling R301T Fingerprint sensor using Serial Monitor commands. I am also using ESP8266's WiFi as Access Point to do some configurations and communications with local clients. Everything is working as expected BUT only one problem is there...!!!

The Serial Monitor showing this error randomly even when WiFi is disabled (No AP mode).
[+]Response timeout

Some times, when AP mode is enabled, the error looks like this:

[+]Wrong chksum: 0xC
[+]Response timeout

or this:

[+]Wrong chksum: 0xB
[+]Response timeout

This timeout error becomes more frequent when ESP8266 is working in Access Point Mode and communicating with Clients.

Does this timeout occurs due to some Timer issues???
I can not understand the reason of this error and how to solve it. Please help me to solve this issue. Thanks!

show_fingerprint_template

Hey, your sketch can solve all my problems, But unfortunately it's not working although all other sketches are working but I just couldn't get this sketch to work. I am getting the following error

template 1 loaded
Error receiving packet
Unknown error

digging in your library i found that this snippet is causing the function to close before end packet.
if (bufLen == NULL || *bufLen < packetLen) // if a buffer was provided, ensure theres enough space { return false; }else

I tried to fix it but for some reason my arduino crashes.

Please help me out.

Thanks in advance.

Showing error : Communication Error

Hello, I'm using a HLK-FPM383F Fingerprint sensor for my project. I'm usning your code for enrolling and deleting the fingerprints images. All my connections are right and also fingerprint sensor is detected as well. But when I enter a slot number, it starts to show 'Communication Error' . What am I missing ? I have uploaded ' Enroll with LED Control' program

R551 support

Hey,
I recently ordered a R551 module ( https://www.aliexpress.com/item/-/32879785395.html ) and it also works fine, as far as I can tell ( just tested enroll / read fingerprint so far ).

I found that sending command 0x33 or 0x60 turn the module into standby (~10µA) until it detects a finger. This also turns the LED and UART off. I cannot find this mentioned in any datasheet.

Also found that sending 0x47, 0x50, 0x51, 0x52, 0x53 or 0x68 returns something - but I don't know what it does.

The module has dual color LEDs (red/green) but I haven't found a way to control them... It's always green, or off in Stand-By.

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x33 0x0 0x37
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x3 0x0
Sent command 0x33 got 0x0 // StandBy?!

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x47 0x0 0x4B
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x13 0x0 0x50 0x50 0x4D 0x50 0x44 0x47 0x36 0x32 0x53 0x32 0x30 0x30 0x56 0x31 0x30 0x30
Sent command 0x47 got 0x0

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x50 0x0 0x54
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x3 0x0
Sent command 0x50 got 0x0

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x51 0x0 0x55
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x3 0x0
Sent command 0x51 got 0x0

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x52 0x0 0x56
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x3 0x2
Sent command 0x52 got 0x2

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x53 0x0 0x57
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x3 0x55
Sent command 0x53 got 0x55

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x60 0x0 0x64
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x3 0x0
Sent command 0x60 got 0x0 // StandBy?!

---> 0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x1 0x0 0x3 0x68 0x0 0x6C
<---  0xEF 0x1 0xFF 0xFF 0xFF 0xFF 0x7 0x0 0x5 0x0 0x0 0x2
Sent command 0x68 got 0x0

Fast Search?

Hi,
I'm trying to use your fork of the adafruit library, migrating from the original one.
My goal is to download and upload a set of fingerprints based on a menu selection. I´m just starting with tthat I´m not sure if it´s even possible.

During my migration I noticed that most of the functionality is the same or extended (which is great!) but I found that FastSearch is not available.
The packet id FPM_HISPEEDSEARCH is there but never used.
Is there any particular reason why this is not available on the fork?
Which is the intended method to check if a fingerprint matches?

Thanks !

Image to pc

Hey,

I'm trying to extract a fingerprint image to my computer using the image to pc arduino + python codes.

I'm running an R307 fingerprint sensor with an Arduino Uno connected to an Ubuntu 18.04 with Python 3.6

Everything seems to be okay on the arduino side. I can get to a stage where the 'Image stream complete' message shows up. I use the following values for the serial port settings in the python code -
Arduino serial port number - /dev/ttyACM0
baud rate - 57600
I've triple checked the above values. When I enter the file name for the image to be stored, the code gives me the error - Invalid port settings! Image extraction failed!

After which it produces a glitched image on my designated folder.

Wondering where I am going wrong with this? When I try changing the baud rate from 57600 to anything else, the code does not recognize the sensor.
Screenshot_2019-09-23_13-42-03

Random time-out while scanning or enrolling fingerprints

While testing a FPM10A/DY50-2V1 3V3 sensor with build in touch controller using at 57600 bps 8N1 on a ESP32 Devkit-1 board connected to hardware serial sometimes time-outs occurs:

Trace made with remote debug:

Fingerprint check for existing print in database:

(D t:23504ms) 05032019 13:31:03 .
(D t:23510ms) 05032019 13:31:03 .
(D t:23518ms) 05032019 13:31:03 .
(D t:23523ms) 05032019 13:31:03 .
(D t:23530ms) 05032019 13:31:03 .
(D t:23537ms) 05032019 13:31:03 .
(D t:23544ms) 05032019 13:31:03 .
(D t:23550ms) 05032019 13:31:03 .
(D t:24140ms) 05032019 13:31:03 Image taken
(D t:24532ms) 05032019 13:31:04 Image converted
(D t:24536ms) 05032019 13:31:04 Remove finger
(D t:26097ms) 05032019 13:31:05 Timeout!

Break off and start a new search again:

(D t:34893ms) 05032019 13:31:14 Touch the fingerprint reader to search for a print...
(D t:38517ms) 05032019 13:31:18 Waiting for valid finger
(D t:40520ms) 05032019 13:31:20 Timeout!
(D t:50317ms) 05032019 13:31:30 Timeout!
(D t:60113ms) 05032019 13:31:39 Timeout!
(D t:69909ms) 05032019 13:31:49 Timeout!
(D t:79705ms) 05032019 13:31:59 Timeout!
(D t:89501ms) 05032019 13:32:09 Timeout!
(D t:99297ms) 05032019 13:32:19 Timeout!

Had to reset complete module.
A software reset didn’t work.

Upload Image To Reader Slot

Hi.
Nice library, thanks.
image to pc works!
Please advise on how to go about uploading from the pc back to the reader slot.

Regards

Change the LED Color or turn it off

Hello,
i see pictures where the LED is Red, my FPM is green.

is it possible to change the color? so if it read a finger it switch to red or turn off the LED?

Resulting Image

Hi, i hope my question does not sound dumb but please can it be used to scan any image regardless of if it is a fingerprint or something like a single character or word on paper?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.