Skip to content

Contributed by WT_0213, curated by Ai-Thinker

1. Product Introduction

O1CN01mW6gDw1Sru5AjgdNT_!!964772301-0-cib.jpg The HLK-FPM383C series fingerprint module has complete fingerprint processing capabilities. Without a host computer, it can perform fingerprint enrollment, image processing, fingerprint matching, fingerprint feature storage and more. Compared with similar fingerprint products, it has the following features: - Highly integrated module: smaller size and lower power consumption. - Uses self-developed fingerprint recognition algorithm and chip, outperforming similar products on various metrics. - The fingerprint recognition algorithm supports template stitching, improving the user experience. - Fingerprint features are stored in the algorithm chip, preventing brute-force extraction and improving product security. - Resistant to fog, dust and damage; effectively mitigates static electricity from the human body, improving image capture quality and product durability. - The sensor surface color can be customized per customer requirements. - Supports touch wake-up and can effectively detect fake fingers such as plastic, silicone, rubber fingers, fingerprint molds and finger cots. - Simple structure with modular design, improving stability and consistency and facilitating mass production. - Open interface code and command set enable modular secondary development and reduce customer development difficulty. - Self-owned IP technology provides efficient and flexible secondary development support, fully meeting customer needs without IP disputes. ### 2. Interface Definition O1CN01Q7VMgZ1Sru5Exw8A5_!!964772301-0-cib.jpg a) Default UART baud rate is 57.6Kbps; data format: 8 data bits, 2 stop bits, no parity; b) The UART baud rate can be set via commands, ranging from 9600 to 115200; c) If the host is an MCU (3.3V), connect directly to UART_TD and UART_RD; if the host is a PC, an RS232 level converter is required. ### 3. Application Scope The HLK-FPM383C series fingerprint module is widely used and suitable for all kinds of fingerprint recognition systems, for example: - Security fields such as fingerprint door locks, safes, gun boxes and finance; - Identity fields such as access control systems, industrial PCs, POS machines, driving training and attendance; - Management fields such as private clubs, management software and licensing; ### 4. Serial Protocol 捕获.PNG After the module is powered on, it takes about 200ms to initialize. During this period, the module cannot respond to host commands. The communication protocol defines the rules for data exchange between the HLK-FPM383C series module and the host. Hardware uses the UART interface; software implementation follows the communication protocol and command set below. This protocol has a 2-layer structure: the application layer and the link layer. The application layer is mainly responsible for specific function definitions, and the link layer handles data transfer. The 2-byte or 4-byte values defined in the transfer protocol use little endian, with the high byte first and the low byte last (for example, 0x12345678 is actually transmitted as 0x12 0x34 0x56 0x78, not 0x78 0x56 0x34 0x12). Link layer description (UART) The UART link layer operates in half-duplex point-to-point mode. All commands must be initiated by the host, and the fingerprint module responds. UART data frame format: 捕获.PNG Notes: Frame header: defines the UART start. Whether sent by the host or the fingerprint module, the frame header data is fixed as 0xF1 1F E2 2E B6 6B A8 8A; Application layer data length: describes the actual length of the application layer data. This length does not include the frame header, the application layer data length field, or the frame header checksum; Frame header checksum: the checksum of the frame header + application layer data length, used to check whether the data length is correct. 捕获.PNG ### 5. Main Content Below are the commands used by the FPM383C fingerprint recognition module and their detailed descriptions. Including: auto-enroll, auto-verify, image capture, feature generation, fingerprint search, clearing fingerprints and LED control. ### 1. Auto-Enroll Template PS_AutoEnrol Function: one-stop fingerprint enrollment, including fingerprint capture, feature generation, template combination and template storage. Supported when the encryption level in Table 2-1 is set to 0 or 1. Input parameters: ID number, enrollment count, parameters Return parameters: confirmation code, parameters Command code: 31H Command packet format: 捕获.PNG Notes: ID number: high byte first, low byte last. For example, enrolling fingerprint No. 1 is 0001H. Enrollment count: 1 byte. Enrolling 2 times is 02H; enrolling 4 times is 04H. Parameters: the lowest bit is bit0. 1) bit0: capture backlight control. 0 - LED stays on; 1 - LED turns off after image capture succeeds; 2) bit1: capture preprocessing control. 0 - preprocessing off; 1 - preprocessing on; 3) bit2: during enrollment, whether the module is required to return its current status at key steps. 0 - required; 1 - not required; 4) bit3: whether overwriting the ID number is allowed. 0 - not allowed; 1 - allowed; 5) bit4: whether duplicate fingerprint enrollment is allowed. 0 - allowed; 1 - not allowed; 6) bit5: during enrollment with multiple fingerprint captures, whether the finger must be removed before the next capture. 0 - required; 1 - not required; 7) bit6~bit15: reserved Response packet format: 捕获.PNG捕获.PNG Command description: 1) If the specified ID number is invalid, the confirmation code, parameter 1 and parameter 2 return (described below simply as 'returns'): 0b 00 00H. Validity check: if the specified ID number is invalid, returns 0b 00 00H. If the enrollment count is configured incorrectly, returns 25 00 00H. In non-overwrite mode, if the fingerprint database is full, returns 1f 00 00H; if a template already exists for the specified ID number, returns 22 00 00H. If the command passes the validity check, returns 00 00 00H and enters the first fingerprint enrollment. 2) Wait for image capture success (returns 00 01 0nH). 3) Wait for feature generation success (00 02 0nH). If it fails (07 02 0nH), wait for image capture success again. 4) Wait for finger removal; the first enrollment succeeds (00 03 0nH). After the finger is removed, jump to step 2 and loop until n reaches the configured enrollment count. Note: if enrollment is configured to not require finger removal, it directly returns first-enrollment success and jumps to step 2; for the last fingerprint capture, there is no finger-removal response. 5) Combine the template: merge the previously captured finger features into one finger template. Success returns 00 04 F0H; failure returns 0A 04 F0H. 6) Duplicate fingerprint check: match the newly enrolled finger against stored fingers (enable/disable via bit4). If a matching fingerprint exists, returns 27 05 F1H and ends the flow; otherwise returns 00 05 F1H. 7) Register the template data. Storage failure returns 01 06 F2H and ends the flow; success returns 00 06 F2H. 8) If the PS_Cancel command is received, terminate this command and return a response. ### 2. Auto-Verify Fingerprint PS_AutoIdentify Function: automatically captures the fingerprint, including image acquisition, feature generation and fingerprint search. Supported when the encryption level in Table 2-1 is set to 0 or 1. Input parameters: score level, ID number Return parameters: confirmation code, page number (matching fingerprint template) Command code: 32H Command packet format 捕获.PNG Notes: ID number: 2 bytes, big-endian. For example, fingerprint No. 1 is 0001H. If the ID number is 0xFFFF, a 1:N search is performed; otherwise a 1:1 match is performed. Parameters: the lowest bit is bit0. 1) bit0: capture backlight control. 0 - LED stays on; 1 - LED turns off after image capture succeeds; 2) bit1: capture preprocessing control. 0 - preprocessing off; 1 - preprocessing on; 3) bit2: during enrollment, whether the module is required to return its current status at key steps. 0 - required; 1 - not required; 4) bit3~bit15: reserved. Response packet format: 捕获.PNG捕获.PNG捕获.PNG Command description: 1) If the fingerprint database is empty, the confirmation code and parameters return (described below simply as 'returns'): 24 00H. If the specified ID number is invalid, returns 0b 00H. If the registered template does not exist, returns 23 00H. 2) If the command passes the validity check, returns 00 00H and enters fingerprint enrollment. 3) If a complete fingerprint enrollment is not finished within the configured timeout, returns 26 00H and ends the flow. 4) Check the correctness of the input fingerprint image. If incorrect, wait for the next image capture. 5) If the input fingerprint is correct, returns 00 01H, meaning image capture for enrollment succeeded. 6) If feature generation fails, returns 09 05H and ends the flow. 7) After feature generation succeeds, compare the current fingerprint template with registered templates and return the result. If matching fails, returns 09 05H and ends the flow; if it succeeds, returns 00 05H along with the correct ID number and score. 8) If the PS_Cancel command is received, terminate this command and return a response. ### 3. Get Image for Verification PS_GetImage Function: when verifying a fingerprint, detect the finger; once detected, capture the fingerprint image and store it in the image buffer. The returned confirmation code indicates enrollment success, no finger, etc. Input parameters: none Return parameters: confirmation code Command code: 01H Command packet format: 捕获.PNG Response packet format: 捕获.PNG Note: confirmation code 00H means image capture succeeded; confirmation code 01H means packet receive error; confirmation code 02H means no finger on the sensor; sum refers to the checksum. ### 4. Generate Feature PS_GenChar Function: generate a fingerprint feature file from the raw image in the image buffer and store it in the template buffer. Input parameters: BufferID (positive integer) Return parameters: confirmation code Command code: 02H Command packet format: 捕获.PNG Note: during enrollment, BufferID indicates where the extracted feature is stored in the buffer; in other cases, BufferID has a corresponding default value. Response packet format: 捕获.PNG Note: confirmation code 00H means feature generation succeeded; confirmation code 01H means packet receive error; confirmation code 06H means the fingerprint image is too messy to generate a feature; confirmation code 07H means the fingerprint image is normal but has too few feature points to generate a feature; confirmation code 08H means the current feature has no relation to previous features (disabled by default); confirmation code 0aH means merging failed; confirmation code 15H means there is no valid raw image in the image buffer, so no image can be generated; confirmation code 28H means the current feature is related to previous features (disabled by default); sum refers to the checksum.。 ### 5. Search Fingerprint PS_Search Function: search the entire or part of the fingerprint database using the feature file in the template buffer. If found, returns the page number. Supported when the encryption level in Table 2-1 is set to 0 or 1. Input parameters: BufferID (default 1), StartPage (start page), PageNum (number of pages) Return parameters: confirmation code, page number (matching fingerprint template), score Command code: 04H Command packet format: 捕获.PNG Response packet format: 捕获.PNG Note: confirmation code 00H means found; confirmation code 01H means packet receive error; confirmation code 09H means not found; in this case the page number and score are 0; confirmation code 17H means residual fingerprint or the finger did not move between two captures; confirmation code 31H means the function does not match the encryption level; sum refers to the checksum. ### 6. Empty Fingerprint Database PS_Empty Function: delete all fingerprint templates in the flash database. Input parameters: none Return parameters: confirmation code Command code: 0dH Command packet format: 捕获.PNG Response packet format: 捕获.PNG Note: confirmation code 00H means clearing succeeded; confirmation code 01H means packet receive error; confirmation code 11H means clearing failed; sum refers to the checksum. ### 7. LED Control Command PS_ControlBLN Function: LED control commands are mainly divided into two types: general indicator lights and seven-color programmable breathing lights. Input parameters: function code, start color, end color, loop count Return parameters: confirmation code Command code: 3CH Command packet format: 捕获.PNG Notes Function code: LED mode control. 1 - normal breathing light, 2 - flashing light, 3 - always on, 4 - always off, 5 - fade in, 6 - fade out; other function codes do not apply to this command packet format; Start color: when set to normal breathing light, this is the color going from off to on; only applies to the normal breathing light function (function code 01). For other functions, it stays consistent with the end color. bit0 controls the blue LED; bit1 controls the green LED; bit2 controls the red LED. 1 means on, 0 means off. For example, 0x01 blue on, 0x02 green on, 0x04 red on, 0x06 red+green on, 0x05 red+blue on, 0x03 green+blue on, 0x07 red+green+blue on, 0x00 all off; End color: when set to normal breathing light, this is the color going from on to off; only applies to the normal breathing light function (function code 0x01). For other functions, it stays consistent with the start color. Set it the same way as the start color; Loop count: the number of breathing/flashing cycles. When set to 0, it loops infinitely; other values mean a finite number of cycles. The loop count applies to the breathing and flashing functions and is invalid for other functions, e.g., always on, always off, fade in and fade out;

Have questions?

For other questions, please visit the unified discussion area: Ai-Thinker Discussions

Released under the MIT License. Build Time 2026-09-11 14:52:23