Back to engineering archive

Record 020 / Firmware and control

Fingerprint enrolment and verification firmware

Firmware for enrolling fingerprints and checking subsequent reads against stored records.

Firmware development
Fingerprint interfaceEnrolmentVerification logic

Firmware flow

How a fingerprint is checked

Fingerprint verification routine.

Wait for an image, convert it to a fingerprint template and search stored records. A conversion error stops the routine; the search reports either a matching ID and confidence or a no-match error.

The function waits for an image without a timeout in the supplied code. It reports search results, not an independently measured recognition rate.

Read the implementation

verifyReload · selected source lines 260–280. Source inspection is not a hardware test.

void verifyReload() {
  Serial.println(F("❓ Verify: place the same finger…"));
  // 1) wait for finger
  while (finger.getImage() != FINGERPRINT_OK) delay(50);
  if (finger.image2Tz(1) != FINGERPRINT_OK) {
    Serial.println(F("⚠️ image2Tz fail"));
    return;
  }
  // 2) search the buffer 1 template against slot 1
  uint8_t res = finger.fingerFastSearch();
  if (res == FINGERPRINT_OK) {
    Serial.print(F("✅ Match! ID="));
    Serial.print(finger.fingerID);
    Serial.print(F("  Confidence="));
    Serial.println(finger.confidence);
  } else {
    Serial.print(F("❌ No match (err 0x"));
    Serial.print(res, HEX);
    Serial.println(F(")"));
  }
}
Open the exact source-level diagram
ActionWait for a fingerprint imageRequest another image every 50 ms until acquisition succeeds.
Result · NoReport conversion failure and stop
Result · YesReport the ID and confidence
Result · NoReport no match and the error code

Technical notes

Sensor connection

sensorSerialBegin() provides a communication setup step separate from fingerprint enrolment and verification. This keeps transport handling identifiable.

Fingerprint enrolment

enrollFingerprint() handles registration separately from later fingerprint checks.

Stored model handling

downloadModelToString() and reloadFingerprint() handle model representation and reloading separately from matching a presented fingerprint.

Engineering archiveArchive record

Project enquiries

Discuss your project.

Tell us what you’re developing and where you need engineering support.

Discuss your project