R503 Fingerprint Module Manual
R503 Fingerprint Module Manual
User Manual
1 www.hzgrow.com
Preface & Declaration
Thank you for you selection of R503/R503-M22 Fingerprint Identification Module of
GROW.
The Manual is targeted for hardware & software development engineer, covering
module function, hardware and software interface etc. To ensure the developing process
goes smoothly, it is highly recommended the Manual is read through carefully.
Because of the products constantly upgraded and improved, module and the manual
content may be changed without prior notice. If you want to get the latest information,
please visit our company website (www.hzgrow.com).
We have been trying our best to ensure you the correctness of the Manual. However, if
you have any question or find error, feel free to contact us or the authorized agent. We
would be very grateful.
The Manual contains proprietary information of Hangzhou Grow Technology Co., Ltd.,
which shall not be used by or disclosed to third parties without the permission of GROW,
nor for any reproduction and alteration of information without any associated warranties,
conditions, limitations, or notices.
No responsibility or liability is assumed by GROW for the application or use, nor for
any infringements of patents or other intellectual property rights of third parties that may
result from its use.
www.hzgrow.com
I www.hzgrow.com
Revised Version
Version
Date Revise Content Modifier
Number
1. LED colors increased from three to seven,
and the instruction formats were downward
compatible.
2. Added 0x31 automatic registration template:
the upper computer can automatically collect 6
images by sending only one command, and then
generate templates for saving.
V1.2 2021.10 3. Added 0x32 automatic fingerprint Grow Tech
verification: the upper computer can only send
one command to realize image collection,
generate features, search and compare the
fingerprint database, and return the comparison
results
4. Added template upload procedure flow
5. Added template download process
1. Added Power Supply Requirements,Ripple
noise
V1.2.1 2022.03 Grow Tech
2. Update Command: The note of UpChar and
DownChar
V1.2.2 2022.10 1. Added Buffer contents Grow Tech
1. Added Basic communication flow and
general instruction communication flow
2. Updated Acknowledge package format of
Read product information Command (0x3C)
V1.3 2023.06 Grow Tech
3. Updated Automatic fingerprint verification
Command (0x32)
4. Updated Automatic registration template
Command (0x31)
V1.4 2023.07 1. Added R503-M22 Size Version Grow Tech
1. Updated Security level,Checksum
V1.4.1 2023.09 2. Added example instruction for Grow Tech
AuraLedConfig, AutoEnroll, AutoIdentify
II www.hzgrow.com
Catalog
I Introduction ................................................................................................................................... - 1 -
Operation Principle ..................................................................................................................... - 1 -
II Hardware Interface .......................................................................................................................- 2 -
Exterior Interface ........................................................................................................................ - 2 -
R503 Info ............................................................................................................................ - 2 -
R503-M22 Info ................................................................................................................... - 2 -
Serial Communication ................................................................................................................ - 3 -
Hardware Connection ................................................................................................................. - 3 -
Serial communication protocol ...................................................................................................- 3 -
Power-on delay time ................................................................................................................... - 4 -
Power Supply Requirements ...................................................................................................... - 4 -
Ripple noise ................................................................................................................................ - 4 -
III System Resources ....................................................................................................................... - 5 -
Notepad ....................................................................................................................................... - 5 -
Buffer .......................................................................................................................................... - 5 -
Fingerprint Library ..................................................................................................................... - 5 -
System Configuration Parameters .............................................................................................. - 5 -
Baud rate control (Parameter Number: 4) .......................................................................... - 6 -
Security Level (Parameter Number: 5) .............................................................................. - 6 -
Data package length (Parameter Number: 6) ..................................................................... - 6 -
System status register ................................................................................................................. - 6 -
Module password ........................................................................................................................- 6 -
Module address ........................................................................................................................... - 6 -
Random number generator ......................................................................................................... - 7 -
Features and templates ................................................................................................................- 7 -
IV Communication Protocol ............................................................................................................- 8 -
Data package format ................................................................................................................... - 8 -
Instruction Table ......................................................................................................................... - 9 -
Check and acknowledgement of data package ...........................................................................- 9 -
V Module Instruction System ........................................................................................................ - 11 -
System-related instructions .......................................................................................................- 11 -
Verify password VfyPwd ...............................................................................................- 11 -
Set password SetPwd ...................................................................................................- 11 -
Set Module address SetAdder .............................................................. - 12 -
Set module system’s basic parameter SetSysPara .......................................................- 12 -
Read system Parameter ReadSysPara .......................................................- 13 -
Read valid template number TempleteNum ..............................................................- 13 -
Read fingerprint template index table ReadIndexTable (0x1F) ..............................- 14 -
Get the algorithm library version GetAlgVer (0x39) .............................................. - 15 -
Get the firmware version GetFwVer (0x3A) .............................................................- 15 -
Read product information ReadProdInfo (0x3C) ......................................................- 16 -
Fingerprint-processing instructions .......................................................................................... - 17 -
To collect finger image GetImg .................................................................................- 17 -
To upload image UpImage ...................................................................................... - 17 -
III www.hzgrow.com
To download the image DownImage .......................................................................- 18 -
To generate character file from image GenChar ....................................................... - 19 -
To generate template RegModel ............................................................................- 19 -
To upload template UpChar .......................................................................................- 20 -
To download template DownChar ...............................................................................- 20 -
To store template Store ............................................................................................ - 21 -
To read template from Flash library LoadChar .......................................................- 22 -
To delete template DeletChar .............................................................................. - 22 -
To empty finger library Empty .............................................................................. - 23 -
To carry out precise matching of two finger templates Match ............................. - 23 -
To search finger library Search ........................................................................... - 24 -
Fingerprint image collection extension command GetImageEx(0x28) ....................- 24 -
Cancel instruction Cancel(0x30) ......................................................................... - 25 -
HandShake HandShake (0x40) ......................................................................... - 26 -
CheckSensor CheckSensor (0x36) ..................................................................... - 26 -
Soft reset SoftRst (0x3D) .................................................................................. - 27 -
Aura control AuraLedConfig (0 x35) .............................................................- 27 -
Automatic registration template AutoEnroll (0 x31) ....................................... - 28 -
Automatic fingerprint verification AutoIdentify (0 x32) ................................. - 31 -
Other instructions ......................................................................................................................- 32 -
To generate a random code GetRandomCode ....................................... - 32 -
To read information page ReadInfPage .......................................................................- 33 -
To write note pad WriteNotepad ..............................................................................- 33 -
To read note pad ReadNotepad ................................................................................- 34 -
Ⅵ Operation Process ..................................................................................................................... - 35 -
6.1 Basic communication flow ................................................................................................. - 35 -
6.1.1 Process of the UART command package ................................................................ - 35 -
6.1.2 UART Packet Sending Process ............................................................................... - 36 -
6.1.3 UART packet receiving process .............................................................................. - 37 -
6.2 General instruction communication flow ........................................................................... - 38 -
6.2.1 General instruction register fingerprint process ......................................................- 38 -
6.2.2 General instruction verity fingerprint process .........................................................- 39 -
6.2.3 Read a specified template upload to Flash Fingerprint Database ........................... - 40 -
6.3 Automatic Register Fingerprint .......................................................................................... - 41 -
6.4 Automatic Fingerprint Verification(Search) .......................................................................- 42 -
6.5 Low power standby .............................................................................................................- 43 -
Ⅶ Reference Circuit .....................................................................................................................- 44 -
IV www.hzgrow.com
I Introduction
Operation Principle
Fingerprint processing includes two parts: fingerprint enrollment and fingerprint matching (the
matching can be 1:1 or 1:N).
When enrolling, user needs to enter the finger two times. The system will process the two time
finger images, generate a template of the finger based on processing results and store the template.
When matching, user enters the finger through optical sensor and system will generate a template
of the finger and compare it with templates of the finger library. For 1:1 matching, system will
compare the live finger with specific template designated in the Module; for 1:N matching, or
searching, system will search the whole finger library for the matching finger. In both
circumstances, system will return the matching result, success or failure.
-1- www.hzgrow.com
II Hardware Interface
Exterior Interface
R503 Info
Connector: SH1.0--6P Thread:M25
Product external diameter: 28mm Inner diameter:25mm Height:19mm
Enclosure material: Zinc Alloy
(Standard height is 19mm, also have 15mm and 32mm height,or need black aluminium alloy
enclosure, pls contact sales, support customized)
R503-M22 Info
Connector: SH1.0--6P Thread:M22
Enclosure material: Zinc Alloy
Product external diameter: 25mm Inner diameter:22mm Height:15mm
-2- www.hzgrow.com
Serial Communication
Connector: SH1.0--6P
Pin Name Description Pic
Signal ground.
2 GND
Connected to power ground.
Hardware Connection
The RX of the module is connected with the TX of the upper computer, and the TX of the module
is connected with the RX of the upper computer. The IRQ signal can be connected with the middle
fracture or IO port of the upper computer.
To reduce the system standby power consumption,when the upper computer needs to use the
fingerprint module,then power on the main power supply of the fingerprint module. At this time,
the fingerprint module is powered on,and complete the corresponding instructions sent by the upper
computer.When the upper computer does not need to use the fingerprint module, disconnect the
fingerprint module from the main power supply.
When the upper computer is in standby mode, in order to keep the finger touch detection, the touch
power supply needs to be powered all the time. The working voltage of the touch power supply is
3V~5V, and the average current of the touch power supply is about 2uA. When there is no finger
touch, the default touch sensing signal outputs high level; When a finger touches, the default touch
sensing signal outputs low level. After detecting the touch sensing signal, the upper computer
supplies power to the fingerprint module and the fingerprint module starts to work.
The maximum response time of the touch function is about 120mS @vt =3.3V. When the module is
not touched, the recalibration period is about 4.0sec; the touch signal output is CMOS output, and
the output voltage is roughly the same as the input voltage.
The mode is semiduplex asychronism serial communication. And the default baud rate is 57600bps.
User may set the baud rate in 9600~115200bps。
Transferring frame format is 10 bit: the low-level starting bit, 8-bit data with the LSB first, and an
ending bit. There is no check bit.
-3- www.hzgrow.com
Power-on delay time
At power on, it takes about 50ms for initialization. During this period, the module can’t accept
commands for upper computer.After completing the initialization, the module will immediately
send a byte (0x55) to the upper computer, indicating that the module can work normally and
receive instructions from the upper computer.
Ripple noise
Since the power input of R503/R503-M22 is directly supplied to the image sensor and decoding
chip.
To ensure stable operation, pls use low ripple noise power input.
It is recommended that the ripple noise not exceed 50mV (peak-to-peak).
-4- www.hzgrow.com
III System Resources
To address demands of different customer, Module system provides abundant resources at user’s
use.
Notepad
The system sets aside a 512-bytes memory (16 pages* 32 bytes) for user’s notepad, where data
requiring power-off protection can be stored. The host can access the page by instructions of
PS_WriteNotepad and PS_Read Notepad.
Note: when write on one page of the pad, the entire 32 bytes will be written in wholly covering the
original contents.
The user can run the module address or random number command to configure the unique
matching between the module and the system. That is, the system identifies only the unique module.
If a module of the same type is replaced, the system cannot access the system.
Buffer
The module RAM resources are as follows:
An ImageBuffer: ImageBuffer
6 feature buffers: CharBuffer[1:6]
All buffer contents are not saved without power.
The user can read and write any buffer by instruction. CharBuffer can be used to store normal
feature files or store template feature files.
When uploading or downloading images through the UART port, only the high four bits of pixel
bytes are used to speed up the transmission, that is, use gray level 16, two pixels are combined into one
byte. (The high four bits are a pixel, the low four bits are a pixel in the next adjacent column of the same
row, that is, two pixels are combined into one byte and transmitted)
Since the image has 16 gray levels, when it is uploaded to PC for display (corresponding to BMP
format), the gray level should be extended (256 gray levels, that is, 8bit bitmap format).
Fingerprint Library
System sets aside a certain space within Flash for fingerprint template storage, that’s fingerprint
library. The contents of the fingerprint database are protected by power-off, and the serial number
of the fingerprint database starts from 0.
Capacity of the library changes with the capacity of Flash, system will recognize the latter
automatically. Fingerprint template’s storage in Flash is in sequential order. Assume the fingerprint
capacity N, then the serial number of template in library is 0, 1, 2, 3 … N. User can only access
library by template number.
-5- www.hzgrow.com
configuration.
The Parameter controls the UART communication speed of the Module. Its value is an integer N,
N= [1/2/4/6/12]. Corresponding baud rate is 9600*N bps。
The Parameter controls the matching threshold value of fingerprint searching and matching.
Security level is divided into 5 grades, and corresponding value is 1, 2, 3, 4, 5. At level 1, FAR is
the highest and FRR is the lowest; however at level 5, FAR is the lowest and FRR is the highest.
The parameter decides the max length of the transferring data package when communicating with
upper computer. Its value is 0, 1, 2, 3, corresponding to 32 bytes, 64 bytes, 128 bytes, 256 bytes
respectively.
Module password
The default password of the module is 0x00000000. If the default password is modified, after the
module is powered on,the first instruction of the upper computer to communicate with the module
must be verify password. Only after the password verification is passed, the module will enter the
normal working state and receive other instructions.
The new modified password is stored in Flash and remains at power off.(the modified password
cannot be obtained through the communication instruction. If forgotten by mistake, the module
cannot communicate, please use with caution)
Refer to instruction SetPwd and VfyPwd.
Module address
Each module has an identifying address. When communicating with upper computer, each
instruction/data is transferred in data package form, which contains the address item. Module
system only responds to data package whose address item value is the same with its identifying
address.
-6- www.hzgrow.com
The address length is 4 bytes, and its default factory value is 0xFFFFFFFF. User may modify the
address via instruction SetAddr. The new modified address remains at power off.
-7- www.hzgrow.com
IV Communication Protocol
The protocol defines the data exchanging format when R503/R503-M22 series communicates with
upper computer. The protocol and instruction sets apples for both UART communication mode.
Baud rate 57600, data bit 8, stop bit 1, parity bit none.
Header Start 2 bytes Fixed value of 0xEF01; High byte transferred first.
-8- www.hzgrow.com
Instruction Table
Code Identifier Description Code Identifier Description
01H GenImg Collect finger image 12H SetPwd To set password
02H Genchar To generate character file 13H VfyPwd To verify password
from image
03H Match Carry out precise 14H GetRandomCo to get random code
matching of two de
templates;
04H Search Search the finger library 15H SetAdder To set device address
05H RegModel To combine character files 16H ReadInfPage Read information page
and generate template
06H Store To store template; 18H WriteNotepad to write note pad
07H LoadChar to read/load template 19H ReadNotepad To read note pad
08H UpChar to upload template 1DH TempleteNum To read finger template
numbers
09H DownChar to download template 1FH ReadIndexTabl Read-fingerprint
e template index table
0AH UpImage To upload image 0x28 GetImageEx Fingerprint image collection
extension command
0BH DownImage To download image 0x30 Cancel Cancel instruction
0CH DeletChar to delete templates 0x40 HandShake HandShake
0DH Empty to empty the library 0x36 Check CheckSensor
Sensor
0EH SetSysPara To set system Parameter 0x39 GetAlgVer Get the algorithm library
version
0FH ReadSysPar To read system Parameter 0x3C ReadProdInfo Read product
a information
0x3A GetFwVer Get the firmware version 0x35 Aura control AuraLedConfig
0x3D SoftRst Soft reset 0x32 AutoIdentify Automatic fingerprint
verification
0x31 AutoEnroll Automatic registration
template
- 10 - www.hzgrow.com
V Module Instruction System
System-related instructions
- 11 - www.hzgrow.com
Set Module address SetAdder
- 12 - www.hzgrow.com
Name Parameter number Content
Data range:1, 2/4/6/12,
Baud rate
4 indicates that baud rate is 9600 * N bps
Security level 5 Data range: 1, 2, 3, 4, 5
Data range: 0, 1, 2, 3 the corresponding lengths (bytes)
Packet content length
6 are as follows: 32, 64, 128, 256
- 13 - www.hzgrow.com
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module address Package Package Instruction Checksum
identifier length code
0xEF01 xxxx 01H 0003H 1dH 0021H
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes 2 bytes
Header Module Package Package Confirmation Template Checksum
address identifier length code number
0xEF01 xxxx 07H 0005H xxH Num sum
Note: Confirmation code=0x00: read success;
Confirmation code=0x01: error when receiving package;
Description: Read the fingerprint template index table of the module, read the index table of the
fingerprint template up to 256 at a time (32 bytes)
Input Parameter: Index page
Return Parameter: Confirmation code+Fingerprint template index table
Instruction code: 0x1F
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes
Header Module Package Package Instruction Index page Checksum
address identifier length code
0xEF01 xxxx 0x01 0x0004 0x1F 0/1/2/3 Sum
Index tables are read per page, 256 templates per page
Index page 0 means to read 0 ~ 255 fingerprint template index table
Index page 1 means to read 256 ~ 511 fingerprint template index table
Index page 2 means to read 512 ~ 767 fingerprint template index table
Index page 3 means to read 768 ~ 1023 fingerprint template index table
- 14 - www.hzgrow.com
Index table data 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
… …
T[31] Template number 255 254 253 252 251 250 249 248
Index table data 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
Data "0" in the index table means that there is no valid template in the corresponding position;"1"
means that there is a valid template in the corresponding position.
Product information: store in the following order.For Numbers, the high byte comes first.For a
string, the insufficient part is 0x00.
Code Bytes Meaning
PARAM_FPM_MODEL 16 module type, ASCII
PARAM_BN 4 Module batch number, ASCII
PARAM_SN 8 Module serial number, ASCII
For the hardware version, the first byte represents the
PARAM_HW_VER 2 main version and the second byte represents the
sub-version
PARAM_FPS_MODEL 8 Sensor type, ASCII
PARAM_FPS_WIDTH 2 Sensor image width
PARAM_FPS_HEIGHT 2 Sensor image height
PARAM_TMPL_SIZE 2 Template size
PARAM_TMPL_TOTAL 2 Fingerprint database size
Other 4 System Reserved
- 16 - www.hzgrow.com
Fingerprint-processing instructions
Description: detecting finger and store the detected finger image in ImageBuffer while
returning successfully confirmation code; If there is no finger, returned confirmation code
would be “can’t detect finger”.
The difference between GetImageEx and GetImage instruction:
GetImage: When the image quality is poor, return confirmation code 0x00 (the image is
successfully captured).
GetImageEx: When image quality is poor, return confirmation code 0x07 (image quality
is too poor).
Input Parameter: none
Return Parameter: Confirmation code (1 byte)
Instruction code: 01H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package length Instruction Checksum
address identifier code
0xEF01 Xxxx 01H 0003H 01H 0005H
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package Confirmation Checksum
address identifier length code
0xEF01 Xxxx 07H 0003H xxH Sum
Note: Confirmation code=00H: finger collection success;
Confirmation code=01H: error when receiving package;
Confirmation code=02H: can’t detect finger;
Confirmation code=03H: fail to collect finger;
- 17 - www.hzgrow.com
Note 1: Confirmation code=00H: ready to transfer the following data packet;
Confirmation code=01H: error when receiving package;
Confirmation code=0fH: fail to transfer the following data packet;
2. The upper computer sends the command packet, the module sends the acknowledge
packet first, and then sends several data packet.
3. Packet Bytes N is determined by Packet Length. The value is 128 Bytes before
delivery.
Data package format:
2 bytes 4bytes 1 byte 2 bytes N bytes 2 bytes
Header Module Package identifier Package Package Checksum
address length content
0xEF01 xxxx 0x02- have N+2 Image data sum
following packet
0x08 - end packet
- 18 - www.hzgrow.com
To generate character file from image GenChar
Description: to generate character file from the original finger image in ImageBuffer
Input Parameter: BufferID (character file buffer number)
Return Parameter: Confirmation code (1 byte)
Instruction code: 02H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes
Header Module Package Package Instruction Buffer Checksum
address identifier length code number
0xEF01 xxxx 01H 0004H 02H CharBuffer sum
ID
CharBufferID: Character buffer number, range 1-6.
The R300-A module requires a minimum of four and a maximum of six fingerprint
features for the generate template.
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
- 19 - www.hzgrow.com
0xEF01 xxxx 07H 0003H xxH sum
Note: Confirmation code=00H: operation success;
Confirmation code=01H: error when receiving package;
Confirmation code=0aH: fail to combine the character files. That’s, the character files
don’t belong to one finger.
Description: Upload the data in the template buffer ModelBuffer to the upper computer.
Input Parameter: CharBufferID
Return Parameter: Confirmation code (1 byte)
Instruction code: 08H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes
Header Module Package Package Instruction Buffer Checksum
address identifier length code number
0xEF01 xxxx 01H 0004H 08H CharBuffer sum
ID
Note: This command don’t need to use the CharBufferID, so the CharBufferID can be
any value between 1 and 6.
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package Confirmation Checksum
address identifier length code
0xEF01 xxxx 07H 0003H xxH sum
Note 1: Confirmation code=00H: ready to transfer the following data packet;
Confirmation code=01H: error when receiving package;
Confirmation code=0dH: error when uploading template;
Confirmation code=0fH: can not receive the following data packet
4. The upper computer sends the command packet, the module sends the acknowledge
packet first, and then sends several data packet.
5. Packet Bytes N is determined by Packet Length. The value is 128 Bytes before
delivery.
6: The instruction doesn’t affect buffer contents.
Data package format:
2 bytes 4bytes 1 byte 2 bytes N bytes 2 bytes
Header Module Package identifier Package Package Checksum
address length content
0xEF01 xxxx 0x02- have N+2 Template sum
following packet data
0x08 - end packet
- 20 - www.hzgrow.com
Return Parameter: Confirmation code (1 byte)
Instruction code: 09H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes
Header Module Package Package Instruction Buffer number Checksum
address identifier length code
0xEF01 xxxx 01H 0004H 09H CharBufferID sum
Note: This command don’t need to use the CharBufferID, so the CharBufferID can be
any value between 1 and 6.
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package Confirmation Checksum
address identifier length code
0xEF01 xxxx 07H 0003H xxH sum
Note 1: Confirmation code=00H: ready to transfer the following data packet;
Confirmation code=01H: error when receiving package;
Confirmation code=0eH: can not receive the following data packet
Data package format:
2 bytes 4bytes 1 byte 2 bytes N bytes 2 bytes
Header Module Package identifier Package Package Checksum
address length content
0xEF01 xxxx 0x02- have N+2 Template sum
following packet data
0x08 - end packet
Note 2. The upper computer sends the command packet, the module sends the acknowledge
packet first, and then sends several data packet.
3.Packet Bytes N is determined by Packet Length. The value is 128 Bytes before
delivery.
4. The instruction doesn’t affect buffer contents.
Description: to store the template of specified buffer (Buffer1/Buffer2) at the designated location of
Flash library.
Input Parameter: CharBufferID, ModelID
Return Parameter: Confirmation code (1 byte)
Instruction code: 06H
Command (or instruction) package format:
- 21 - www.hzgrow.com
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package Confirmation Checksum
address identifier length code
0xEF01 Xxxx 07H 0003H xxH sum
Note: Confirmation code=00H: storage success;
Confirmation code=01H: error when receiving package;
Confirmation code=0bH: addressing ModelID is beyond the finger library;
Confirmation code=18H: error when writing Flash.
Description: to delete a segment (N) of templates of Flash library started from the specified
location (or PageID);
Input Parameter: StartID + Num
Return Parameter: Confirmation code (1 byte)
Instruction code: 0cH
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes 2bytes 2 bytes
Header Module Package Package Instruction Page number of Checksum
- 22 - www.hzgrow.com
address identifier length code number templates to
be deleted
0xEF01 Xxxx 01H 0007H 0cH StartID Num sum
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package identifier Package Confirmation Checksum
address length code
0xEF01 Xxxx 07H 0003H xxH sum
Note: Confirmation code=00H: delete success;
Confirmation code=01H: error when receiving package;
Confirmation code=10H: faile to delete templates;
Confirmation code=18H: error when write FLASH
- 23 - www.hzgrow.com
0xEF01 Xxxx 01H 0003H 03H 0007H
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes 2 bytes
Header Module Package Package Confirmation Matching Checksum
address identifier length code score
0xEF01 Xxxx 07H 0005H XxH MatchScore sum
Note 1: Confirmation code=00H: templates of the two buffers are matching!
Confirmation code=01H: error when receiving package;
Confirmation code=08H: templates of the two buffers aren’t matching;
2: The instruction doesn’t affect the contents of the buffers.
Description: to search the whole finger library for the template that matches the one in CharBuffer1
or CharBuffer2. When found, PageID will be returned.
Input Parameter: CharBufferID + StartID + Num
Return Parameter: Confirmation code+ModelID(template number)+ MatchScore
Instruction code: 04H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes 2 bytes 2 bytes
Description: Detect the finger, record the fingerprint image and store it in ImageBuffer, return it
and record the successful confirmation code;If no finger is detected, return no finger confirmation
code(the module responds quickly to each instruction,therefore, for continuous detection, cycle
processing is required, which can be limited to the number of cycles or the total time).
Differences between GetImageEx and the GetImage:
- 24 - www.hzgrow.com
GetImage: return the confirmation code 0x00 when the image quality is too bad (image
collection succeeded)
GetImageEx: return the confirmation code 0x07 when the image quality is too bad (poor
collection quality)
Input Parameter: none
Return Parameter: Confirmation code
Instruction code: 0x28
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package length Instruction code Checksum
address identifier
0xEF01 xxxx 0x01 0x0003 0x28 002CH
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package Confirmation Checksum
address identifier length code
0xEF01 xxxx 0x07 0x0003 X sum
Note 1: Confirmation code=0x00: read success
Confirmation code=0x01: error when receiving package;
Confirmation code=0x02: no fingers on the sensor;
Confirmation code=0x03: unsuccessful entry
Confirmation code=0x07: poor image quality;
- 25 - www.hzgrow.com
HandShake HandShake (0x40)
Description: Send handshake instructions to the module. If the module works normally, the
confirmation code 0x00 will be returned. The upper computer can continue to send instructions to
the module.If the confirmation code is other or no reply, it means that the device is abnormal.
Input Parameter: none
Return Parameter: Confirmation code
Instruction code: 0x40
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package length Instruction code Checksum
address identifier
0xEF01 xxxx 0x01 0x0003 0x40 0044H
- 26 - www.hzgrow.com
Soft reset SoftRst (0x3D)
Description: Send soft reset instruction to the module. If the module works normally, return
confirmation code 0x00, and then perform reset operation.
Input Parameter: none
Return Parameter: Confirmation code
Instruction code: 0x3D
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package length Instruction code Checksum
address identifier
0xEF01 xxxx 0x01 0x0003 0x3D 0041H
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package Confirmation Checksum
address identifier length code
0xEF01 xxxx 0x07 0x0003 X sum
Note 1: Confirmation code=0x00: success;
Confirmation code=other: device is abnormal
After module reset, 0x55 will be automatically sent as a handshake sign. After the single-chip
microcomputer detects 0x55, it can immediately send commands to enter the working state.
Control Code:
Control 0x01 0x02 0x03 0x04 0x05 0x06
code
Function breathing Flashing Light Light Light Light
light light Always Always gradually gradually
on off on off
Speed: 0x00-0xff, 256 gears,Minimum 5s cycle.
It is effective for breathing lamp and flashing lamp,Light gradually on,Light gradually off
- 27 - www.hzgrow.com
ColorIndex:
Code 0x01 0x02 0x03 0x04 0x05 0x06 0x07
Color Red Blue Purple Green Yellow Cyan White
Number of cycles: 0- infinite, 1-255.
It is effective for with breathing light and flashing light.
When a fingerprint is recorded using an automatic registration template, the fingerprint image needs to
be recorded six times for each fingerprint template. The blue light blinks when the fingerprint image is
collected. The yellow light is on means the fingerprint image is collected successfully,the green light
blinks means the fingerprint characteristic is generated successfully. If the finger is required to leave
during image collection, the image will be collected again after the finger is lifted. During the process of
waiting for the finger to leave, the white light flashes. After fingerprint images are collected for 6 times
and features are generated successfully, features are synthesized and store fingerprint template. If the
operation succeeds, the green light is on; if the operation fails, the red light is on. If the finger is away
from the sensor for more than 10 seconds when in collecting the fingerprint image each time, it will
automatically exits the automatic template registration process.
- 28 - www.hzgrow.com
ID e ID Fingerprint status to leave
Example of AutoEnroll:
Send: EF 01 FF FF FF FF 01 00 08 31 C8 00 01 01 01 01 05
Return: EF 01 FF FF FF FF 07 00 05 00 01 00 00 0D EF 01 FF FF FF FF 07 00 05 00 02 00 00 0E EF
01 FF FF FF FF 07 00 05 00 03 00 00 0F EF 01 FF FF FF FF 07 00 05 00 04 00 00 10 EF 01 FF FF FF
FF 07 00 05 00 05 00 00 11 EF 01 FF FF FF FF 07 00 05 00 06 00 00 12 EF 01 FF FF FF FF 07 00 05
00 07 00 00 13 EF 01 FF FF FF FF 07 00 05 00 08 00 00 14 EF 01 FF FF FF FF 07 00 05 00 09 00 00
15 EF 01 FF FF FF FF 07 00 05 00 0A 00 00 16 EF 01 FF FF FF FF 07 00 05 00 0B 00 00 17 EF 01 FF
FF FF FF 07 00 05 00 0C 00 00 18 EF 01 FF FF FF FF 07 00 05 00 0D 00 00 19 EF 01 FF FF FF FF 07
00 05 00 0E 00 00 1A EF 01 FF FF FF FF 07 00 05 00 0F 00 00 1B (Fingerprint ID)
- 29 - www.hzgrow.com
Parameter 2: fingerprint ID
Specific Acknowledge package format:
Header Module Package Package Confirm Step Fingerprint Check Sum Note
code
2 Bytes 4 Bytes 1 Byte 2 Bytes 1 Byte 1 Byte 1 Byte 2 Bytes
0xEF01 XXXX 0x07 0x0005 X 0x01 0x00 Sum Collect image for
the first time
0xEF01 XXXX 0x0005 X 0x02 0x00 Sum Generate Feature for
0x07
the first time
0xEF01 XXXX 0x0005 X 0x03 0x00 Sum Collect image for
0x07
the second time
0xEF01 XXXX 0x0005 X 0x04 0x00 Sum Generate Feature for
0x07
the second time
0xEF01 XXXX 0x0005 X 0x05 0x00 Sum Collect image for
0x07
the third time
0xEF01 XXXX 0x0005 X 0x06 0x00 Sum Generate Feature for
0x07
the third time
0xEF01 XXXX 0x0005 X 0x07 0x00 Sum Collect image for
0x07
the fourth time
0xEF01 XXXX 0x0005 X 0x08 0x00 Sum Generate Feature for
0x07
the fourth time
0xEF01 XXXX 0x0005 X 0x09 0x00 Sum Collect image for
0x07
the fifth time
0xEF01 XXXX 0x0005 X 0x0A 0x00 Sum Generate Feature
0x07
for the fifth time
0xEF01 XXXX 0x0005 X 0x0B 0x00 Sum Collect image for
0x07
the sixth time
0xEF01 XXXX 0x0005 X 0x0C 0x00 Sum Generate Feature
0x07
for the sixth time
0xEF01 XXXX 0x0005 X 0x0D 0x00 Sum Repeat fingerprint
0x07
check
0xEF01 XXXX 0x07 0x0005 X 0x0E 0x00 Sum Merge feature
0xEF01 XXXX 0x07 0x0005 X 0x0F modelID Sum Storage template
If the status of return key step is set to 0 during registration, only returned the the last
acknowledge packet.
Confirmation code=0x00 set successfully
Confirmation code=0x01 set fails
Confirmation code=0x07 failed to generate a feature
Confirmation code=0x0a failed to merge templates
Confirmation code=0x0b the ID is out of range
Confirmation code=0x1f fingerprint library is full
Confirmation code=0x22 fingerprint template is empty
Confirmation code=0x26 times out
Confirmation code=0x27 fingerprint already exists
- 30 - www.hzgrow.com
Automatic fingerprint verification AutoIdentify (0 x32)
When the automatic fingerprint verification command is used to search and verify a fingerprint, the
system automatically collects a fingerprint image and generates features, and compares the image with
the fingerprint template in the fingerprint database. If the comparison is successful, the system returns
the template ID number and the comparison score. If the comparison fails, the system returns the
corresponding error code.
When obtaining the fingerprint image, the fingerprint head will light up with a white breathing light.
After the image collection is successful, the yellow light will light up, and the green light will light up
after the comparison is successful. If there is a fingerprint image collection error or no fingerprint search,
the red light will be on to prompt.
If the system does not detect the finger for more than 10 seconds after sending the command or
collecting the fingerprint image again after reporting an error, it will automatically exit the command.
Input Parameter:
SafeGrade (1-5 level)
StartID
Num -Number of searches
Config1 Whether the module returns to the status in key steps
Config2 Number of fingerprint search error
- 31 - www.hzgrow.com
corresponding error times. No matter what way, if the system does not detect the finger after sending the
command or collecting the image again for more than 10 seconds, it will exit the command.
Example of AutoIdentify:
Send: EF 01 FF FF FF FF 01 00 08 32 03 00 C8 01 01 01 08
Return: EF 01 FF FF FF FF 07 00 08 00 01 00 00 00 00 00 10 EF 01 FF FF FF FF 07 00 08 00 02 00 00
00 00 00 11 EF 01 FF FF FF FF 07 00 08 00 03 00 00 00 3D 00 4F (Fingerprint ID and score)
Other instructions
Description: to command the Module to generate a random number and return it to upper computer;
Input Parameter: none
Return Parameter: Confirmation code (1 byte)+RandomCode
Instruction code: 14H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 2 bytes
Header Module Package Package length Instruction Checksum
address identifier code
0xEF01 xxxx 01H 0003H 14H 0018H
Acknowledge package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 4 bytes 2 bytes
Header Module Package Package Confirmation Random Checksum
address identifier length code number
- 32 - www.hzgrow.com
0xEF01 xxxx 07H 0007H xxH RandomC sum
ode
Note: Confirmation code=00H: generation success;
Confirmation code=01H: error when receiving package;
Description: for upper computer to write data to the specified Flash page.Also see ReadNotepad;
Input Parameter: NotePageNum, user content (or data content)
Return Parameter: Confirmation code (1 byte)
Instruction code: 18H
Command (or instruction) package format:
2 bytes 4bytes 1 byte 2 bytes 1 byte 1byte 32 bytes 2 bytes
- 33 - www.hzgrow.com
Header Module Package Package Instruction Page Data Checksum
address identifier length code number content
0xEF01 xxxx 01H 0x0024 18H 0x00-0 content sum
x0F
- 34 - www.hzgrow.com
Ⅵ Operation Process
Execute instruction
Handle successful
Finish
- 35 - www.hzgrow.com
6.1.2 UART Packet Sending Process
Before transmitting data packets, the UART should be received the instruction packet for
transmitting data packets first, makes preparations for transmission, then sends a successful response
packet, and finally starts transmitting the data packets. Packet mainly includes: packet header, chip
address, packet identity, packet length, data and checksum.
There are two types of packet identifiers: 02H and 08H. 02H: indicates the data packet and
subsequent packets. 08H: indicates the last packet, that is, the end packet. Data length is pre-set, mainly
divided into: 32, 64, 128, and 256 four types.
For example, if the length of the data to be transmitted is 1K bytes and the preset length of the data
packet is 128 bytes, the 1K bytes of data must be divided into eight data packets. Each packet includes:
2 bytes header, 4 bytes chip address, 1 bytes packet identifier, 2 bytes packet length, 128 bytes data and
2 bytes check sum, each packet length is 139 bytes.
In addition, of the eight packets, the packet ID of the first seven packets is 02H and the packet ID
of the last end data packet is 08H. Finally, note that if the end packet does not reach 139 bytes in length,
it is transmitted at the actual length and is not otherwise expanded to 139 bytes.
Execute instruction
Handle successful
Finish
- 36 - www.hzgrow.com
6.1.3 UART packet receiving process
Before transmitting data packets, the UART should be received the instruction packet for
transmitting data packets first, makes preparations for transmission, then sends a successful response
packet, and finally starts transmitting the data packets. Packet mainly includes: packet header, chip
address, packet identity, packet length, data and checksum.
There are two types of packet identifiers: 02H and 08H. 02H: indicates the data packet and
subsequent packets. 08H: indicates the last packet, that is, the end packet. Data length is pre-set, mainly
divided into: 32, 64, 128, and 256 four types.
For example, if the length of the data to be transmitted is 1K bytes and the preset length of the data
packet is 128 bytes, the 1K bytes of data must be divided into eight data packets. Each packet includes:
2 bytes header, 4 bytes chip address, 1 bytes packet identifier, 2 bytes packet length, 128 bytes data and
2 bytes check sum, each packet length is 139 bytes.
In addition, of the eight packets, the packet ID of the first seven packets is 02H and the packet ID
of the last end data packet is 08H. Finally, note that if the end packet does not reach 139 bytes in length,
it is transmitted at the actual length and is not otherwise expanded to 139 bytes.
Execute instruction
Handle successful
Finish
- 37 - www.hzgrow.com
6.2 General instruction communication flow
6.2.1 General instruction register fingerprint process
The fingerprint registration process mainly includes: obtaining images for registration, generating
features, merging features and storing templates. Usually N = 2 times.
Start
Return successfully
Return successfully
Finish
When the registration logic is set to 1, register fingerprint. If the current fingerprint is similar to the
fingerprint that has been included before,the confirmation code in the response packet that generates the
feature command does not show success, but returns 28H, indicating that there is a correlation between
the current fingerprint feature and the previous feature. It should be noted that the mutual comparison
correlation is limited to the fingerprints included in this registration process, and will not be compared
with the fingerprints in the fingerprint library.
When the registration logic is set to 2, register fingerprint. If the current fingerprint is not similar to
the fingerprint that has been included before,the confirmation code in the response packet that generates
the feature command does not show success, but returns 08H, indicating that there is no correlation
between the current fingerprint feature and the previous feature. It should be noted that the mutual
comparison correlation is limited to the fingerprints included in this registration process, and will not be
compared with the fingerprints in the fingerprint library.
Whether it returns 28H or 08H, the current fingerprint feature has been successfully extracted, you
can take a new map and generate features without changing the BufferID, or you can skip the current
BufferID and include the next round of fingerprints.
- 38 - www.hzgrow.com
6.2.2 General instruction verity fingerprint process
The fingerprint verification process of general instructions mainly includes: obtaining images for
verification, generating features and searching fingerprints. When sending generated features and
searching for fingerprints, BufferID is set to 1 by default.
Start
Return successfully
Return successfully
Finish
- 39 - www.hzgrow.com
6.2.3 Read a specified template upload to Flash Fingerprint Database
The whole process mainly includes: read template and upload templates.
BufferID is set to the default value 2 when reading template and uploading feature.
Start
Return successfully
Return successfully
Finish packet
Finish
- 40 - www.hzgrow.com
6.3 Automatic Register Fingerprint
Instruction error,did not return the reply packet Send instruction
Overwriting ID
numbers is not If the override ID is not
allowed, Error allowed, check whether
code 22 or Error the ID already exists. If
code 0B is the ID does not exist,
returned when the skip it
ID is full
Blue light flashing
If no image is captured for
Start collect image
more than 15 seconds, error
code 26 is returned
- 41 - www.hzgrow.com
6.4 Automatic Fingerprint Verification(Search)
Fingerprint error,no respond Send instruction
Fingerprint search
Search fail
Finish
- 42 - www.hzgrow.com
6.5 Low power standby
For low-power standby scenarios, the host can cut off the main power supply of the module (can
not cut off the touch-sensitive power supply). Once the module detects a finger, it outputs a signal
in the IRQ signal. Then the host can power on the module to perform fingerprint identification.
Start
- 43 - www.hzgrow.com
Ⅶ Reference Circuit
In low-power supply mode, the whole circuit is normally powered off. Use the finger detection function
of the module to power on the whole machine. Please refer to the circuit form of R307 (R307 is 5V
power supply).
- 44 - www.hzgrow.com