sohotcall

FPM10A Cheatsheet How-to

Jul 1st, 2018
109
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FPM10A Fingerprint Module
  2.  
  3. Baudrate default: 576000
  4. Image buffer: 256 x 288 pixel
  5. Character file buffer: 2 x 512 bytes? (CharBuffer1, Charbuffer2)
  6. Fingerprint library: 1000 models (PageID 0000 .. 03E7), or 300 (0000 .. 012B)
  7. Notepad library: 15 (page 00 .. 0E) x 32 byte
  8.  
  9. PACKET FORMAT:
  10. START(2) - ADDR(4) - PID(1) - LENGTH(2) –( DATA )- SUM(2)
  11. - START: EF 01
  12. - ADDR: module address, default: FF FF FF FF
  13. - PID: 01 (command) 07 (ack) 02 (to-be-continue data) 08 (last data)
  14. - LENGTH: length of DATA and SUM in bytes (maximum is LENGTH limit)
  15. - DATA: command, confirmation code, param, or data
  16. - SUM: Sum of each byte of PID, LENGTH, and DATA
  17. Long data is sent in multiple packets (PIDs: 02, 02, ..., 08)
  18.  
  19. SetSysPara = 0E -- Set system basic parameter
  20. Command: START - ADDR - 01 - 0005 -( 0E - ParamNo(1) - Value(1) )- SUM
  21. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  22. ParamNo=04 (Baudrate control), Value=00..0C, for baudrate=value * 9600
  23. ParamNo=05 (Security level), Value=01..05, bigger is higher reject
  24. ParamNo=06 (LENGTH limit), Value=00 (32 bytes) 01 (64) 02 (128) 03(256)
  25. Confirmation= 00 (success) 01 (error) 1A (number is wrong)
  26.  
  27. ReadSysPara = 0F -- Read system parameter
  28. Command: START - ADDR - 01 - 0003 -( 0F )- SUM
  29. Result: START - ADDR - 07 - 0013 -( Confirmation(1) – Structure(16) )- SUM
  30. Confirmation= 00 (success) 01 (error)
  31. Structure= (with example, questions are I’m not sure)
  32. - Status register : 00 00?
  33. - System verify code (must be 09?) : 00 00?
  34. - Fingerprint library size : 01 2C
  35. - Security level : 00 03
  36. - ADDR : FF FF FF FF
  37. - LENGTH limit : 00 02
  38. - Baudrate control : 00 06
  39.  
  40. SetPwd = 12 -- Set Password
  41. Command: START - ADDR - 01(cmd) - 0007 -( 12 - Password(4) )- SUM
  42. Result: START - ADDR - 07(ack) - 0003 -( Confirmation(1) )- SUM
  43. Confirmation: 00 (success) 01 (error)
  44. Warning: You will need to VfyPwd on every boot.
  45.  
  46. VfyPwd = 13 -- Verify Password
  47. Command: START - ADDR - 01(cmd) - 0007 -( 13 - Password(4) )- SUM
  48. Result: START - ADDR - 07(ack) - 0003 -( Confirmation(1) )- SUM
  49. Confirmation: 00 (success) 01 (error)
  50.  
  51. SetAdder = 15 -- Set new module address
  52. Command: START - ADDR - 01(cmd) - 0007 -( 15 - NewAddress(4) )- SUM
  53. Result: START – NewAddress(4) - 07(ack) - 0007 -( Confirmation(1) )- SUM
  54. Confirmation= 00 (success) 01 (error)
  55.  
  56. Control = 17 -- Ports control
  57. Command: START - ADDR - 01 - 0004 -( 17 - OnOff(1) )- SUM
  58. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  59. OnOff= 00 (close UART port) 01 (open UART port), Why?!
  60. Confirmation= 00 (success) 01 (error) 1D(number is wrong)
  61.  
  62. TemplateNum = 1D -- Read used model number
  63. Command: START - ADDR - 01 - 0003 -( 1D )- SUM
  64. Result: START - ADDR - 07 - 0005 -( Confirmation(1) - Number(2) )- SUM
  65. Confirmation: 00 (success) 01 (error)
  66. Number= used model number
  67.  
  68. GenImg = 01 -- Record fingerprint image
  69. Command: START - ADDR - 01 - 0003 -( 01 )- SUM
  70. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  71. Confirmation= 00 (success) 01 (error) 02 (no finger) 03 (fail to record)
  72.  
  73. UpImage = 0A -- Upload image to host
  74. Command: START - ADDR - 01 - 0003 -( 0A )- SUM
  75. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  76. Confirmation= 00 (ok, image data to follow) 01 (error) 0F (cannot send)
  77. Image data is 256 x 288 px, 4 bit/px (UART) or 8 bit/px (USB), sent in multiple packets
  78.  
  79. DownImage = 0B -- Download image from host
  80. Command: START - ADDR - 01 - 0003 -( 0B )- SUM
  81. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  82. Confirmation= 00 (ok, send me the image data) 01 (error) 0F (cannot receive)
  83. Image data is 256 x 288 px, 4 bit/px (UART) or 8 bit/px (USB), sent in multiple packets
  84.  
  85. Img2Tz = 02 -- Generate image feature
  86. Command: START - ADDR - 01 - 0004 -( 02 - BufferID(1) )- SUM
  87. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  88. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  89. Confirmation= 00 (success) 01 (error) 06 (image is confusing)
  90. 07 (feature point is too few) 15 (no effective original image)
  91.  
  92. RegModel = 05 -- Feature synthesis
  93. Command: START - ADDR - 01 - 0003 -( 05 )- SUM
  94. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  95. Confirmation= 00 (success) 01 (error) 0A (finger not match)
  96. "Combine features in CharBuffer1 and CharBuffer2,
  97. put model result on CharBuffer1 copied to CharBuffer2"
  98.  
  99. Store = 06 -- Store model from charbuffer to flash
  100. Command: START - ADDR - 01 - 0006 -( 06 - BufferID(1) - PageID(2) )- SUM
  101. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  102. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  103. PageID= 0000 .. (Fingerprint library size - 1)
  104. Confirmation: 00 (success) 01 (error) 0B (out of range) 18 (flash error)
  105.  
  106. LoadChar = 07 -- Load model from flash to charbuffer
  107. Command: START - ADDR - 01 - 0006 -( 07 - BufferID(1) - PageID(2) )- SUM
  108. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  109. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  110. PageID= 0000 .. (Fingerprint library size - 1)
  111. Confirmation= 00 (success) 01 (error) 0B (out of range) 0C (failed)
  112.  
  113. UpChar = 08 -- Upload feature/model from charbuffer to host
  114. Command: START - ADDR - 01 - 0004 -( 08 - BufferID(1) )- SUM
  115. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  116. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  117. Confirmation= 00 (success, data to follow) 01 (error) 0D (failed)
  118. Data sent in multiple packets
  119.  
  120. DownChar = 09 -- Download feature/model from host to charbuffer
  121. Command: START - ADDR - 01 - 0004 -( 09 - BufferID(1) )- SUM
  122. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  123. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  124. Confirmation= 00 (ok, send me the data) 01 (error) 0E (cannot receive)
  125. Data sent in multiple packets
  126.  
  127. DeletChar = 0C -- Delete models from library
  128. Command: START - ADDR - 01 - 0007 -( 0C - PageID(2) - Qty(2) )- SUM
  129. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  130. PageID= offset, 0000 .. (Fingerprint library size - 1)
  131. Qty= How many models to delete
  132. Confirmation= 00 (success) 01 (error) 0C (failed)
  133.  
  134. Empty = 0D -- Empty the library
  135. Command: START - ADDR - 01 - 0003 -( 0D )- SUM
  136. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  137. Confirmation= 00 (success) 01 (error) 0C (failed)
  138.  
  139. Match = 03 -- Match (1:1) feature in CharBuffer1 and model in CharBuffer2
  140. Command: START - ADDR - 01 - 0003 -( 03 )- SUM
  141. Result: START - ADDR - 07 - 0005 -( Confirmation(1) - Score(2) )- SUM
  142. Confirmation= 00 (match) 01 (error) 08 (not match)
  143.  
  144. Search = 04 -- Search (1:N) feature in models stored in library
  145. Command: START - ADDR - 01 - 0008 -( 04 - BufferID(1) - PageID(2) - Qty(2) )- SUM
  146. Result: START - ADDR - 07 - 0007 -( Confirmation(1) - PageID(2) - Score(2) )- SUM
  147. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  148. PageID= offset/result, 0000 .. (Fingerprint library size - 1)
  149. Qty= How many models in flash to compare
  150. Confirmation= 00 (match) 01 (error) 09 (not found)
  151.  
  152. GetRandomCode = 14 -- Get 4 byte random
  153. Command: START - ADDR - 01 - 0003 -( 14 )- SUM
  154. Result: START - ADDR - 07 - 0007 -( Confirmation(1) - Random(4) )- SUM
  155. Confirmation= 00 (success) 01 (error)
  156. Random= result
  157.  
  158. WriteNotepad = 18 -- Write to user notepad
  159. Command: START - ADDR - 01 - 0024 -( 18 - PageID(1) - Content(32) )- SUM
  160. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  161. PageID= 00 to 0E (Notepad library's page)
  162. Confirmation= 00 (success) 01 (error)
  163.  
  164. ReadNotepad = 19 -- Read from user notepad
  165. Command: START - ADDR - 01 - 0004 -( 19 - PageID(1) )- SUM
  166. Result: START - ADDR - 07 - 0023 -( Confirmation(1) - Content(32) )- SUM
  167. PageID= 00 to 0E (Notepad library's page)
  168. Confirmation= 00 (success) 01 (error)
  169.  
  170. DONE.
  171.  
  172. HOW TO SETUP
  173. - Define the Baudrate, security level, and packet LENGTH limit by SetSysPara and check it with ReadSysPara
  174. - Set module address with SetAdder.
  175. - Set the password with SetPwd. See Warning
  176. - I’m not sure about closing the UART port so just skip Control
  177. - Empty the fingerprint library with Empty
  178.  
  179. ENROLLMENT
  180. - Scan the fingerprint with GenImg
  181. - Create image feature to CharBufer1 with Img2Tz
  182. - Scan the fingerprint with GenImg again
  183. - Create image feature to CharBuffer2 with Img2Tz
  184. - Combine the two features into a model with RegModel
  185. - Store the model with Store
  186. - Or You can delete it later with DeletChar
  187.  
  188. VERIFY
  189. - Scan the fingerprint with GenImg
  190. - Create image feature to CharBuffer1 with Img2Tz
  191. - Load a model to CharBuffer2 with LoadChar
  192. - See if the feature match the model with Match
  193.  
  194. IDENTIFY
  195. - Scan the fingerprint with GenImg
  196. - Create image feature to CharBuffer1 with Img2Tz
  197. - Use Search to identify the feature with the models stored in library
  198.  
  199. NOTES
  200. - You will need to verify password with VfyPwd everytime module is powered on, if you set the password
  201. - You can upload/download fingerprint image with UpImage and DownImage
  202. - and upload/download the fingerprint feature or model with UpChar and DownChar
  203. - You can check the fingerprint library storage left with TemplateNum
  204. - You can get 32bit random number with GetRandomCode
  205. - You can write 32 byte notes and read them with WriteNotepad and ReadNotepad
RAW Paste Data