User Manual: ZFM-20 Series

Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Translated from Chinese (Simplified) to English - www.onlinedoctranslator.

com

ZFM-20 series

Fingerprint recognition module

User Manual

Hangzhou Zhian Technology Co., Ltd.

June 2010 Ver: 2.0


Hangzhou Zhian Technology Co., Ltd.

Foreword and Statement

Thank you for purchasing the ZFM-20 series fingerprints of Hangzhou Zhian Technology Co., Ltd. (hereinafter referred to as: Zhian Company).

Identify a module (hereinafter referred to as a module).

This user manual is written for software and hardware application development engineers, including hardware interfaces, system resources, instructions

Command system, installation information, etc. To ensure smooth application development, please carefully check before proceeding with module development.

Read the manual carefully.

Every effort has been made to ensure the accuracy of this manual. However, if you have any questions or find an error,

Contact us and/or our authorized agents directly, we would appreciate it.

Because our company pursues the purpose of continuously improving and improving products, the contents of modules and manuals may be changed.

Further notice. Please visit our company's website or contact us by phone for the latest information.

This document contains the private information of the company, without the written permission of the company, third parties do not

may be used or disclosed at will; of course, any

Copying and unauthorized modification of information are both infringements.

In the use of the company's products, Shian does not bear any responsibility or obligation; and third parties in the use of

No patent or other intellectual property rights are infringed.

All products are sold subject to the company's terms and conditions of sale in the order acknowledgment. The company's profit

Use testing, tooling, quality control and other technical means to support the relevant performance of the product to a certain extent to the required specification

guarantee. It is not necessary to perform all parametric tests for each product, except as expressly required in writing by the government.

Hangzhou Zhian Technology Co., Ltd. 2010-2012 Copyright. All rights reserved. Infringement must be investigated.

Contact us: http://www.zhiantec.com

land Address: Block C/D, 8th Floor, West Building, International Garden, No. 160 Tianmushan Road, Hangzhou, Zhejiang 310012

Electricity Phone: 86-571-88210122

Technical support: 0571-88210122-807

Fax: 86-571-88210122-818

the first 1 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

content

Chapter 1 Overview.............................................. .................................3

1.1 How it works...................................................... ................. 3


1.2 Ordering Information ...................................................... ................. 3

Chapter 2 Main technical indicators ................................................ .................4

Chapter 3 Hardware Interface ................................................ .................5

3.1 Host computer interface (marked on the board: J1) ................................................ ...........5
3.1.1 Serial communication...................................................................... .................5
3.1.2 USB communication................................................................ .................6
3.2 Sensor interface (marked on the board: J2)................................................ .......... 7

Chapter 4 System Resources ................................................ ....................8

4.1 Buffer ..................................................................... ...................... 8


4.1.1 Image buffer...................................................... ................. 8
4.1.2 Feature file buffer...................................................................... ............... 8
4.2 Fingerprint library...................................................................... ...................... 8
4.3 System configuration parameters...................................................... ................. 8
4.3.1 Baud rate control (parameter number: 4)................................. .......... 9
4.3.2 Security level (parameter number: 5) ................................................ ......... 9
4.3.3 Packet content length (parameter number: 6)................................. ........ 9
4.4 System Status Register ...................................................... ............... 9
4.5 Module password...................................................... .................... 9
4.6 Module Address...................................................... ................. 10
4.7 Random number generator...................................................................... ................. 10

Chapter 5 Communication Protocol ................................................ .................11

5.1 Packet format...................................................... ................. 11


5.2 Check and Response of Data Packets...................................................... ................ 12

Chapter 6 Module Command System ................................................ ................13

6.1 System class instructions...................................................................... ................. 13


6.2 Fingerprint Processing Instructions................................................ ................ 17
6.3 Other Commands ................................................ ...... 26
6.4 Instruction Set Summary Table ................................................ ................. 30
6.4.1 Classification by function...................................................... ................ 30
6.4.2 In order of instruction code...................................................... ............ 30

Appendix................................................. ................................31

1 Dimensions of the split motherboard...................................................................................... ............ 31


2 Optical fingerprint sensor (or all-in-one module) dimensions (unit:MM) ................................. 31

the first 2 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 1 Overview

ZFM-20 series stand-alone fingerprint recognition module is launched by Hangzhou Zhian Technology Co., Ltd. It is based on SynoChip high-speed DSP processor.

As the core, combined with the optical fingerprint sensor with the company's independent intellectual property rights, without the need for the host computer to participate in management, it has

An intelligent module with functions such as fingerprint entry, image processing, fingerprint comparison, search and template storage.

1.1 working principle

Fingerprint processing includes two processes: fingerprint login process and fingerprint matching process [where fingerprint matching is divided into fingerprint comparison (1:1)

and fingerprint search (1:N) in two ways].

When fingerprint login, enter each fingerprint 2 times, will 2 The second-entry image is processed, and the composite template is stored in the module. When the

fingerprint is matched, through the fingerprint head sensor, the fingerprint image to be verified is entered and processed, and then matched and compared with the

fingerprint template in the module (if it matches with a template specified in the module, it is called the fingerprint comparison method, that is1:1 method; if it matches

with multiple templates, it is called fingerprint search method, that is, 1:N mode), the module gives a matching result (pass or fail).

1.2 Ordering Information

The complete model of the fingerprint module of our company adopts the following rules. When ordering products from our company, please fill in the complete model number as

required, so that we can provide you with better service.

ZFM - 20x x x - xxx -Vxx


Software version (can be omitted)

Lead length (unit mm, can be omitted)

Fingerprint library capacity A:162 pieces

B:930 pieces

Interface type U: USB1.1

S: serial (Series:UART)

Structure type 0: Split

1: All-in-one

optics 20 series

Fingerprint recognition module of Hangzhou Zhian Technology Company

Note: 1) The lead length refers to the length of the cable connected between the module main board and the optical fingerprint sensor. Integral modules do not have this lead.

2) software version can be omitted when ordering for the first time or non-specified version, that is, the latest version of our company is adopted by default.

the first 3 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 2 Main technical indicators

Supply voltage:DC 3.6~6.0V


Supply current:

Working current: <120mA

Peak current: <150mA

Fingerprint image entry time:<1.0 seconds

Window area: 14 ╳ 18 mm

Match method:

Comparison method (1:1)

Search method (1:N)


Feature file:256 bytes
Template file:512 bytes

storage:162/930 pieces

Security Level:Level 5 (from low to high: 1, 2, 3, 4, 5)

False Recognition Rate (FAR):<0.001% (when the safety level is 3)

Authenticity Rejection Rate (FRR):<1.0% (when the safety level is 3)

Search time:< 1.0 sec (average at 1:200)

Host computer interface: UART (TTL logic level) or USB1.1

Communication baud rate (UART):(9600╳N)bps where N=1〜12 (default value N=6, ie 57600bps)

working environment:

Temperature: -20℃-+50℃
Relative humidity: 40%RH-85%RH (non-condensing)

Storage environment:

Temperature: -40℃-+85℃
Relative humidity: <85%H (no condensation)

Dimensions (L╳W╳H):

Split type:
mold Block: 42 ╳ 25 ╳ 8.5mm (Installation size: 31.5 ╳ 19 mm )
Fingerprint sensor: 56 ╳ 20 ╳ 21.5mm

All-in-one:56 ╳ 20 ╳ 21.5mm

the first 4 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 3 Hardware Interface

3.1 Host computer interface (marked on the board:J1)

no matter what you order UART still is USB Interface type (but the factory settings of the hardware circuits on the board are different, please do not mix them), in

PCB On the board, the interface between the module and the user equipment adopts the same single-row socket/pin (split type is 5 core 2.0 Spacing, one-piece is 4 core

1.27 spacing).

When the user has no special requirements, the provided user interface lead length is 150mm.

3.1.1 serial communication

When the module communicates with the user equipment serially, the interface J1 The pins are defined as follows:

pin number name type achievement Can draw stated

1 Vin in Positive input terminal of power supply. (Line color: red)

2 TD out Serial data output. TTL logic level. (Line color: green)

3 RD in Serial data input. TTL logic level. (Line color: white)

4 GND - signal ground. Internally connected to power ground. (Line color: black)

5 NC - Undefined, floating.(All-in-one module does not have this pin)

Note: Type column, in represents the input to the module, out output from the module.

3.1.1.1 hardware connection

Through the serial communication interface, the module can be directly connected with the 3.3V or 5V Communication with the single-chip microcomputer of the power supply:

the module data sending pin (2 foot TD) connected to the data receiving end of the host computer (RXD), module data receiving pin (3 foot RD) connected to the data sending end of the

host computer (TXD).

If required with RS-232 level (for example:PC to communicate with the host computer), please add a level conversion circuit between the module

and the host computer (for example:MAX232 circuit).

3.1.1.2 serial protocol

Using half-duplex asynchronous serial communication. Default baud rate57600bps, which can be set by the command to 9600~115200bps.

start bit stop bit


1 0 D0 D1 D2 D3 D4 D5 D6 D7 1

10-bit frame format

The transmitted frame format is 10 bit, bit 0 level start bit,8 Bit data (low order first) and one stop bit, no parity

bit.

the first 5 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

3.1.1.3 Power-on delay time

After the module is powered on, it takes about 500mS Time for initialization work. During this period, the module cannot respond to the command of the upper computer.

3.1.1.4 Electrical parameters (All levels to power/signal ground GND is the reference level)

1. power input

parameter
project unit prepare Note
minimum typical maximum

voltage Vin 3.6 6.0 V normal working value

limit voltageVinmax - 0.3 7.0 V Exceeding this range may cause permanent damage

Working current Icc 90 100 110 mA


peak current ipeak 150 mA

2. TXD(output,TTL logic level)


ginseng number
project strip piece unit Remark
minimum typical maximum

VOL IOL=-4mA 0.4 V logic 0


VOH IOH= 4mA 2.4 3.3 V logic 1

3. RXD pin (input,TTL logic level)


ginseng number
project strip piece unit Remark
minimum typical maximum

VIL 0.6 V logic 0


VIH 2.4 V logic 1
VIH =5V 1 mA
IIH
VIH =3.3V 30 uA
VImax - 0.3 5.5 V Limit input voltage

3.1.2 USB communication

module and user equipment USB When communicating, the interface J1 The pins are defined as follows:

pin number name type achievement Can draw stated

1 Vin in Positive input terminal of power supply. (Refer to 3.1.1.4 for electrical parameters)

2 DP+ In/Out USB data cable.

3 DP- In/Out USB data cable.

4 GND - signal ground. Internally connected to power ground.

5 END - protected area. It can be suspended or can be connected to the shielding layer of the communication lead.(All-in-one module does not have this pin)

Note: Type column,in represents the input to the module,out output from the module.

the first 6 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

3.2 Sensor interface (marked on the board:J2)

The split module provides a dedicated interface to the optical fingerprint sensor board (15-pin single-row socket/pin, 1.25mm pitch). Use this interface

to connect to the sensor board through a 15-pin cable. When the user has no special requirements, the provided lead length is 150mm.

All-in-one module The interface is an internal connection and does not require user consideration.

the first 7 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 4 System Resources

In order to meet the needs of different customers, the module system provides a lot of resources for the user system to use.

4.1 buffer

There is an image buffer ImageBuffer with a size of 72K bytes and two characteristic file buffers CharBuffer1 and CharBuffer2 with a size

of 512 bytes in the module RAM. The user can read and write any buffer through instructions. The contents of the image buffer and the two

profile buffers are not saved when the module is powered off.

4.1.1 image buffer

Image buffer ImageBuffer is used to store image data and use in image processing inside the module. When uploading/downloading images, the

image format is256╳288 pixel.

When uploading or downloading images through 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, two 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 through the USB port is a full 8-bit pixel, that is, 256 gray levels.

4.1.2 signature file buffer

The feature file buffer CharBuffer1 or CharBuffer2 can be used to store both common feature files and
template feature files.

4.2 Fingerprint library

The module has opened up a storage area in FLASH as the fingerprint template storage area, which is commonly known as the fingerprint library. The data in the fingerprint

library is power-off protection.

The fingerprint templates are stored according to the serial numbers. If the capacity of the fingerprint database is N, the serial numbers of the fingerprint templates in the fingerprint database are defined as: 0, 1, 2...N-2,

N-1. Users can only access the contents of the fingerprint database according to the serial number.

4.3 System configuration parameters

For the convenience of users, the module opens some system parameters, allowing users to individually modify the specified (by parameter serial number) parameter values

through commands. See the command to set the basic parameters of the module systemSetSysPara and read system parameter command ReadSysPara.

the first 8 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

When the host computer sends an instruction to modify system parameters, the module first responds according to the original configuration, and then modifies the system settings after the

response, and records the configuration in FLASH. After the system is powered on next time, it will work according to the new configuration.

4.3.1 Baud rate control (parameter number:4)

This parameter controls the communication baud rate when the module communicates with the host computer through UART. If the parameter value is N (the value of N ranges from 1 to

12), the corresponding baud rate is (9600╳N) bps.

4.3.2 Security level (parameter number: 5)

This parameter controls the fingerprint comparison and the comparison threshold during search. It is divided into 5 level, the value range is:1,2,3,4,5. When the security level is 1, the false

acceptance rate is the highest, and the rejection rate is the lowest. The security level is5 When the false rate is the lowest, the rejection rate is the highest.

4.3.3 Packet content length (parameter number: 6)

When this parameter controls the communication between the module and the host computer, the maximum length of the packet content in the data is allowed

for each transmission. The value range is: 0,1,2,3, the corresponding lengths (number of bytes) are:32,64,128,256.

4.4 System Status Register

The system status register indicates the current working status of the module. It can be read through the command ReadSysPara, the length is 1Word. Its bits are

defined as follows:

Tag number 15 4 3 2 1 0
significance Reserved ImgBufStat PWD Pass Busy
Note:
Busy: occupy 1 bit, set to 1 to indicate that the system is executing commands, 0 to indicate that the system is idle; Pass:

occupy 1 bit, set to 1 to indicate that the fingerprint verification is passed;

PWD: One bit, set to 1 means the device handshake password is verified; ImgBufStat: One bit, set to 1

means there is a valid fingerprint image in the fingerprint image buffer.

4.5 module password

After the module is powered on and reset, it will firstly check whether the device handshake password has been modified. If it is not modified, the module considers that the host

computer does not need to verify the password, and directly enters the normal working state; that is, when the module password is the default password, it does not need to verify the

password. password is4 bytes, the factory default password is:0x00000000.

If the module internal password has been modified (see the set password command SetPwd), the device handshake password must be verified first, and the

module will enter the normal working state after the password is passed. Otherwise the module refuses to execute any instruction.

After the password is modified, the new password will be saved in Flash, and it will still be saved when the

power is turned off. See Authentication PasswordVfyPwd Command and set password SetPwd instruction.

the first 9 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

4.6 Module address

Each module has an identification address. When the module communicates with the host computer, each instruction/data is transmitted in the form of a data

packet, and each data packet contains an address and an address item. The module only reacts to commands and data packets that contain the same address as its own.

The module address is 4 bytes, and the default value is: 0xFFFFFFFF. The user can modify the module address through the command (see the SetAdder command

for setting the module address). After the module address is modified, the new address is still saved after the module is powered off.

4.7 random number generator

The module integrates a hardware 32-bit random number generator (no random number seed is required). The user can let the module generate a random

number and upload it through instructions. See the sampling random number instruction GetRandomCode.

the first 10 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 5 Communication Protocol

The communication protocol defines the rules of information exchange between ZFM-20 series modules and the host computer. Whether the hardware uses UART or

It is a USB interface type, and both use the same communication protocol and instruction set. If the host computer uses a PC, it is recommended to order a USB interface

type of module to improve the system speed (because the uploading image has many gray levels and fast speed when using USB, at this time the module can be used for fingerprinting

collector) .

5.1 packet format

The module communicates with the host computer, and the receiving and sending of commands, data and results are carried out in the form of data packets.

Packet format:

Baotou address code Package ID package length Package content (command/data/parameter/confirmation code) checksum

Packet Detailed Definition Table

name symbol length Say bright

Baotou START 2 bytes Fixed to 0xef01, the high byte is first when transmitted.

The default value is 0xffffffff, and the user can generate a new address through instructions. The
address code ADDER 4 bytes
module will reject packets with incorrect addresses. High byte first when transmitting.

0x01 Indicates that it is a Command packet.

Indicates that it is a data packet (Data packet), and there are subsequent packets.

0x02 The data packet cannot enter the execution flow alone, and must follow the instruction packet

Package ID PID 1 byte or after the reply packet.

0x07 Indicates that it is an ACK packet , there can be follow-up packages.


Indicates that it is the last data packet, that is, the end packet
0x08
(EndData packet).

The maximum value is 256 bytes; the packet length refers to the length of the packet content

package length LENGTH 2 bytes (command/data) plus the length of the checksum (ie, the length of the packet content + 2). The

length is in bytes, with the high byte first when transmitting.

It can be command, data, command parameter, response result, etc. (Fingerprint feature
Package Contents DATA -
value and fingerprint template are all data)

Arithmetic cumulative sum of all bytes of packet identification, packet length and packet content,
checksum SUM 2 bytes
and the carry over 2 bytes is ignored. High byte first when transmitting.

the first 11 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

5.2 Packet check and response

Instructions can only be given to the module by the host computer, and the module will respond to the host computer.

After the module receives the command, it will report the execution status and result of the command to the host computer through the response packet. The reply contains parameters and can be

followed by subsequent packets. The host computer can only confirm the receiving status of the module and the command execution status after receiving the module's response packet.

The content of the response packet includes a one-byte confirmation code (must have) and possible return parameters.

Confirmation code definition table:

1. 0x00: Indicates that the instruction is executed or OK;

2. 0x01: Indicates data packet receiving error;

3. 0x02: Indicates that there is no finger on the sensor;

4. 0x03: Indicates that the fingerprint image entry failed;

5. 0x06: Indicates that the fingerprint image is too messy to generate features;

6. 0x07: Indicates that the fingerprint image is normal, but the feature points are too few (or the area is too small) to generate features;

7. 0x08: Indicates that the fingerprints do not match;

8. 0x09: Indicates that no fingerprint is found;

9. 0x0a: Indicates that feature merging failed;

10. 0x0b: Indicates that the address serial number exceeds the range of the fingerprint database when accessing the fingerprint database;

11. 0x0c: Indicates that there is an error or invalidity in reading the template from the fingerprint library;

12. 0x0d: Indicates that uploading features failed;

13. 0x0e: Indicates that the module cannot accept subsequent data packets;

14. 0x0f: Indicates that uploading the image failed;

15. 0x10: Indicates that the deletion of the template failed;

16. 0x11: Indicates failure to clear the fingerprint database;

17. 0x13: Indicates that the password is incorrect;

18. 0x15: Indicates that there is no valid original image in the buffer and the image cannot be generated;

19. 0x18: Indicates an error in reading and writing FLASH;

20. 0x1a: invalid register number;

21. 0x20: address code error;


22. 0x21: The password must be verified;

23. Others: reserved by the system.

the first 12 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 6 Module Command System

ZFM-20 series modules have a total of 21 instructions. The application program realizes various fingerprint recognition functions through different combinations of instructions.

All command/data transfers are delivered in packets. For package formats and definitions see5.1 packet format.

6.1 system command

1) to verify the password VfyPwd

Function description: Verify the module handshake password (see 4.6 Module Password).

Input parameter: PassWord

Return parameter: confirmation code

Command code: 0x13

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 4 bytes 2 bytes


Baotou Module address Package ID package length script password checksum

0xef01 XXXX 0x01 0x0007 0x13 PassWord Sum


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means the password verification is correct;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x13 means the password is incorrect;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+password (4 bytes);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

2) to set the password SetPwd

Function description: Set the module handshake password (see 4.6 module password).

Input parameter: PassWord

Return parameter: confirmation word

Command code: 0x12

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 4 bytes 2 bytes


Baotou Module address Package ID package length script password checksum

0xef01 XXXX 0x01 0x0007 0x12 PassWord Sum

the first 13 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means OK;

Confirmation code=0x01 means there is an error in receiving the package;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+password (4 bytes);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

3) set the module address SetAdder

Function description: Set the module address (see 4.7 Module address) .
Input parameter: module new address

Return parameter: confirmation word

Command code: 0x15

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 4 bytes 2 bytes


Baotou Module original address Package ID package length script Module new address checksum

0xef01 XXXX 0x01 0x0007 0x15 XXXX Sum


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module new address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means the address generation is successful;

Confirmation code=0x01 means there is an error in receiving the package;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+Module new address (4 bytes);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

4) to set the basic parameters of the module system SetSysPara

Function description: work parameter setting (refer to 4.4 system configuration parameters). Input

parameter: parameter serial number

Return parameter: confirmation word

Command code: 0x0e

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 1 byte 2 bytes


Baotou Module address Package ID package length script parameter number content checksum

0xef01 XXXX 0x01 0x0005 0x0e 4/5/6 X Sum

the first 14 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means OK;

Confirmation code=0x01 means there is an error in receiving the package;

confirmation code =0x1a Indicates that the register serial number is incorrect;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+parameter number (1 byte)

+ content (1 byte);
★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

name parameter number content

baud rate 4 9600×N bps (N value range: 1〜12)


Security Level 5 Divided into 5 levels, the value range: 1, 2, 3, 4, 5

package content length 6 Value range: 0, 1, 2, 3, corresponding length (number of bytes): 32, 64, 128, 256

5) to read system parameters ReadSysPara

Function description: Read the module's status register and system basic configuration parameters (see 4.4 System Configuration Parameters and 4.5

system status register).


Input parameter: none

Return parameter: confirmation word + basic parameter

Command code: 0x0f

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x0f Sum


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 16 bytes 2 bytes


Baotou Module address Package ID package length confirmation code Basic parameters checksum

0xef01 XXXX 0x07 0x0013 X The structure is shown in the table below Sum
Note: Confirmation code=0x00 means OK;

Confirmation code=0x01 means there is an error in receiving the package;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+Basic parameters(16 bytes);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

the first 15 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Offset
name Content description size (word)
(Character)

status register System Status Register Contents 0 1


System ID Fixed value: 0x0000 1 1
Fingerprint library size Fingerprint library capacity 2 1
Security Level Security level code (1, 2, 3, 4, 5 ) 3 1
Device address 32-bit device address 4 2
packet size Packet size code (0, 1, 2, 3 ) 6 1
Baud rate setting N (corresponding to a baud rate of 9600×N bps) 7 1

6) Read fingerprint template index table ReadConList

Function description: Read the module fingerprint template index table, and read the index table of up to 256 fingerprint templates each time.

Input parameter: index page

Index page 0 means reading 0〜255 fingerprint template index table index page

1 means reading 256〜511 fingerprint template index table index page 2 means

reading 512〜767 fingerprint template index table index page 3 means reading

768〜1024 fingerprint template Index table return parameters: confirmation

word + fingerprint template index table

Command code: 0x1f

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes


Baotou Chip address Package ID package length script index page checksum

0xef01 XXXX 0x01 0x0004 0x1f 0/1/2/3 Sum


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 32 bytes 2 bytes


Baotou Chip address Package ID package length confirmation code direction chart checksum

0xef01 XXXX 0x07 0x0023 X The structure is shown in the table below Sum
Note: 1. Confirmation code = 0x00 means reading the index table successfully;

Confirmation code=0x01 means there is an error in receiving the package;

2. At most 256 fingerprint template index data are read each time, and “0” is added if the data is less than 256 bits. .
3. Index table data structure: every 8 bits is a group, and each group starts to output from the high bit. See the table below for details:

Transmission order The sequence is output from low byte to high byte, and each byte is output from high byte.

lowest Template number 7 6 5 4 3 2 1 0


valid bytes Template index table data 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
lower two Template number 15 14 13 12 11 10 9 8
valid bytes Template index table data 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
… … …
Highest Template number 255 254 253 252 251 250 249 248
valid bytes Template index table data 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1
Note: The index table data "0" means that there is no valid template in the corresponding position; "1" means that there is a valid template in the corresponding position.

the first 16 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+index page (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+direction chart(N bytes);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

7) read the number of valid templates TempleteNum

Function description: Read the number of fingerprint templates stored in the module.

Input parameter: none

Return parameter: confirmation word + template

number N Command code: 0x1d

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x1d 0x0021


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes 2 bytes


Baotou Module address Package ID package length confirmation code Number of templates checksum

0xef01 XXXX 0x07 0x0005 X N Sum


Note: Confirmation code=0x00 means the reading is successful;

Confirmation code=0x01 means there is an error in receiving the package;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+number of templates (2 bytes);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

6.2 Fingerprint processing instructions

8) record fingerprint image GenImg

Function description: detect the finger, record the fingerprint image and store it in ImageBuffer after detection, and return to confirm the success of the registration

code. If no finger is detected, it will directly return to the no-finger confirmation code.

Input parameter: none

Return parameter: confirmation word

Command code: 0x01

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x01 0x0005


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

the first 17 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

0xef01 XXXX 0x07 0x0003 X Sum

Note: Confirmation code=0x00 means the entry is successful;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x02 means there is no finger on the sensor;

Confirmation code=0x03 means the entry is unsuccessful;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

9) to upload an image UpImage

Function description: Upload the data in the module image buffer ImageBuffer to the upper computer and upload it to the upper computer (see

1.1.1 image buffer).


Input parameter: none

Return parameter: confirmation word

Command code: 0x0a

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x0a 0x000e


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Data packet (with subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x02 N+2 image data Sum


End packet (no subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x08 N+2 image data Sum


Note: 1. Confirmation code=0x00 means to send subsequent data packets;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0f means that subsequent data packets cannot be sent;

2. Send the command packet, the module sends the data packet or the end packet after the response, and the data packet and the end packet have no response packet; 3. The

value of the number of bytes in the packet content N is determined by the length of the packet content, and the length of the factory packet content is set to 128 bytes;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

the first 18 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

10) to download the image DownImage

Function description: The host computer downloads the image data to the module image buffer ImageBuffer, see 1.1.1 image buffer

Area).
Input parameter: none

Return parameter: confirmation word

Command code: 0x0b

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x0b 0x000f


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Data packet (with subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x02 N+2 image data Sum


End packet (no subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x08 N+2 image data Sum


Note: 1. Confirmation code=0x00 means that subsequent data packets can be received;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0e means that subsequent data packets cannot be received.

2. Send the command packet, and the module will receive the data packet or end the packet after the module responds.

3. The value of the number of bytes of package content N is determined by the length of the package content. The length of the package content in the factory is set to 128 bytes.

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

11) image generation features Img2Tz

Function description: Generate fingerprint features from the original image in ImageBuffer, and store the file in CharBuffer1 or

CharBuffer2.
Input parameter: BufferID (feature buffer number)

Return parameter: confirmation word

Command code: 0x02

Instruction packet format:

the first 19 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes


Baotou Module address Package ID package length script buffer number checksum

0xef01 XXXX 0x01 0x0004 0x02 BufferID Sum


Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively.
Its value, according to CharBuffer2 processing.

Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means that the feature is successfully generated;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x06 means that the fingerprint image is too messy to generate features; Confirmation code=0x07 means that the

fingerprint image is normal, but there are too few feature points to generate features; Confirmation code=0x15 means that there is no

valid original image in the image buffer and the image cannot be generated ;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

12) feature synthesis template RegModel

Function description: Merge the feature files in CharBuffer1 and CharBuffer2 to generate a template, and the result is stored in

CharBuffer1 and CharBuffer2 (the same content). Input


parameter: none
Return parameter: confirmation word

Command code: 0x05

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x05 0x0009


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means the merger is successful;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0a means the merging fails (the two fingerprints do not belong to the same finger);

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

the first 20 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

13) upload feature or template UpChar

Function description: Upload the characteristic file in the characteristic buffer CharBuffer1 or CharBuffer2 to the upper

computer. Input parameter: BufferID (buffer number)

Return parameter: confirmation word

Command code: 0x08

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes


Baotou Module address Package ID package length script buffer number checksum

0xef01 XXXX 0x01 0x0004 0x08 BufferID Sum


Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively. Response

packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Data packet (with subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x02 N+2 template data Sum


End packet (no subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x08 N+2 template data Sum


Note: 1. Confirmation code=0x00 means to send data packets later;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0d indicates that the command execution failed;

2. Send an instruction packet, the module sends a data packet or an end packet after responding, and there is no response packet for the data packet and the end packet. 3. The

value of the number of bytes of package content N is determined by the length of the package content. The length of the package content in the factory is set to 128 bytes. 4. This

instruction does not affect the content in the module feature buffer.

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+good buffer (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

14) to download features or templates DownChar

Function description: The host computer downloads the feature file to a feature buffer of the

module. Input parameter: BufferID (buffer number)

Return parameter: confirmation word

Command code: 0x09

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes


Baotou Module address Package ID package length script buffer number checksum

0xef01 XXXX 0x01 0x0004 0x09 BufferID Sum

the first twenty one pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively. Response

packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Data packet (with subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x02 N+2 template data Sum


End packet (no subsequent packets) format:

2 bytes 4 bytes 1 byte 2 bytes N bytes 2 bytes


Baotou Module address Package ID package length Package Contents checksum

0xef01 XXXX 0x08 N+2 template data Sum


Note: 1. Confirmation code=0x00 means that subsequent data packets can be received;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0e means that subsequent data packets cannot be received;

2, Send the command packet, and the module will receive the data packet or end the packet after the module responds.

3. The value of the number of bytes of package content N is determined by the length of the package content. The length of the package content in the factory is set to 128 bytes.

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

15) to store templates Store

Function description: store the template data in the specified feature buffer (CharBuffer1 or CharBuffer2) to

Flash Specify the location in the fingerprint library.

Input parameters: BufferID (buffer number) + PageID (fingerprint library location number, two bytes, high byte first). Return

parameter: confirmation word

Command code: 0x06

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes 2 bytes


Baotou Module address Package ID package length script buffer number location number checksum

0xef01 XXXX 0x01 0x0006 0x06 BufferID PageID Sum


Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively

Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means the storage is successful;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0b means that PageID is beyond the range of fingerprint

database; Confirmation code=0x18 means to write FLASH error;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 byte)

the first twenty two pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

+ position number (2 bytes);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

16) read out the template LoadChar

Function description: Read the fingerprint template with the specified ID number in the flash database into the template buffer CharBuffer1 or

CharBuffer2.
Input parameters: BufferID (buffer number) + PageID (fingerprint library template number, two bytes, high byte first). Return parameter:

confirmation word

Command code: 0x07

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes 2 bytes


Baotou Module address Package ID package length script buffer number page number checksum

0xef01 XXXX 0x01 0x0006 0x07 BufferID PageID Sum


Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively. Response

packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means the readout is successful;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x0c indicates that there is an error in reading or the template is invalid;

Confirmation code=0x0b Express PageID beyond the scope of the fingerprint database;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (2 bytes)

+ page number (2 bytes);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

17) to delete the template DeleteChar

Function Description:Delete the specified segment (N fingerprint templates starting with the specified ID number) template in the module fingerprint library. Input

parameters: PageID (fingerprint library template number) + N The number of templates to be deleted.

Return parameter: confirmation word

Command code: 0x0c

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes 2 bytes 2 bytes


Baotou Module address Package ID package length script page number delete number checksum

0xef01 XXXX 0x01 0x0007 0x0c PageID N Sum


Response packet format:

the first twenty three pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means the template deletion is successful;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x10 means that the deletion of the template failed;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+page number(2 bytes)

+ delete count (2 bytes);


★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

18) to clear the fingerprint library Empty

Function description: delete all fingerprint templates in the fingerprint library in the module.

Input parameter: none

Return parameter: confirmation word

Command code: 0x0d

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x0d 0x0011


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length confirmation code checksum

0xef01 XXXX 0x07 0x0003 X Sum


Note: Confirmation code=0x00 means clearing is successful;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x11 indicates that the emptying failed;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

19) to accurately compare the features of two fingerprints Match

Function description: module accurate comparison (1:1) characteristic files in CharBuffer1 and CharBuffer2, and give the ratio

to the results.

Input parameter: none

Return parameter: confirmation word + comparison score

Command code: 0x03

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes

the first twenty four pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x03 0x0007


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes 2 bytes


Baotou Module address Package ID package length confirmation code Score checksum

0xef01 XXXX 0x07 0x0005 X xx Sum


Note: 1. Confirmation code=0x00 means fingerprint matching;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x08 means the fingerprints do not match;

2, After the instruction is executed, the contents of the two feature buffers remain unchanged.

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+Score(2 bytes);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

20) to search for fingerprints Search

Function description: Search the whole or part of the fingerprint library with the characteristic files in CharBuffer1 or CharBuffer2. ifso

If found, return the page number.

Input parameter: BufferID + StartPage (start page) + PageNum (page number) Return parameter:

confirmation word + page number (matching fingerprint template)

Command code: 0x04

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 1 byte 2 bytes 2 bytes 2 bytes


Baotou Module address Package ID package length script buffer number start page number of pages checksum

0xef01 XXXX 0x01 0x0008 0x04 BufferID StartPage PageNum Sum


Note: The BufferIDs of the buffer CharBuffer1 and CharBuffer2 are 0x01 and 0x02 respectively. Response

packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes 2 bytes 2 bytes


Baotou Module address Package ID package length confirmation code page number Score checksum

0xef01 XXXX 0x07 0x007 X PageID MatchScore Sum


Note: 1. Confirmation code=0x00 means searched;

Confirmation code=0x01 means there is an error in receiving the package;

Confirmation code=0x09 means not found;

2,After this instruction is executed, the content in the feature buffer does not change.

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte)+buffer number (1 bytes)

+ start page (2 bytes)+number of pages (2 bytes);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+page number(2 bytes)

+ score(2 bytes);
★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

the first 25 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

6.3 other instructions

twenty one) sampling random numbers GetRandomCode

Function description: make the module chip generate a random number and return it to the host computer (see 4.8 Random Number Generator) .
Input parameter: none

Return parameter: confirmation word

Command code: 0x14

Instruction packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 2 bytes


Baotou Module address Package ID package length script checksum

0xef01 XXXX 0x01 0x0003 0x14 0x0018


Response packet format:

2 bytes 4 bytes 1 byte 2 bytes 1 byte 4 bytes 2 bytes


Baotou Module address Package ID package length confirmation code random number checksum

0xef01 XXXX 0x07 0x0007 X XXXX Sum


Note: Confirmation code=0x00 means the generation is successful;

Confirmation code=0x01 means there is an error in receiving the package;

★ Instruction packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+script (1 byte);

★ Answer packet checksum (2 bytes)=Package ID (1 byte)+Packet length (2 bytes)+confirmation code (1 byte)+random number(4 bytes);

★ The checksum is added in bytes, the carry over 2 bytes is ignored, and the high byte comes first when transmitting;

★ The default module address is "0xffffffff"; default password is "0x00000000”.

the first 26 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Chapter 7 Program Development Guide

7.Program flow chart

the first 27 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Entry fingerprint flow chart

the first 28 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Search fingerprint flow chart

the first 29 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

6.4 Instruction Set Summary Table

6.4.1 Sort by function

type serial number code Function Description type serial number code Function Description

1 0x13 Validation password refer to 13 0x08 upload feature

Tie 2 0x12 set password 14 0x09 Download Features

3 0x15 set address pattern


15 0x06 store templates

4 0x0e 16 0x07
system
Set system parameters read template

5 0x0f 17 0x0c
where
Read system parameters delete template
kind
6 0x1f Read fingerprint template index table 18 0x0d Clear fingerprint library
reason

7 0x1d Number of fingerprint templates 19 0x03 Compare fingerprints

refer to 8 0x01 fingerprint image


kind 20 0x04 search for fingerprints

pattern 9 0x0a upload image

where
10 0x0b Download images That twenty one 0x14 sampling random numbers

reason
11 0x02 image to feature he
kind 12 kind
0x05 Feature Synthesis Template

6.4.2 In order of instruction code

code mnemonic Function Description code mnemonic Function Description

0x01 GenImg fingerprint image 0x0d Empty Clear fingerprint library

0x02 Img2Tz image to feature 0x0e SetSysPara Set system parameters

0x03 Match Fingerprint comparison 0x0f ReadSysPara Read system parameters

0x04 Serach search for fingerprints 0x12 SetPwd set password

0x05 RegModel Feature Synthesis Template 0x13 VfyPwd Validation password

0x06 Store store templates 0x14 GetRandomCode sampling random numbers

0x07 LoadChar read template 0x15 SetAdder set address

0x08 UpChar upload feature 0x1d TempleteNum Number of fingerprint templates

0x09 DownChr Download Features 0x1f ReadConList Read fingerprint template index table

0x0a UpImage upload image

0x0b DownImage Download images

0x0c DeleteChar delete template

the first 30 pages of 28 Page


Hangzhou Zhian Technology Co., Ltd.

Appendix

1 Split motherboard dimensions

2 Optical Fingerprint Sensor (or All-in-One Module) Dimensions (Unit:mm)

- - - - - - - - - - - End----------

the first 31 pages of 28 Page

You might also like