Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FPM10A Fingerprint Module
- Baudrate default: 576000
- Image buffer: 256 x 288 pixel
- Character file buffer: 2 x 512 bytes? (CharBuffer1, Charbuffer2)
- Fingerprint library: 1000 models (PageID 0000 .. 03E7), or 300 (0000 .. 012B)
- Notepad library: 15 (page 00 .. 0E) x 32 byte
- PACKET FORMAT:
- START(2) - ADDR(4) - PID(1) - LENGTH(2) –( DATA )- SUM(2)
- - START: EF 01
- - ADDR: module address, default: FF FF FF FF
- - PID: 01 (command) 07 (ack) 02 (to-be-continue data) 08 (last data)
- - LENGTH: length of DATA and SUM in bytes (maximum is LENGTH limit)
- - DATA: command, confirmation code, param, or data
- - SUM: Sum of each byte of PID, LENGTH, and DATA
- Long data is sent in multiple packets (PIDs: 02, 02, ..., 08)
- SetSysPara = 0E -- Set system basic parameter
- Command: START - ADDR - 01 - 0005 -( 0E - ParamNo(1) - Value(1) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- ParamNo=04 (Baudrate control), Value=00..0C, for baudrate=value * 9600
- ParamNo=05 (Security level), Value=01..05, bigger is higher reject
- ParamNo=06 (LENGTH limit), Value=00 (32 bytes) 01 (64) 02 (128) 03(256)
- Confirmation= 00 (success) 01 (error) 1A (number is wrong)
- ReadSysPara = 0F -- Read system parameter
- Command: START - ADDR - 01 - 0003 -( 0F )- SUM
- Result: START - ADDR - 07 - 0013 -( Confirmation(1) – Structure(16) )- SUM
- Confirmation= 00 (success) 01 (error)
- Structure= (with example, questions are I’m not sure)
- - Status register : 00 00?
- - System verify code (must be 09?) : 00 00?
- - Fingerprint library size : 01 2C
- - Security level : 00 03
- - ADDR : FF FF FF FF
- - LENGTH limit : 00 02
- - Baudrate control : 00 06
- SetPwd = 12 -- Set Password
- Command: START - ADDR - 01(cmd) - 0007 -( 12 - Password(4) )- SUM
- Result: START - ADDR - 07(ack) - 0003 -( Confirmation(1) )- SUM
- Confirmation: 00 (success) 01 (error)
- Warning: You will need to VfyPwd on every boot.
- VfyPwd = 13 -- Verify Password
- Command: START - ADDR - 01(cmd) - 0007 -( 13 - Password(4) )- SUM
- Result: START - ADDR - 07(ack) - 0003 -( Confirmation(1) )- SUM
- Confirmation: 00 (success) 01 (error)
- SetAdder = 15 -- Set new module address
- Command: START - ADDR - 01(cmd) - 0007 -( 15 - NewAddress(4) )- SUM
- Result: START – NewAddress(4) - 07(ack) - 0007 -( Confirmation(1) )- SUM
- Confirmation= 00 (success) 01 (error)
- Control = 17 -- Ports control
- Command: START - ADDR - 01 - 0004 -( 17 - OnOff(1) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- OnOff= 00 (close UART port) 01 (open UART port), Why?!
- Confirmation= 00 (success) 01 (error) 1D(number is wrong)
- TemplateNum = 1D -- Read used model number
- Command: START - ADDR - 01 - 0003 -( 1D )- SUM
- Result: START - ADDR - 07 - 0005 -( Confirmation(1) - Number(2) )- SUM
- Confirmation: 00 (success) 01 (error)
- Number= used model number
- GenImg = 01 -- Record fingerprint image
- Command: START - ADDR - 01 - 0003 -( 01 )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- Confirmation= 00 (success) 01 (error) 02 (no finger) 03 (fail to record)
- UpImage = 0A -- Upload image to host
- Command: START - ADDR - 01 - 0003 -( 0A )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- Confirmation= 00 (ok, image data to follow) 01 (error) 0F (cannot send)
- Image data is 256 x 288 px, 4 bit/px (UART) or 8 bit/px (USB), sent in multiple packets
- DownImage = 0B -- Download image from host
- Command: START - ADDR - 01 - 0003 -( 0B )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- Confirmation= 00 (ok, send me the image data) 01 (error) 0F (cannot receive)
- Image data is 256 x 288 px, 4 bit/px (UART) or 8 bit/px (USB), sent in multiple packets
- Img2Tz = 02 -- Generate image feature
- Command: START - ADDR - 01 - 0004 -( 02 - BufferID(1) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
- Confirmation= 00 (success) 01 (error) 06 (image is confusing)
- 07 (feature point is too few) 15 (no effective original image)
- RegModel = 05 -- Feature synthesis
- Command: START - ADDR - 01 - 0003 -( 05 )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- Confirmation= 00 (success) 01 (error) 0A (finger not match)
- "Combine features in CharBuffer1 and CharBuffer2,
- put model result on CharBuffer1 copied to CharBuffer2"
- Store = 06 -- Store model from charbuffer to flash
- Command: START - ADDR - 01 - 0006 -( 06 - BufferID(1) - PageID(2) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
- PageID= 0000 .. (Fingerprint library size - 1)
- Confirmation: 00 (success) 01 (error) 0B (out of range) 18 (flash error)
- LoadChar = 07 -- Load model from flash to charbuffer
- Command: START - ADDR - 01 - 0006 -( 07 - BufferID(1) - PageID(2) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
- PageID= 0000 .. (Fingerprint library size - 1)
- Confirmation= 00 (success) 01 (error) 0B (out of range) 0C (failed)
- UpChar = 08 -- Upload feature/model from charbuffer to host
- Command: START - ADDR - 01 - 0004 -( 08 - BufferID(1) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
- Confirmation= 00 (success, data to follow) 01 (error) 0D (failed)
- Data sent in multiple packets
- DownChar = 09 -- Download feature/model from host to charbuffer
- Command: START - ADDR - 01 - 0004 -( 09 - BufferID(1) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
- Confirmation= 00 (ok, send me the data) 01 (error) 0E (cannot receive)
- Data sent in multiple packets
- DeletChar = 0C -- Delete models from library
- Command: START - ADDR - 01 - 0007 -( 0C - PageID(2) - Qty(2) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- PageID= offset, 0000 .. (Fingerprint library size - 1)
- Qty= How many models to delete
- Confirmation= 00 (success) 01 (error) 0C (failed)
- Empty = 0D -- Empty the library
- Command: START - ADDR - 01 - 0003 -( 0D )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- Confirmation= 00 (success) 01 (error) 0C (failed)
- Match = 03 -- Match (1:1) feature in CharBuffer1 and model in CharBuffer2
- Command: START - ADDR - 01 - 0003 -( 03 )- SUM
- Result: START - ADDR - 07 - 0005 -( Confirmation(1) - Score(2) )- SUM
- Confirmation= 00 (match) 01 (error) 08 (not match)
- Search = 04 -- Search (1:N) feature in models stored in library
- Command: START - ADDR - 01 - 0008 -( 04 - BufferID(1) - PageID(2) - Qty(2) )- SUM
- Result: START - ADDR - 07 - 0007 -( Confirmation(1) - PageID(2) - Score(2) )- SUM
- BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
- PageID= offset/result, 0000 .. (Fingerprint library size - 1)
- Qty= How many models in flash to compare
- Confirmation= 00 (match) 01 (error) 09 (not found)
- GetRandomCode = 14 -- Get 4 byte random
- Command: START - ADDR - 01 - 0003 -( 14 )- SUM
- Result: START - ADDR - 07 - 0007 -( Confirmation(1) - Random(4) )- SUM
- Confirmation= 00 (success) 01 (error)
- Random= result
- WriteNotepad = 18 -- Write to user notepad
- Command: START - ADDR - 01 - 0024 -( 18 - PageID(1) - Content(32) )- SUM
- Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
- PageID= 00 to 0E (Notepad library's page)
- Confirmation= 00 (success) 01 (error)
- ReadNotepad = 19 -- Read from user notepad
- Command: START - ADDR - 01 - 0004 -( 19 - PageID(1) )- SUM
- Result: START - ADDR - 07 - 0023 -( Confirmation(1) - Content(32) )- SUM
- PageID= 00 to 0E (Notepad library's page)
- Confirmation= 00 (success) 01 (error)
- DONE.
- HOW TO SETUP
- - Define the Baudrate, security level, and packet LENGTH limit by SetSysPara and check it with ReadSysPara
- - Set module address with SetAdder.
- - Set the password with SetPwd. See Warning
- - I’m not sure about closing the UART port so just skip Control
- - Empty the fingerprint library with Empty
- ENROLLMENT
- - Scan the fingerprint with GenImg
- - Create image feature to CharBufer1 with Img2Tz
- - Scan the fingerprint with GenImg again
- - Create image feature to CharBuffer2 with Img2Tz
- - Combine the two features into a model with RegModel
- - Store the model with Store
- - Or You can delete it later with DeletChar
- VERIFY
- - Scan the fingerprint with GenImg
- - Create image feature to CharBuffer1 with Img2Tz
- - Load a model to CharBuffer2 with LoadChar
- - See if the feature match the model with Match
- IDENTIFY
- - Scan the fingerprint with GenImg
- - Create image feature to CharBuffer1 with Img2Tz
- - Use Search to identify the feature with the models stored in library
- NOTES
- - You will need to verify password with VfyPwd everytime module is powered on, if you set the password
- - You can upload/download fingerprint image with UpImage and DownImage
- - and upload/download the fingerprint feature or model with UpChar and DownChar
- - You can check the fingerprint library storage left with TemplateNum
- - You can get 32bit random number with GetRandomCode
- - You can write 32 byte notes and read them with WriteNotepad and ReadNotepad
Add Comment
Please, Sign In to add comment