Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template transfer feature #116

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

AsifKhan991
Copy link

@AsifKhan991 AsifKhan991 commented Sep 3, 2022

Shortcomings of previous version:

  • "show_fingerprint_templates.ino" example couldn't fetch full template data and used to mix up packet headers and other peripheral data with template data. This was due to variance in data packet length.
  • The Adafruit_Fingerprint_Packet structure didn't adapt to the data packet length. This is crucial for correctly getting template data from sensor and writing back to it.
  • Didn't contain any function to write back template data to the sensor.

Changes made to the updated Library:

  • Added get_template_buffer() function to transfer finger print template data to upper computer without data loss. (upper computer refers to the microcontroller you are using )
  • Added write_template_to_sensor() function to write fingerprint template data to the sensor from the upper computer
  • Called the getParameters() functions within verifyPassword() function to properly set up parameters at the start.
  • Made the Adafruit_Fingerprint_Packet structure to adapt buffers up to 256 bytes, depending on the sensor's data packet length. This ensures efficient transfer of template data.
  • Adapt to run all the original examples flawlessly.
  • Added two new examples for the new functionalities.

Platform support:

The library is tested on esp32 and Arduino Mega 2560 platform. But supposed to work flawlessly with all the other boards having adequate RAM (1Kb or more)

Caution:

The template transfer examples are recommended to be used with microcontroller's having RAM no less than 1kbyte. (as the template data itself is 512 Bytes for most of the sensors).

Adapt to controllers having lower RAM:

  • Lower data packet length using setPacketSize() function.
  • Change the buffer size from 256 to your new data packet length in line #150, #153 and #159 in the "Adafruit_Fingerprint.h" file.
  • Make multiple chunks of total 512 byte buffer to store the template. where a chunk size= data packet length

updated to 2.1.1
added template transfer support
example for saving template to SD card
example of saving template to external sd card
Example to write back saved template data to the sensor from an external SD card
Arduino cli dependency solve
Basic example of reading template data and store in an array buffer
Basic example to properly write template data to the sensor and enroll against an ID.
…late_to_sensor.ino to examples/template_transfer/write_to_sensor/write_to_sensor.ino
@Dygear
Copy link

Dygear commented Sep 6, 2022

Excellent work! Glad to see syncing now implanted and possible across multiple devices.

Fixed template buffer size issues
Fixed template size issues
Clarified the buf size issue
…e.ino to examples/template_transfer/get_direct_template/get_direct_template.ino
example to show already saved template data
@p2baron
Copy link

p2baron commented Mar 26, 2024

Will this get merged someday?

@Dygear
Copy link

Dygear commented Apr 7, 2024

Yep, that would be nice. @p2baron

@p2baron
Copy link

p2baron commented Apr 7, 2024

Yep, that would be nice. @p2baron

In the meantime I've created a fork with some of the pending PR's and added missing functionality for automatic registration and verification.

@Dygear
Copy link

Dygear commented Apr 12, 2024

@ladyada & @evaherrada any chance that this gets merged into main?

@ladyada
Copy link
Member

ladyada commented Apr 13, 2024

its not scheduled - since it would require a lot of testing. pleae manually install the fork to use this feature and let us know if it works!

@Dygear
Copy link

Dygear commented Apr 30, 2024

I've been over the code, looks good to me. Think it's worth squashing the commits into one. There are a few commits that are just creating a file, deleting a file, and moving a file. Three commits for really one action makes it much harder to follow some of the code changes. @AsifKhan991 Other than that, really great job on this.

@ajshojol22
Copy link

how to compare two templates?

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

Successfully merging this pull request may close these issues.

5 participants