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

Function to send templates from your controller to the sensor #36

Open
ricarduscat opened this issue Dec 16, 2017 · 82 comments
Open

Function to send templates from your controller to the sensor #36

ricarduscat opened this issue Dec 16, 2017 · 82 comments

Comments

@ricarduscat
Copy link

ricarduscat commented Dec 16, 2017

uint8_t Adafruit_Fingerprint::downloadModel(uint16_t id, uint8_t packet_1[], uint8_t packet_2[], uint8_t slot) {
  uint8_t packet[] = {FINGERPRINT_DOWNLOAD, slot};
  writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet);
  uint8_t len = getReply(recvPacket);
  
  if ((len != 1) && (recvPacket[0] != FINGERPRINT_ACKPACKET))
   return -1;
  if (recvPacket[1] == 0x00) {
    writePacket(theAddress, FINGERPRINT_DATAPACKET, 130, packet_1);
    writePacket(theAddress, FINGERPRINT_DATAPACKET, 130, packet_2);
    return recvPacket[1];
  } else {
    return recvPacket[1];
  }
}

I made this with the latest version of the code. I need to put templates back to the sensor when I free the memory. The documention of the sensor says it's allowed, but not implemented in the library. This does not work, it will be fine to improve the library.

@marianodato
Copy link

This function worked for you? Did you find another solution?

@ricarduscat
Copy link
Author

Yes, but I had to touch the fingerprint sensor packet size to adapt it to the datapackets I was sending

@marianodato
Copy link

@ricarduscat could you explain how to do that?

@milindrc
Copy link

@ricarduscat please explain the parameter you need to pass to this function.

@sand007man
Copy link

i am able to enroll ,search fingerprint but when i load show_fingperprint _template it is showing some "??" values in the serial monitor . even small help will be greatly appreciated . I am using this fingerprint with node_mcu esp 12e...i feel its something related to memory buffer !!

@hanifizzudinrahman
Copy link

recvPacket

what is "recvPacket"? the last packet, or what?

@jimmygyl
Copy link

jimmygyl commented Aug 10, 2019

i am able to enroll ,search fingerprint but when i load show_fingperprint _template it is showing some "??" values in the serial monitor . even small help will be greatly appreciated . I am using this fingerprint with node_mcu esp 12e...i feel its something related to memory buffer !!

Try using larger buffer for the software serial
something like
SoftwareSerial mySerial(D7, D8, false, 1024);

default is 64bytes
packages of template are 128bytes+11bytes
maybe it got overwritten

@shreeramkulkarni
Copy link

shreeramkulkarni commented Jan 17, 2020

uint8_t Adafruit_Fingerprint::downloadModel(uint16_t id, uint8_t packet_1[], uint8_t packet_2[], uint8_t slot) {
  uint8_t packet[] = {FINGERPRINT_DOWNLOAD, slot};
  writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet);
  uint8_t len = getReply(recvPacket);
  
  if ((len != 1) && (recvPacket[0] != FINGERPRINT_ACKPACKET))
   return -1;
  if (recvPacket[1] == 0x00) {
    writePacket(theAddress, FINGERPRINT_DATAPACKET, 130, packet_1);
    writePacket(theAddress, FINGERPRINT_DATAPACKET, 130, packet_2);
    return recvPacket[1];
  } else {
    return recvPacket[1];
  }
}

I made this with the latest version of the code. I need to put templates back to the sensor when I free the memory. The documention of the sensor says it's allowed, but not implemented in the library. This does not work, it will be fine to improve the library.

@ricarduscat If possible can you please expand on this code ?(What are the parameters..etc). Is there any other way where I can load the templates from one sensor to other sensor. BTW I am using R307.

@hanifizzudinrahman
Copy link

uint8_t Adafruit_Fingerprint::downloadModel(uint16_t id, uint8_t packet_1[], uint8_t packet_2[], uint8_t slot) {
  uint8_t packet[] = {FINGERPRINT_DOWNLOAD, slot};
  writePacket(theAddress, FINGERPRINT_COMMANDPACKET, sizeof(packet)+2, packet);
  uint8_t len = getReply(recvPacket);
  
  if ((len != 1) && (recvPacket[0] != FINGERPRINT_ACKPACKET))
   return -1;
  if (recvPacket[1] == 0x00) {
    writePacket(theAddress, FINGERPRINT_DATAPACKET, 130, packet_1);
    writePacket(theAddress, FINGERPRINT_DATAPACKET, 130, packet_2);
    return recvPacket[1];
  } else {
    return recvPacket[1];
  }
}

I made this with the latest version of the code. I need to put templates back to the sensor when I free the memory. The documention of the sensor says it's allowed, but not implemented in the library. This does not work, it will be fine to improve the library.

@ricarduscat If possible can you please expand on this code ?(What are the parameters..etc). Is there any other way where I can load the templates from one sensor to other sensor. BTW I am using R307.

i suggest you to read this post
#9

i have written on there, how to send template fingerprint to module fingerprint

@adityadate1997
Copy link

I want to download and store the template in my server datatabase, I am using NodeMCU and Php with mysql on server side. This function is not provided in the library. Can anybody please guide me on this?

@hanifizzudinrahman
Copy link

I want to download and store the template in my server datatabase, I am using NodeMCU and Php with mysql on server side. This function is not provided in the library. Can anybody please guide me on this?

of course, i can help you. NodeMCU i think can use as Arduino, so it can be work with module fingerprint R307 or DY50

@adityadate1997
Copy link

I want to download and store the template in my server datatabase, I am using NodeMCU and Php with mysql on server side. This function is not provided in the library. Can anybody please guide me on this?

of course, i can help you. NodeMCU i think can use as Arduino, so it can be work with module fingerprint R307 or DY50

Can we connect through an email? I'll send in the required code for you to see.

@hanifizzudinrahman
Copy link

yes, you can see my profile to get my new phone number or email

@adityadate1997
Copy link

adityadate1997 commented Mar 18, 2020 via email

@rodrigotabsan
Copy link

Hello adityadate1997,

You need to store the template into your fingerprint sensor and compare it with the fingerprint that the sensor is receiving from the user. Probably, you will need to store templates from a database to the database of the sensor to check the fingerprint that your sensor has received and compare it with the fingerprints of the database.

Good luck

@shreeramkulkarni
Copy link

@rodrigotabsan Are you able to get the templates out from the sensor and store those templates into another sensor's flash memory? If so what sensor are you using ?
I'm also trying to achieve the same thing using NodeMCU and R307.

@rodrigotabsan
Copy link

@shreeramk1998 I didn't try that. I can't get the fingerprint template I have stored in an external database to match the one I put on the sensor. I'm not sure this can be done... I've been working on this for several months with no results.

@6000850
Copy link

6000850 commented Apr 15, 2021

Hello
This is the 3-finger pattern output stored in the module
I have saved these templates in the server database. Can I restore these templates to another module (fingerprint) and be usable?

Attempting to load #1
Template 1 loaded
Attempting to get #1
Template 1 transferring:
534 bytes read.
Decoding packet...
FFFFFFFFFFFFFFFFFF09144BAE6B8A6845BEBE6E4D9D4272AA7B0C76BA77947A95EF9C7EB5E1A482ABC7D90DE993A30F54445703636883651396377E32A45E204D00EF0B091E0E7A7C98780A16A94E3047C3190CC0605F70DF82D390C61C921441F152FFBD1DDF57721022EA517970EE836D7086133DB05673935C1A141675D6504177F6000000003753EF01FFFFFFFF02008200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFD6EF01FFFFFFFF020082CB091455A6AB826425BE9E6E0D9D6272AA7B8C76BA77947A95EF9C7EB5E1A482ABC7590DEB973F378BC79A52D96E2F71B2907F7B42B8AD68EA6844BD85CE3C77C758AEEE5BA97F2ECAC12AD8CB7AFF74DDB03E1AA4F85C947949B472FE2C1F7F233F2D3C4A67EFCE93E63ECA302BB15A3516C04229C675D6C30F77F6000000004076EF01FFFFFFFF080082CB09144BAE6B8A6845BEBE6E4D9D4272AA7B0C76BA
done.
------------------------------------
Attempting to load #2
Template 2 loaded
Attempting to get #2
Template 2 transferring:
534 bytes read.
Decoding packet...
FFFFFFFFFFFFFFFFFF091852A1AA859405C6BE60CDAD0274AB5B0D74B937157556E72BC15598B7B4BA8439B2062970051716C200C3C9425E2D8D2AB7DFE33AD4A78F004DB69EA401FEF01FFFFFFFF020082DC95A39E80F4FAAE6BDCFEEE00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFAFEF01FFFFFFFF020082CB091B4FA26B826805B69E6E0D9D4272AA7B8C76BA77147A97EF1C7EB5E1A482ABC75909E9937B209045F75FF86F876003928D7C02A0445BA770BD45489EA73A5ED96F82C1797F80F8C38EEC44626FBC898E54BA20E0B59AAEC0722667BFB1E1B7DB3CC7D3EEFD5433683A26C94A6FCE05DA69D654287A3A06596BC785FCCBB74230EF01FFFFFFFF080082CB091852A1AA859405C6BE60CDAD0274AB5B0D74B9371578936F1D78B3E22584A7C95A11E7AB773FF847AE2C086D5A651390556E72BC1550EA68C44049DE07C1DB399AA64378E9D8CBC1DEC24E666D98B7B4BA8439FCF8
done.
Attempting to load #3
Template 3 loaded
Attempting to get #3
Template 3 transferring:
534 bytes read.
Decoding packet...
FFFFFFFFFFFFFFFFFF091A59BE4BFA6CC5A6FE6CCC8D8272A97B0D76B977157A93E5989C1802BC050F275855AF56A8FCBA692308EAB8C748CA430B384B17E3C87CF78BD7383E8629F68C2AE972222B5F230B8D5D634CCEFAEC69ADE5ABE1FFCFA41F0EF01FFFFFFFF0200825FFDFADD8565A01605E9A93E7318022FCED30C6F0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFF8EEF01FFFFFFFF020082CB09175EAE2BBA6C45B6FE6CCD9D0272A97B0D76B977157A93EF1D7EB3E12582AFC55801EF9B3303F344E23D536F7E10239C541372B0B7746940F56E68EE7D3586992A6E9B2AA9504344DF464A68B8E2DF8E118CAA9432BECC28F79A804E3D83C738B80B3AE8FC1790407E70BB216FC28A564332FB3945BA191BDA4B669A54DE3D14EF01FFFFFFFF080082CB091A59BE4BFA6CC5A6FE6CCC8D8272A97B0D76B977157A93EF1D7CB3E02580A7C15A01E78B0F1F79C48608736FF63B95989C1802BC050F275854038
done.

please guide me
Thanks

@hanifizzudinrahman
Copy link

hanifizzudinrahman commented Apr 16, 2021 via email

@a2br
Copy link

a2br commented Jun 13, 2021

I want to download and store the template in my server datatabase, I am using NodeMCU and Php with mysql on server side. This function is not provided in the library. Can anybody please guide me on this?

of course, i can help you. NodeMCU i think can use as Arduino, so it can be work with module fingerprint R307 or DY50

Can we connect through an email? I'll send in the required code for you to see.

I'd be really interested to find out how you did that. Could you please reach out to me or make what you learned public by any means?

@mlinaje
Copy link

mlinaje commented Sep 29, 2021

After reading all the datasheets I have found. Does someone knows if the template/signature of the fingerprint format follows some kind of standard such as ISO, ANSI,...?
Thanks in advance!

@Dygear
Copy link

Dygear commented Jun 20, 2022

So, I read the datasheet, looks like this uses the DownImage function documented here on page 19. You can also upload an image to the sensor with UpImage (found on page 18.)

The images themselves and the formatting used are documented on page 8 (under the title 4.1.1 Image Buffer) says that the captured images are 256x288 pixels in size.

When uploading or downloading images though the UART port, in order to speed up the speed, only the upper four bits of the pixel byte are used that is, 16-level grayscale is used, and each byte represents two pixels (the high four bits are one pixel, and the low four bits are the same. A pixel in the next adjacent column of the row, that is to pixels are combined into one byte and transmitted). Since the image is16 grayscale levels, uploaded to PC When displaying (corresponding to BMP format), the grayscale should be expanded (expanded to 256 grayscale, i.e. 8bit bitmap format.)
Transmission though the USB port is a full 8-bit pixel, that is, 256 gray levels.

What I think is needed is for the image to tz function Img2Tz page 19 again, after capturing / sending two images with that function it stores the first image in CharBuffer1 and CharBuffer2. Then you can run the RegModel function (page 20) that takes the contents of CharBuffer1 and CharBuffer1 and tries to make a template model out of it.

On page 21 it looks like you can straight up take the template model (they are now calling it characteristics) and "upload" that to the host computer. On page 21 again it has the DownChar function that allows you to download into the characestirics buffers and then you can save them into the flash memory with the store function call.

I think the only functions you really need are the UpChar, DownChar and Store functions in order to sync a database across multiple devices and have it return the same position ID. If they became out of sync you can always delete the database and copy one fingerprint reader to another using the Empty function (documented on page 24).

Edit: I call all of these functions, but really they are called "Instructions" in the document parlance.

@AsifKhan991
Copy link

AsifKhan991 commented Sep 5, 2022

I was also in need of such functionalities (to read, save and write back template data to similar sensor models) and thus came up with an update to the existing library. @Dygear what you said is correct. I have a pull request pending about this. Please checkout my repository about this update. Also checkout the changes I've made.

However, keep in mind that writing template data from one model to another won't serve the purpose as different sensor models might use different template matching algorithms.

Hope I was able to help!

@Gitare420
Copy link

Hi, I'm having trouble pasting the template.

get.template gives me this

57,1,7E,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,F,0,2,0,83,0,0,30,C,F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0,0,0,.

and I paste it in write_to_sensor like this

uint8_t fingerTemplate[512] = {3, 3, 58, 25, 14, 1, 57, 1, 7E, 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, F, 0, 2, 0, 83, 0, 0, 30, C, F3, 33, F3, CF, FF, FE, EF, FF, FB, FB, EE, EF, EA, AA, AA, A9, 95, 66, 59, 55, 55, 65, 55, 55, 51, 54, 40, 44, 4, 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3E, 8A, EC, DE, 4E, 8B, 57, 1E, 33, 9D, 52, BE, 58, 21, 3, 7E, 46, A3, 42, 9E, 24, A7, 50, 1E, 5B, AA, 46, 1E, 2E, 2C, 4F, 9E, 33, B9, 27, 3E, 33, C2, E, 7E, 3E, 8F, 0, FF, 6B, 14, 19, 5F, 51, 14, D7, 9F, 4D, A5, 17, FF, 21, B6, E5, 3F, 48, 37, 95, 1F, 67, BB, DD, BF, 25, 41, CE, 7F, 57, C2, C7, 9F, 40, C3, 9, BF, 4D, 43, 88, DF, 3B, 2B, 52, FA, 36, 2C, 69, 78, 26, C6, 4F, 1E, 38, 50, 4D, 3C, 3E, C6, D, DA, 2A, 50, A4, 18, 4A, D1, 7, 78, 3D, C9, 4D, 99, 42, C9, C9, B9, 5A, 4B, 8, B9, 42, CE, C, 39, .46, 51, 9, 99, 59, CD, 9F, F5, 59, CE, 8, 55, 2E, 50, 65, 95, 2E, D0, 8E, D5, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 56, 17, 0, 1, 20, 1, 85, 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, F, 0, 2, 0, 77, 0, 0, 30, C, F3, 33, F3, CF, FF, FE, EF, FF, EF, BB, BA, AA, AA, AA, AA, 65, 55, 55, 95, 55, 55, 45, 51, 10, 44, 4, 40, 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};

and it throws me the error exponent has no digits

What can be? Thanks in advance :)

@AsifKhan991
Copy link

AsifKhan991 commented Sep 6, 2022

Hi, I'm having trouble pasting the template.

get.template gives me this

57,1,7E,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,F,0,2,0,83,0,0,30,C,F3,33,F3,CF,FF,FE,EF,FF,FB,FB,EE,EF,EA,AA,AA,A9,95,66,59,55,55,65,55,55,51,54,40,44,4,40,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.
3E,8A,EC,DE,4E,8B,57,1E,33,9D,52,BE,58,21,3,7E,46,A3,42,9E,24,A7,50,1E,5B,AA,46,1E,2E,2C,4F,9E,33,B9,27,3E,33,C2,E,7E,3E,8F,0,FF,6B,14,19,5F,51,14,D7,9F,4D,A5,17,FF,21,B6,E5,3F,48,37,95,1F,67,BB,DD,BF,25,41,CE,7F,57,C2,C7,9F,40,C3,9,BF,4D,43,88,DF,3B,2B,52,FA,36,2C,69,78,26,C6,4F,1E,38,50,4D,3C,3E,C6,D,DA,2A,50,A4,18,4A,D1,7,78,3D,C9,4D,99,42,C9,C9,B9,5A,4B,8,B9,42,CE,C,39,.
46,51,9,99,59,CD,9F,F5,59,CE,8,55,2E,50,65,95,2E,D0,8E,D5,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,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,0,0,0,0,0,0,0,0,0,0,0,0,.
3,3,56,17,0,1,20,1,85,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,F,0,2,0,77,0,0,30,C,F3,33,F3,CF,FF,FE,EF,FF,EF,BB,BA,AA,AA,AA,AA,65,55,55,95,55,55,45,51,10,44,4,40,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,.

and I paste it in write_to_sensor like this

uint8_t fingerTemplate[512] = {3, 3, 58, 25, 14, 1, 57, 1, 7E, 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, F, 0, 2, 0, 83, 0, 0, 30, C, F3, 33, F3, CF, FF, FE, EF, FF, FB, FB, EE, EF, EA, AA, AA, A9, 95, 66, 59, 55, 55, 65, 55, 55, 51, 54, 40, 44, 4, 40, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3E, 8A, EC, DE, 4E, 8B, 57, 1E, 33, 9D, 52, BE, 58, 21, 3, 7E, 46, A3, 42, 9E, 24, A7, 50, 1E, 5B, AA, 46, 1E, 2E, 2C, 4F, 9E, 33, B9, 27, 3E, 33, C2, E, 7E, 3E, 8F, 0, FF, 6B, 14, 19, 5F, 51, 14, D7, 9F, 4D, A5, 17, FF, 21, B6, E5, 3F, 48, 37, 95, 1F, 67, BB, DD, BF, 25, 41, CE, 7F, 57, C2, C7, 9F, 40, C3, 9, BF, 4D, 43, 88, DF, 3B, 2B, 52, FA, 36, 2C, 69, 78, 26, C6, 4F, 1E, 38, 50, 4D, 3C, 3E, C6, D, DA, 2A, 50, A4, 18, 4A, D1, 7, 78, 3D, C9, 4D, 99, 42, C9, C9, B9, 5A, 4B, 8, B9, 42, CE, C, 39, .46, 51, 9, 99, 59, CD, 9F, F5, 59, CE, 8, 55, 2E, 50, 65, 95, 2E, D0, 8E, D5, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 56, 17, 0, 1, 20, 1, 85, 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, F, 0, 2, 0, 77, 0, 0, 30, C, F3, 33, F3, CF, FF, FE, EF, FF, EF, BB, BA, AA, AA, AA, AA, 65, 55, 55, 95, 55, 55, 45, 51, 10, 44, 4, 40, 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};

and it throws me the error exponent has no digits

What can be? Thanks in advance :)

These are actually hex values. You need to put '0x' before the hex values. Like this: 0xFE

@Gitare420 check this repo again after 4hrs (busy with other stuffs) , I will update the get template example to show hex values with '0x'.
I know it's hard to put '0x' before 512 values.

@Gitare420
Copy link

Thanks for answering, it was easy to put the 0x using the replace tool of the notepad, I stay like this

uint8_t fingerTemplate[512] = {0x3, 0x3, 0x59, 0x16, 0x0, 0x1, 0x20, 0x1, 0x7D, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x11, 0x0, 0x3, 0x0, 0x6D, 0x0, 0xC, 0x33, 0xCC, 0xFC, 0xCF, 0xFF, 0xFF, 0xFF, 0xBB, 0xEE, 0xFE, 0xEA, 0xEA, 0xAA, 0xA9, 0xA5, 0x56, 0x56, 0x55, 0x55, 0x45, 0x54, 0x45, 0x44, 0x44, 0x40, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 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0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};

Then I used the write function and it uploaded without problems, but when using the fingerprint scheme to read it tells me

"Image taken
Image converted
Did not find a match"

Did I do something wrong?

@AsifKhan991
Copy link

@Gitare420 Did you use the same sensor for reading the template from and writing to back it? What is the model pf the sensor? Also what id you enrolled against?

@Gitare420
Copy link

use the same model 071405 finger to read and write, with the id 1

@dody3030
Copy link

@AsifKhan991 now I will try your example write_to_sensor and I will change the buffer size or all 512 to 768, you really saved my day .. you are really helpful genius guy thanks again and again. i was trying with the code for long time ago , eventually I start reading the datasheet, and I found that most of the capacitive fingerprint template size 768.

@dody3030
Copy link

@AsifKhan991 returns Storing error. I changed all 512 to 768.

_void write_template_data_to_sensor() {

int template_buf_size=768; //usually hobby grade sensors have 512 byte template data, watch datasheet to know the info
uint8_t fingerTemplate[768] = {0x2,0x0,0x7,0x3,0x8B,0x20,0xBB,0x0,0x84,0x7F,0x12,0x84,0x4C,0x87,0xE,0x2D,0x8B,0x5,0x1F,0xC4,0x51,0xD2,0xA1,0x48,0x21,0x32,0xD4,0x4C,0x51,0xD4,0x82,0x1E,0xFF,0x14,0x78,0x21,0xC5,0x4B,0x5,0x1B,0x89,0xEA,0xE3,0xC1,0x44,0xC3,0x93,0x1C,0xC0,0x50,0xFC,0xE8,0x7A,0x48,0x14,0x44,0x3A,0x8E,0x8E,0x85,0x16,0xF,0xD3,0x94,0x91,0x45,0xF4,0x71,0x51,0x54,0x51,0x45,0x2C,0xBB,0x42,0x14,0x5D,0x4E,0x2F,0xA7,0x85,0x1D,0x54,0x49,0x94,0x91,0x47,0x5,0x1B,0xD5,0x70,0x51,0x69,0x4E,0xB3,0x71,0x14,0x80,0x54,0xA1,0xD2,0x85,0x18,0x95,0x8C,0x6A,0xA1,0x46,0xFF,0x8E,0x8B,0xD3,0x53,0x0,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0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0};
/*
you can manually save the data got from "get_template.ino" example like this

uint8_t fingerTemplate[512]={0x03,0x0E,....your template data.....};

*/
memset(fingerTemplate, 0xff, 768); //comment this line if you've manually put data to the line above

Serial.println("Ready to write template to sensor...");
Serial.println("Enter the id to enroll against, i.e id (1 to 127)");
int id = readnumber();
if (id == 0) {// ID #0 not allowed, try again!
return;
}
Serial.print("Writing template against ID #"); Serial.println(id);

if (finger.write_template_to_sensor(template_buf_size,fingerTemplate)) { //telling the sensor to download the template data to it's char buffer from upper computer (this microcontroller's "fingerTemplate" buffer)
Serial.println("now writing to sensor...");
} else {
Serial.println("writing to sensor failed");
return;
}

Serial.print("ID "); Serial.println(id);
if (finger.storeModel(id) == FINGERPRINT_OK) { //saving the template against the ID you entered or manually set
Serial.print("Successfully stored against ID#");Serial.println(id);
} else {
Serial.println("Storing error");
return ;
}
}_

@AsifKhan991
Copy link

@AsifKhan991 returns Storing error. I changed all 512 to 768.

You are supposed to comment the line memset(fingerTemplate,0xff,768). Also use a valid Id to store the print (1-127)

@dody3030
Copy link

@AsifKhan991
1- I added two users.
2- I got the hex for the id 2.
2- I ran the example that delete all users. now the sensor db is clear.
3- I added the admin id =1 , now only one user is registered.
4- I opened write_to_sensor example and I commented out the memset line, and I added the hex to the variable uint8_t fingerTemplate[768] = {0x2,0x0,0xDD,0x2
5- Compiled, run
6- Added 2 as id for the required id. but got Storing error. I don't know why.

Output:
Found fingerprint sensor!
Ready to write template to sensor...
Enter the id to enroll against, i.e id (1 to 127)
Writing template against ID #2
now writing to sensor...
ID 2
Storing error

@AsifKhan991
Copy link

@dody3030 I left the store fucntion as it is in the original library. Seems more likely a sensor issue. Will check anyways and get back if any solution is found.

@dody3030
Copy link

@AsifKhan991 Writing to the sensor work... I just added a delay for 10 seconds after writing the template and before storing to the sensor. everything is working fine now. your library is fine don't waste your time to check it. my sensor is R503 capacitive fingerprint and I think there is slowness while writing to the sensor. thanks for your code.

@dody3030
Copy link

dody3030 commented Sep 25, 2022

@AsifKhan991 . I changed the text file content to store the template id and '%' as separator between the template id and template data I collect from fingerprint Sensor (1). The following is an example of the text file content stored in SD.

1%211061813920559013222916229362166156220133281972458657216117625016812361...........#
2%282351381391613013209011615817213413363194464822579240221124148832521201...........#
3%251532061397119013216918167150165449186197296513892225701921642032248452...........#

As you can see the file contain three different IDs and percentage sign as separator in addition to the template data. the problem is that am able to collect the data successfully but not able to send it to the write_template_data_to_sensor function, that accept two parameters one is int and the other is uint8_t. Thanks in advance.

void loadTempFromFile(){
  File myFile;
  myFile = SD.open("fprint.fdb");
  while(myFile.available()){
      String t_pkt;
      int t_pid;
      char buf[2000];
      t_pkt = myFile.readStringUntil('%');
      t_pid = t_pkt.toInt();
      int max_len = 2000;
      int read_len = myFile.readBytesUntil('#', buf, max_len);
      Serial.println("Packet id: " + String(t_pid));              //Debugging
      Serial.println("CONTENT:");                                 //Debugging
      Serial.print(buf);                                          //Debugging
      write_template_data_to_sensor(t_pid, buf);
  }
  myFile.close();
}

void write_template_data_to_sensor(int t_id, uint8_t fingerTemplate[768]) {
  int template_buf_size = 768; 
  Serial.println("Ready to write template to sensor...");
  Serial.println("Enter the id to enroll against, i.e id (1 to 127)");
  if (t_id == 0){
    Serial.println("Not possible..!!");
  }else{
    Serial.print("Writing template against ID #"); Serial.println(t_id);
    if (finger.write_template_to_sensor(template_buf_size, fingerTemplate)) { //telling the sensor to download the template data   to it's char buffer from upper computer (this microcontroller's "fingerTemplate" buffer)
      Serial.println("now writing to sensor...");
    } else {
      Serial.println("writing to sensor failed");
      return;
    }
    delay(10000);
    Serial.print("ID "); Serial.println(t_id);
    if (finger.storeModel(t_id) == FINGERPRINT_OK) { //saving the template against the ID you entered or manually set
      Serial.print("Successfully stored against ID#"); Serial.println(t_id);
    } else {
      Serial.println("Storing error");
      return ;
    }  
  }
}

@AsifKhan991
Copy link

Not a good idea to use seperator. What if the template contains a hex value that refers to the seperator in char?

@dody3030
Copy link

dody3030 commented Sep 25, 2022

@AsifKhan991

Not a good idea to use seperator. What if the template contains a hex value that refers to the seperator in char?

but the template stored in non-hex , and the data passed to buf array is filtered by readBytesUntil from the position after the '%' sign till '#' sign, so it will be the same data that is collected from the sensor before. and I didn't change it to hex, because what I understand from your example the same data can be passed to uint8_t without changing to hex to be written back to different sensor of the same type.

@AsifKhan991
Copy link

I see that your template data contains only decimal numbers. If you stored in decimal format and read directly as hex using readBytesUntil() then it's not gonna work. This is no issue with the library, mere the use of wrong data type. Please have a thorough look at the Arduino data types.

@dody3030
Copy link

  int read_len = myFile.readBytesUntil('#', buf, max_len);

Here's the issue, you are reading from the beginning of line. Also I see that you template contains decimal numbers. Did you write template to the file as integers? If yes, then please thoroughly go through Arduino data types documentation to see how yo reconvert them. This is not an issue with the library, mere wrong data types and indexing.

before that line there are two lines to get the template id

t_pkt = myFile.readStringUntil('%');
t_pid = t_pkt.toInt();

the first line put the next reading after the % sign int read_len = myFile.readBytesUntil('#', buf, max_len); and when I print the buf it showing exactly the data is collected for that template. but the issue is how to pass that buf to uint8_t as argument for the write_template_to_sensor function. the following is an example of buf output for each line.

2110618139205590132229162293621661562201332819724586572............ till the end of the output. I verified this and I found it is same as the data collected from the sensor for template 1

@AsifKhan991
Copy link

AsifKhan991 commented Sep 25, 2022

Please read my most recent comment. Anyways there's an easy solution, just create seperate files for seperate templates and name the file with id number. Then just read the directory and save by the name.
Write the template data as byte/hex on the file.

@dody3030
Copy link

dody3030 commented Sep 25, 2022

Please read my most recent comment. Anyways there's an easy solution, just create seperate files for seperate templates and name the file with id number. Then just read the directory and save by the name. Write the template data as byte/hex on the file.

@AsifKhan991 I changed the function to load the template from the file that contain only hex stored from the sensor for only one template.

void loeadTempFromFile(){
  File myFile;
  myFile = SD.open("fprint.fdb");
  uint8_t t_buf[768] = {};
  int t_data = myFile.readBytesUntil('\n', t_buf, sizeof(t_buf));
  for (int i = 0; i < 768; i++){
     Serial.print(t_buf[i]);
  }
  myFile.close();
}

Output from file after loading to uint8_t:
4812050444812049444812054654448120495044481205666444812067684448120516644481204844481205652444812069534448120494844481206953444812050524448120685644481205444481205767444812068674448120565344481204967444812067534448120705344481205644481205249444812052564448120654944481206648444812070654448120494844481205349444812069674448120546744481206850444812056564448120495244481205451444812049674448120575644481205366444812053444812049674448120554448120525744481206956444812067494448120525344481206749444812069484448120705344481206848444812053494448120685644481205754444812065534448120554844481204952444812053534448120506744481205344481206548444812053444812049534448120676744481205544481205056444812068494448120525144481207051444812065574448120506844481206756444812053494448120504844481206967444812049494448120554844481204952444812054494448120525544481205049444812049704448120525344481204954444812053514448120514448120675544481206749444812052544448120575244481206952444812052574448120684844481205350444812049534448120516744481206752444812055524448120495244481205548444812056694448120566644481206669444812070514448120484448120565244481206868444812049494448120686944481205753444812069574448120494944481204965444812050494448120534448120504944481206752444812056704448120695644481206549444812052544448120494448120506544481205068444812066484448120534944481205648444812052704448120555644481205648444812049524448120574944481204952444812049574448120686844481205344481205050444812052534448120674448120525644481205249444812052534448120564944481205549444812050484448120544844481205349444812054674448120544844481205353444812051684448120495244481205650444812049674448120515144481206868444812053444812049524448120675644

Not showing the same decimal from the original while reading the template from the sensor which is

Output from sensor while reading the same template.
21106181392055901322291622936216615622013328197245865721611762501681236108210136209928152915287732321936919322424520881216150165112208544516052120474020967243169452008132236171122097713331692283319919370148228732088221601961162011214213919024301322211722214923317263353319614323216170142451768112879120128201452025221534691272656912911332968110896856120130285122152020010081681141061146012024419259112208348156222515143106167209691003313808112923561202013388159221534127142139128190132185221881248105822152536671657111322619488152124211112208931701656925712447216170983418920081641385811920824020216518744987656966186263281122022241492062593022277920716386569163240149208811242541751282066731494523146193136657022818720232811135215813820688220115952885982316170175142000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

@Gitare420
Copy link

Hello, were you able to solve your problem? i'm stuck on the same

@dody3030
Copy link

dody3030 commented Oct 3, 2022

Hello, were you able to solve your problem? i'm stuck on the same

me too, waiting Asifkhan to reply, beside I have encountered one more issue, I have to add the first ID "Admin" or ID 1 using Adafruit example, I can not upload the first template to the sensor directly using Asifkhan code, beside at least one finger of five templates is not recognized by the sensor. I don't know why, I checked the template length, the library, but still stuck.

@AsifKhan991
Copy link

Please read my most recent comment. Anyways there's an easy solution, just create seperate files for seperate templates and name the file with id number. Then just read the directory and save by the name. Write the template data as byte/hex on the file.

@AsifKhan991 I changed the function to load the template from the file that contain only hex stored from the sensor for only one template.

void loeadTempFromFile(){
  File myFile;
  myFile = SD.open("fprint.fdb");
  uint8_t t_buf[768] = {};
  int t_data = myFile.readBytesUntil('\n', t_buf, sizeof(t_buf));
  for (int i = 0; i < 768; i++){
     Serial.print(t_buf[i]);
  }
  myFile.close();
}

Output from file after loading to uint8_t:
4812050444812049444812054654448120495044481205666444812067684448120516644481204844481205652444812069534448120494844481206953444812050524448120685644481205444481205767444812068674448120565344481204967444812067534448120705344481205644481205249444812052564448120654944481206648444812070654448120494844481205349444812069674448120546744481206850444812056564448120495244481205451444812049674448120575644481205366444812053444812049674448120554448120525744481206956444812067494448120525344481206749444812069484448120705344481206848444812053494448120685644481205754444812065534448120554844481204952444812053534448120506744481205344481206548444812053444812049534448120676744481205544481205056444812068494448120525144481207051444812065574448120506844481206756444812053494448120504844481206967444812049494448120554844481204952444812054494448120525544481205049444812049704448120525344481204954444812053514448120514448120675544481206749444812052544448120575244481206952444812052574448120684844481205350444812049534448120516744481206752444812055524448120495244481205548444812056694448120566644481206669444812070514448120484448120565244481206868444812049494448120686944481205753444812069574448120494944481204965444812050494448120534448120504944481206752444812056704448120695644481206549444812052544448120494448120506544481205068444812066484448120534944481205648444812052704448120555644481205648444812049524448120574944481204952444812049574448120686844481205344481205050444812052534448120674448120525644481205249444812052534448120564944481205549444812050484448120544844481205349444812054674448120544844481205353444812051684448120495244481205650444812049674448120515144481206868444812053444812049524448120675644

Not showing the same decimal from the original while reading the template from the sensor which is

Output from sensor while reading the same template.
21106181392055901322291622936216615622013328197245865721611762501681236108210136209928152915287732321936919322424520881216150165112208544516052120474020967243169452008132236171122097713331692283319919370148228732088221601961162011214213919024301322211722214923317263353319614323216170142451768112879120128201452025221534691272656912911332968110896856120130285122152020010081681141061146012024419259112208348156222515143106167209691003313808112923561202013388159221534127142139128190132185221881248105822152536671657111322619488152124211112208931701656925712447216170983418920081641385811920824020216518744987656966186263281122022241492062593022277920716386569163240149208811242541751282066731494523146193136657022818720232811135215813820688220115952885982316170175142000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

From what it looks like you are facing data type or file format issue. Please share the code you used to write to the file. Also, how about using ".txt" as the file format?

@Gitare420
Copy link

Hi, has anyone found a solution? The truth is I don't have much to contribute, I've tried everything and I can't load the fingerprints from the txt file to the fingerprint reader, what most complicates me is adding the 0x to the templates, I don't understand very well what they do or how to put it before prefix in the uint8_t. Thank you very much in advance. @dody3030 @AsifKhan991

@cheotrix
Copy link

cheotrix commented Feb 8, 2023

Good evening everyone, did anyone manage to solve the problem?
I have the 502-f and I have tried several ways but I can not write the template in the FP, I have changed the buffer size to 768, I put a delay as the companion said and nothing, the error Storing Error still appears. @AsifKhan991 plss help us

@AsifKhan991
Copy link

Are u getting error msg in serial console? If yes share the error msg please.

@cheotrix
Copy link

Hi, thanks for your answer, I explain: when I try to send a template using your library I get error storing, doing debug I managed to see that the FP sends a code 18H that corresponds to error to save in flash. Looking at the datasheet of the R502-F I noticed that the template must have 1536 bytes of data, so I modified the buffer and still with your library gives me error.

With the help of Grow support people I did a test directly using a serial debug software, I finally got the sensor to save the template. Here is the file they sent me and it helped me.


使用串口助手实现,发送格式必为16进制 HEX格式
Using the CommAssistant implementation,send format must be hexadecimal,HEX format

上传模板所需发送的指令The instruction that needs to be sent to upload the template
1:EF 01 FF FF FF FF 01 00 06 07 01 00 00 00 0F//读出指纹库为00位置的模板Read template of fingerprint datasheet at position 00
2:EF 01 FF FF FF FF 01 00 04 08 01 00 0E //上传模板 缓冲区1 Upload template buffer 1
3:接收后续指纹模块发送的数据包Receive packets sent by the subsequent fingerprint module

下载指纹模板Download fingerprint Template
1:EF 01 FF FF FF FF 01 00 04 09 01 00 0F//下载缓冲区Download buffer
2:接收到00确认码后,发送准备好的数据包 After receiving the 00 confirmation code, send the prepared packet
3:EF 01 FF FF FF FF 01 00 06 06 01 00 10 00 1E//将模板存储存储在16号位置 Store the template in location 16

R建议将503上传的模板文件不做拆包合并处理,直接进行存储,发送的时候直接按循序发送即可,大部分人是在这一步出错.
It is suggested that the 503 uploaded template files should be stored directly instead of unpacking and merging. When you send it, just send it in order. Most people make mistakes in this step.

示例指纹模板数据,可以直接下载至指纹模块Example code of fingerprint template data, it can be downloaded to the fingerprint module directly
EF 01 FF FF FF FF 02 00 82 02 00 3F 6D 8B C1 0B 00 84 DD 18 DE 9F 03 05 B4 EB 85 16 04 C3 D6 71 47 A1 73 B6 A4 50 FC 6D 66 31 14 42 1C 2D 5D 05 11 07 B1 1C 71 B4 02 1C 88 58 88 F8 8A E1 63 1A 3C 26 CE 10 06 D0 49 C7 D5 61 44 F2 EC 64 88 84 F4 BC B1 3A 14 3E 32 35 C9 0A 4F 0C D3 F2 A1 44 43 54 9C 34 60 F0 D7 55 36 14 44 38 4F 3F C5 11 CE 95 70 61 44 A3 C5 2B 90 51 25 04 EA FF 24 3C 43 29 06 C5 13 91 12 FD 81 36 35 EF 01 FF FF FF FF 02 00 82 A4 44 DD 68 38 51 3D 7B 04 F4 14 5B 8E 8B BF 03 00 84 DC 17 DD BF 4F 05 B4 EB 85 16 02 41 95 B1 49 31 38 F5 9C 51 E8 5C EF A7 14 41 1B 2D 5E 85 13 06 D6 63 11 44 21 EC 47 14 6D 04 87 22 16 22 44 22 B8 58 C6 4F 09 B3 84 01 B4 12 EC 64 88 84 F8 BC AF 3C 14 46 32 35 C9 08 CF 0C D3 F2 A1 64 73 54 9C 34 60 F0 DB 57 3A 14 46 38 4F 3F C5 12 0E B5 B0 81 44 33 C5 2B 90 51 25 04 EA FF 21 3C 35 66 EF 01 FF FF FF FF 02 00 82 43 29 06 C5 14 D1 12 FD 81 64 44 DD 68 58 51 57 8E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 07 AB EF 01 FF FF FF FF 02 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 EF 01 FF FF FF FF 02 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 EF 01 FF FF FF FF 02 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 84 EF 01 FF FF FF FF 02 00 82 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 7B B3 B0 02 19 42 A3 01 80 11 D5 14 58 1F 58 90 B1 14 75 23 BC 91 D2 14 3F 29 AC 92 16 14 42 2D 48 11 BA 14 45 31 04 92 E1 1B 41 37 28 12 09 22 3F 3A A4 91 AF 1B 3E 41 54 12 1E 1B 40 54 44 11 9C 14 3F 5A 94 11 90 29 3C 7C 38 91 0B 14 4E 51 18 12 8F 21 3E 59 64 12 1B 63 EF 01 FF FF FF FF 02 00 82 93 15 43 5E 34 92 84 18 3C 5F 94 12 9A 14 45 63 64 92 7D 14 49 67 9C 12 82 14 42 6B 80 12 70 14 49 7C 48 12 EA 1B 43 77 C0 91 7D 23 3C 8E A4 12 07 14 4F 10 04 80 AA 14 8D 43 E0 00 AB 14 4C B2 F0 01 7A 14 5D 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 52 9C EF 01 FF FF FF FF 02 00 82 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 80 04 EF 01 FF FF FF FF 02 00 82 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 80 04 EF 01 FF FF FF FF 02 00 82 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 80 04 EF 01 FF FF FF FF 08 00 82 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 80 0A

@cheotrix
Copy link

@AsifKhan991 I still can't send template using your library, I think it has to do with the buffer size, it seems that being so big it generates some kind of error and the data is not sent complete.

@AsifKhan991
Copy link

Could be. Or may be the Hex commands are different for your module. Cross check your sensor's datasheet with standard adafruit one.

@cheotrix
Copy link

@AsifKhan991 uses exactly the same commands, the error occurred because for some reason this module does not accept a template with all the values in FF.

in conclusion to use your library with the R502-F you just have to change the buffer and send real templates, not use the memcpy.

Thanks for your help

@DharmikEC
Copy link

DharmikEC commented Mar 13, 2023

@AsifKhan991 , I am using R503 capacitive fingerprint sensor and wanted to store fingerprint data from cloud to new sensor. Your update woks fine with minor modification. Thank you very much for that.

I tried to merge your get fingerprint and store fingerprint examples in one. I failed initially and got error in write_template_to_sensor() function, later I added Serial2.read() as long as Serial2.available() remains true(Serial2 is a port I am using for my sensor). After this it works fine. What I don't understand is it gave me 447 bytes extra. What are those ?? Do you have any Idea about this ??

@DharmikEC
Copy link

@AsifKhan991 , I am using R503 capacitive fingerprint sensor and wanted to store fingerprint data from cloud to new sensor. Your update woks fine with minor modification. Thank you very much for that.

I tried to merge your get fingerprint and store fingerprint examples in one. I failed initially and got error in write_template_to_sensor() function, later I added Serial2.read() as long as Serial2.available() remains true(Serial2 is a port I am using for my sensor). After this it works fine. What I don't understand is it gave me 447 bytes extra. What are those ?? Do you have any Idea about this ??

OK so I was using 768 size but it turns out that template size is 1536 for R503 as well. I have changed the template size and it is working fine. Datasheet I was following was old so I have asked GROW directly they provided updated manual that I have attached below.

R503 fingerprint module user manual-V1.2.2.pdf

Thank you.

@Dygear
Copy link

Dygear commented Mar 30, 2023

@DharmikEC Hey! That's awesome thanks for attaching the sheet as well!

@WalsonJerry
Copy link

@AsifKhan991 WORKING.!!!!, Thank you too much, I ready don't know how to thank you,, Im sorry it's working, I forgot to copy the updated ccp. thanks alot

Waiting for valid finger.... Image taken Image converted Remove finger Place same finger again, waiting.... Image taken Image converted Creating model... Prints matched! Template created Attempting to get template... Transferring Template.... Template data (comma sperated HEX): 0x2,0x0,0x5,0x52,0x8B,0x11,0xC3,0x0,0x84,0x0,0x14,0x2C,0x9E,0x13,0xB,0x1C,0xD4,0x5,0x15,0xC3,0xC,0x14,0x81,0x45,0x60,0xE1,0x41,0x88,0x51,0xC0,0x4C,0x57,0x52,0x14,0x66,0x17,0x93,0x46,0x45,0x17,0x46,0x4,0x1D,0x41,0x45,0xC1,0xC2,0x89,0xA4,0x50,0xF4,0x72,0x27,0x44,0x14,0x55,0x21,0x92,0x98,0x85,0x10,0xC9,0x61,0x51,0x41,0x44,0x82,0x75,0x99,0x50,0x52,0x34,0xB2,0x93,0x5A,0x14,0x40,0x2F,0x36,0x16,0x45,0x15,0x8C,0x12,0x26,0x61,0x47,0x43,0x9,0x7D,0x38,0x50,0xF0,0xEE,0xA2,0x62,0x14,0x53,0x46,0x91,0xD2,0x5,0x18,0x12,0xB6,0xC4,0xF1,0x49,0xC4,0xD0,0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x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0, 0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0

please can someone help me here nothing is printing in my serial monitor

@ArthurPalladino
Copy link

ArthurPalladino commented May 7, 2024

Hi, i am trying to use the "get_direct_template" and the "show_saved_templates" but i have a problem with "get_template_buffer" function " if (finger.get_template_buffer(512, f_buf) == FINGERPRINT_OK) { //read the template data from sensor and save it to buffer f_buf". Can someone help me? Im using DY50 sensor with 256 packet len. and the template size is 512

@Irfanislam
Copy link

@AsifKhan991 @cheotrix @WalsonJerry
Can anyone share changes made to work with R503, I have tried but stuck at "Faied to write to flash". Please Help

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