sohotcall

FPM10A Bahasa

Jul 15th, 2019
251
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FPM10A MODULE SIDIK JARI
  2. ------------------------
  3. (Yang isi # tinggal diubah sesuai keperluan)
  4.  
  5. Contoh Cara Enrollment
  6. - GenImg untuk mengambil sidik jari ke ImgBuffer
  7. - Img2Tz untuk membuat fitur sidik jari dari ImgBuffer ke CharBuffer1
  8. - GenImg untuk mengambil sidik jari ke ImgBuffer
  9. - Img2Tz untuk membuat fitur sidik jari dari ImgBuffer ke di CharBuffer2
  10. - RegModel untuk mengubah kedua fitur menjadi model
  11. - Store untuk menyimpan model di CharBuffer1 ke
  12. page #0000 di librari
  13.  
  14. Contoh cara Verifikasi
  15. - GenImg
  16. - Img2Tz pakai CharBuffer1
  17. - LoadChar untuk load model dari page #0000 di librari ke CharBuffer2
  18. - Match untuk mencocokkan fitur dan model
  19.  
  20. Contoh cara Identifikasi
  21. - GenImg
  22. - Img2Tz pakai CharBuffer1
  23. - Search untuk mencocokkan fitur di CharBuffer1
  24. dengan #0001 buah model di librari mulai page #0000
  25.  
  26. Spesifikasi dan Pengkabelan
  27. ---------------------------
  28. Baudrate default : 576000
  29. Image buffer : 256 x 288 pixel
  30. Character file buffer: 2 x 512 bytes? (CharBuffer1, Charbuffer2)
  31. Fingerprint library : 1000 models (PageID 0000 .. 03E7), atau 300 (0000 .. 012B)
  32. atau 150 (0000 .. 0095) x 512 bytes?
  33. Notepad library : 15 (page 00 .. 0E) x 32 bytes
  34.  
  35. (FPM -- USB-to-TTL)
  36. Gnd -- Gnd
  37. Rx -- Tx
  38. Tx -- Rx
  39. Vcc -- 3V3
  40. Tout -- not connected
  41. T3v3 -- 3V3
  42.  
  43. (FPM -- Raspi/Bluepill/ESP8266)
  44. Gnd -- Gnd
  45. Rx -- Tx
  46. Tx -- Rx
  47. Vcc -- 3V3
  48. Tout -- GPIO input
  49. T3v3 -- 3V3
  50.  
  51. (FPM -- Arduino)
  52. Gnd -- Gnd
  53. Rx --+--[resistor]-- Tx
  54. |
  55. `-[resistor]--[resistor]-- Gnd
  56. Tx -- Rx
  57. Vcc -- 3V3
  58. Tout -- GPIO input
  59. T3v3 -- 3V3
  60. resistornya coba 1KOhm atau sekitarnya.
  61.  
  62. Format Paket
  63. --------------
  64. START - ADDR - PID - LENGTH –( DATA )- SUM
  65. - START (2 bytes): EF 01
  66. - ADDR (4 bytes) : Alamat modul, default: FF FF FF FF
  67. - PID (1 byte) : 01 (command) 07 (konfirmasi) 02 (data bersambung) 08 (data terakhir)
  68. - LENGTH (2 byte): Panjang DATA dan SUM dalam bytes (perhatikan LENGTH limit)
  69. - DATA (variasi) : Command, Ack (kode konfirmasi), Param, dan/atau Data
  70. - SUM (2 bytes) : Jumlah semua byte PID, LENGTH, dan DATA
  71. Data yang panjang dikirim di paket data terpisah.
  72.  
  73. Contoh Paket
  74. ------------
  75. Tujuan "Search untuk mencocokkan fitur di CharBuffer1
  76. dengan #0001 buah model di librari mulai page #0000"
  77.  
  78. Lihat Search di daftar command/param/konfirmasi:
  79.  
  80. "Search = 04 -- Search (1:N) feature in models stored in library
  81. Command: START - ADDR - 01 - 0008 -( 04 - BufferID(1) - PageID(2) - Qty(2) )- SUM
  82. Result: START - ADDR - 07 - 0007 -( Confirmation(1) - PageID(2) - Score(2) )- SUM
  83. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  84. PageID= offset/result, 0000 .. (Fingerprint library size - 1)
  85. Qty= How many models in flash to compare
  86. Confirmation= 00 (match) 01 (error) 09 (not found)"
  87.  
  88. Ganti BufferID dengan 01 (CharBuffer1), PageID dengan 0000, dan Qty dengan 0001.
  89.  
  90. Command: START - ADDR - 01 - 0008 -( 04 - BufferID(1) - PageID(2) - Qty(2) )- SUM
  91. Command: EF01 FFFF 01 0008 04 01 0000 0001 000F
  92.  
  93. Command kita kirim ke modul sidik jari dan modul membalas Result
  94. Result: EF01 FFFF 07 0007 00 0000 0003 0011
  95. Result: START - ADDR - 07 - 0007 -( Confirmation(1) - PageID(2) - Score(2) )- SUM
  96.  
  97. Artinya Confirmation adalah 00 (match),
  98. Fitur tersebut match dengan data model di page 0000 di librari dengan score 0003.
  99.  
  100. PERHATIAN: Kode EF01 dst itu hexadecimal bytes (0xEF, 0x01), bukan string ("EF01").
  101.  
  102. DAFTAR COMMAND / PARAM / ACK (KONFIRMASI)
  103. -----------------------------------------
  104. SetSysPara = 0E -- Set system basic parameter
  105. "Mengeset parameter sistem: baudrate, security level, dan LENGTH limit."
  106. Command: START - ADDR - 01 - 0005 -( 0E - ParamNo(1) - Value(1) )- SUM
  107. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  108. ParamNo=04 (Baudrate control), Value=00..0C, mengeset baudrate=value * 9600
  109. ParamNo=05 (Security level), Value=01..05, gampang menerima..gampang menolak
  110. ParamNo=06 (LENGTH limit), Value=00 (32 bytes) 01 (64) 02 (128) 03(256)
  111. Confirmation= 00 (success) 01 (error) 1A (number is wrong)
  112.  
  113. ReadSysPara = 0F -- Read system parameter
  114. "Membaca parameter sistem. Yang paling penting menurut saya adalah mengecek
  115. Fingerprint library size (ukuran librari sidik jari)."
  116. Command: START - ADDR - 01 - 0003 -( 0F )- SUM
  117. Result: START - ADDR - 07 - 0013 -( Confirmation(1) – Structure(16) )- SUM
  118. Confirmation= 00 (success) 01 (error)
  119. Structure= (with example, questions are I’m not sure)
  120. - Status register                  : 00 00?
  121. - System verify code (must be 09?) : 00 00?
  122. - Fingerprint library size         : 01 2C
  123. - Security level                   : 00 03
  124. - ADDR                             : FF FF FF FF
  125. - LENGTH limit                     : 00 02
  126. - Baudrate control                 : 00 06
  127.  
  128. SetPwd = 12 -- Set Password
  129. "Mengeset password."
  130. Command: START - ADDR - 01(cmd) - 0007 -( 12 - Password(4) )- SUM
  131. Result: START - ADDR - 07(ack) - 0003 -( Confirmation(1) )- SUM
  132. Confirmation: 00 (success) 01 (error)
  133. Warning: You will need to VfyPwd on every boot.
  134.  
  135. VfyPwd = 13 -- Verify Password
  136. "Bila password diset. Harus masukin password tiap boot."
  137. Command: START - ADDR - 01(cmd) - 0007 -( 13 - Password(4) )- SUM
  138. Result: START - ADDR - 07(ack) - 0003 -( Confirmation(1) )- SUM
  139. Confirmation: 00 (success) 01 (error)
  140.  
  141. SetAdder = 15 -- Set new module address
  142. "Mengeset address modul sidik jari. Default address adalah FF FF FF FF."
  143. Command: START - ADDR - 01(cmd) - 0007 -( 15 - NewAddress(4) )- SUM
  144. Result: START – NewAddress(4) - 07(ack) - 0007 -( Confirmation(1) )- SUM
  145. Confirmation= 00 (success) 01 (error)
  146.  
  147. Control = 17 -- Ports control
  148. "Menghidupkan/menonaktifkan Port UART dan USB. Kayaknya berbahaya."
  149. Command: START - ADDR - 01 - 0004 -( 17 - OnOff(1) )- SUM
  150. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  151. OnOff= 00 (close UART port) 01 (open UART port), Why?!
  152. Confirmation= 00 (success) 01 (error) 1D(number is wrong)
  153.  
  154. TemplateNum = 1D -- Read used model number
  155. "Mengecek librari sudah terisi berapa banyak model."
  156. Command: START - ADDR - 01 - 0003 -( 1D )- SUM
  157. Result: START - ADDR - 07 - 0005 -( Confirmation(1) - Number(2) )- SUM
  158. Confirmation: 00 (success) 01 (error)
  159. Number= used model number
  160.  
  161. GenImg = 01 -- Record fingerprint image
  162. "Menscan sidik jari dan menaruh datanya ke ImgBuffer.
  163. Kalau nggak ada jari di scanner ya no finger."
  164. Command: START - ADDR - 01 - 0003 -( 01 )- SUM
  165. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  166. Confirmation= 00 (success) 01 (error) 02 (no finger) 03 (fail to record)
  167.  
  168. UpImage = 0A -- Upload image to host
  169. "Memulai upload data dari ImgBuffer modul ke komputer induk."
  170. Command: START - ADDR - 01 - 0003 -( 0A )- SUM
  171. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  172. Confirmation= 00 (ok, image data to follow) 01 (error) 0F (cannot send)
  173. Image data is 256 x 288 px, 4 bit/px (UART) or 8 bit/px (USB), sent in multiple packets
  174.  
  175. DownImage = 0B -- Download image from host
  176. "Memulai download data dari komputer induk ke ImgBuffer modul."
  177. Command: START - ADDR - 01 - 0003 -( 0B )- SUM
  178. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  179. Confirmation= 00 (ok, send me the image data) 01 (error) 0F (cannot receive)
  180. Image data is 256 x 288 px, 4 bit/px (UART) or 8 bit/px (USB), sent in multiple packets
  181.  
  182. Img2Tz = 02 -- Generate image feature
  183. "Mendapatkan fitur sidik jari dari ImgBuffer ke CharBuffer."
  184. Command: START - ADDR - 01 - 0004 -( 02 - BufferID(1) )- SUM
  185. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  186. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  187. Confirmation= 00 (success) 01 (error) 06 (image is confusing)
  188.   07 (feature point is too few) 15 (no effective original image)
  189.  
  190. RegModel = 05 -- Feature synthesis
  191. "Memproses dua fitur di CharBuffer1 dan CharBuffer2
  192. menjadi model di CharBuffer1 dan salinannya di CharBuffer2 (isi sama)."
  193. Command: START - ADDR - 01 - 0003 -( 05 )- SUM
  194. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  195. Confirmation= 00 (success) 01 (error) 0A (finger not match)
  196. "Combine features in CharBuffer1 and CharBuffer2,
  197. put model result on CharBuffer1 copied to CharBuffer2"
  198.  
  199. Store = 06 -- Store model from charbuffer to flash
  200. "Menyimpan model dari CharBuffer ke Page di librari."
  201. Command: START - ADDR - 01 - 0006 -( 06 - BufferID(1) - PageID(2) )- SUM
  202. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  203. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  204. PageID= 0000 .. (Fingerprint library size - 1)
  205. Confirmation: 00 (success) 01 (error) 0B (out of range) 18 (flash error)
  206.  
  207. LoadChar = 07 -- Load model from flash to charbuffer
  208. "Menyalin data model dari Page di librari ke CharBuffer."
  209. Command: START - ADDR - 01 - 0006 -( 07 - BufferID(1) - PageID(2) )- SUM
  210. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  211. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  212. PageID= 0000 .. (Fingerprint library size - 1)
  213. Confirmation= 00 (success) 01 (error) 0B (out of range) 0C (failed)
  214.  
  215. UpChar = 08 -- Upload feature/model from charbuffer to host
  216. "Memulai upload model dari CharBuffer modul ke komputer induk."
  217. Command: START - ADDR - 01 - 0004 -( 08 - BufferID(1) )- SUM
  218. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  219. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  220. Confirmation= 00 (success, data to follow) 01 (error) 0D (failed)
  221. Data sent in multiple packets
  222.  
  223. DownChar = 09 -- Download feature/model from host to charbuffer
  224. "Memulai download model dari komputer induk ke CharBuffer modul"
  225. Command: START - ADDR - 01 - 0004 -( 09 - BufferID(1) )- SUM
  226. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  227. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  228. Confirmation= 00 (ok, send me the data) 01 (error) 0E (cannot receive)
  229. Data sent in multiple packets
  230.  
  231. DeletChar = 0C -- Delete models from library
  232. "Menghapus satu/beberapa model di page di librari"
  233. Command: START - ADDR - 01 - 0007 -( 0C - PageID(2) - Qty(2) )- SUM
  234. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  235. PageID= offset, 0000 .. (Fingerprint library size - 1)
  236. Qty= How many models to delete
  237. Confirmation= 00 (success) 01 (error) 0C (failed)
  238.  
  239. Empty = 0D -- Empty the library
  240. "Mengosongkan librari"
  241. Command: START - ADDR - 01 - 0003 -( 0D )- SUM
  242. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  243. Confirmation= 00 (success) 01 (error) 0C (failed)
  244.  
  245. Match = 03 -- Match (1:1) feature in CharBuffer1 and model in CharBuffer2
  246. "Mencocokkan fitur di CharBuffer1 dengan model di CharBuffer2"
  247. Command: START - ADDR - 01 - 0003 -( 03 )- SUM
  248. Result: START - ADDR - 07 - 0005 -( Confirmation(1) - Score(2) )- SUM
  249. Confirmation= 00 (match) 01 (error) 08 (not match)
  250.  
  251. Search = 04 -- Search (1:N) feature in models stored in library
  252. "Mencari model yang paling cocok dengan fitur di CharBuffer
  253. yang ada satu/beberapa page berurutan di librari"
  254. Command: START - ADDR - 01 - 0008 -( 04 - BufferID(1) - PageID(2) - Qty(2) )- SUM
  255. Result: START - ADDR - 07 - 0007 -( Confirmation(1) - PageID(2) - Score(2) )- SUM
  256. BufferID= 01 (CharBuffer1) 02 (CharBuffer2)
  257. PageID= offset/result, 0000 .. (Fingerprint library size - 1)
  258. Qty= How many models in flash to compare
  259. Confirmation= 00 (match) 01 (error) 09 (not found)
  260.  
  261. GetRandomCode = 14 -- Get 4 byte random
  262. "Mendapatkan 4 byte random"
  263. Command: START - ADDR - 01 - 0003 -( 14 )- SUM
  264. Result: START - ADDR - 07 - 0007 -( Confirmation(1) - Random(4) )- SUM
  265. Confirmation= 00 (success) 01 (error)
  266. Random= result
  267.  
  268. WriteNotepad = 18 -- Write to user notepad
  269. "Menyimpan teks 32 bytes ke page di Notepad librari"
  270. Command: START - ADDR - 01 - 0024 -( 18 - PageID(1) - Content(32) )- SUM
  271. Result: START - ADDR - 07 - 0003 -( Confirmation(1) )- SUM
  272. PageID= 00 to 0E (Notepad library's page)
  273. Confirmation= 00 (success) 01 (error)
  274.  
  275. ReadNotepad = 19 -- Read from user notepad
  276. "Membaca teks 32 bytes ke page di Notepad librari"
  277. Command: START - ADDR - 01 - 0004 -( 19 - PageID(1) )- SUM
  278. Result: START - ADDR - 07 - 0023 -( Confirmation(1) - Content(32) )- SUM
  279. PageID= 00 to 0E (Notepad library's page)
  280. Confirmation= 00 (success) 01 (error)
RAW Paste Data