Giter Club home page Giter Club logo

r30x-fingerprint-sensor-library's Introduction

R30X-Fingerprint-Sensor-Library

An Arduino compatible library for R30X series optical fingerprint sensor/scanner from Hangzhou Grow Technology. The library is written in a manner to be easily readable and thus modifiable.

Tutorial

A detailed tutorial on interfacing the modules and using the library is available on my project website : https://circuitstate.com/tutorials/interfacing-r307-optical-fingerprint-scanner-with-arduino/ (this repo may be newer than what's described in the tutorial). I still need to implement two functions for importing and exporting fingerprint templates and images from and to the sensor.

Installing

To install the library to your computer, open the Library Manager from the Arduino IDE and search for "R30X fingerprint scanner". Then install the latest version from the list.

Tested Boards

The library was tested with Arduino Due and Arduino Uno using R307 fingerprint scanner. To wire up, connect the TX and RX pins to the TX1 and RX1 pins of Due or Mega. If you're using Uno or similar boards with only one hardware UART, use SoftwareSerial for the fingerprint sensor and hardware UART for debugging.

Even though not tested, the library is expected to work with other Arduino compatible microcontrollers and boards such as ESP8266, ESP32, STM32 Nucleo, TI Launchpad etc.

Example

The example sketch can invoke all implemented functions from a serial terminal with short commands and input parameters. Below is the list of available commands.

All commands and parameters must be separated by single whitespace.

  • clrlib - clear library
  • tmpcnt - get templates count
  • readsys - read system parameters
  • setdatlen <data length> - set data length
  • capranser <timeout> <start location> <quantity> - capture and range search library for fingerprint
  • capfulser - capture and full search the library for fingerprint
  • enroll <location> - enroll new fingerprint
  • verpwd <password> - verify 4 byte device password
  • setpwd <password> - set new 4 byte device password
  • setaddr <address> - set new 4 byte device address
  • setbaud <baudrate> - set the baudrate
  • reinitprt <baudrate> - reinitialize the port without changing device configuration
  • setseclvl <level> - set security level
  • genimg - generate image
  • genchar <buffer id> - generate character file from image
  • gentmp - generate template from character buffers
  • savtmp <buffer id> <location> - save template to library from buffer
  • lodtmp <buffer id> <location> - load template from library to buffer
  • deltmp <start location> <quantity> - delete one or more templates from library
  • mattmp - precisely match two templates available on buffers
  • serlib <buffer id> <start location> <quantity> - search library for content on the buffer

Troubleshooting

When something is not working, upload the example sketch to your board and run the commands to check if they're working as expected.

  1. Getting "Password is not correct" message

    New modules will be coming with the default password and device address 0xFFFFFFFF. If the example sketch complains about wrong password, then try running the setpwd command. For example,

    setpwd FFFFFFFF

  2. Getting "Invalid command" message

    If your serial terminal application is sending NL/CR characters automatically, try turing this off. For example, you can turn this feature off at Arduino serial monitor.

r30x-fingerprint-sensor-library's People

Contributors

magnimous avatar papadenis avatar vishnumaiea 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

Watchers

 avatar  avatar  avatar  avatar  avatar

r30x-fingerprint-sensor-library's Issues

Send image to PC

Hi, thanks to write the library. I have a problem, how to send image fingerprint from arduino to PC, I hope my problem can be solve. I'm sorry my english is bad. Thank you

Password verification fails

I'm using a GROW R311. Checking the default password never passes, but nevertheless, the functions work further: for example, enrolling new fingers you can do.

Command string = verpwd
First param = ffffffff

Sent packet = EF-1-FF-FF-FF-FF-1-0-7-13-FF-FF-FF-FF-4-17
txInstructionCode = 13
txDataBufferLength = 4
txPacketLengthL = 7

Reading response.
Checksums match success.
Received = 0-1D
Received L = 1D
Calculated = 0-1D
Calculated L = 1D
Received packet = EF-1-FF-FF-FF-FF-7-0-3-13-0-1D
Data stream = none
rxConfirmationCode = 13
rxDataBufferLength = 0
rxPacketLengthL = 3
rxPacketLength[] = 0-3
Password is not correct.
Current Password = FFFFFFFF
rxConfirmationCode = 13
response == 19
...........................

Export fingerprint data

Hi,
Thanks for the great work you are doing writing this library.
Could you please advise how to export templates to some external database in order to have a backup in case of sensor module fault ?
Thanks in advance.

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.