From Andreas Grotz 2006-09-03 ah trigger one more part ... BD ** BE 00 E0 is not the header the Frame-packet starts with E0 and ends with "BD ** BE 00" > > so what did i did ..... > > > > i sniffed the usb-traffic in windows and made an finger-scan ... after > > that i created a Visual-Buffer-Analysis tool .. so i quickly noticed > > where the Frames are .. the Interessting point now is the > > following ... the images seem to be 63 bytes width and like 1700 lines > > height (63*1700 bytes) .. mhm ... > > i moved these 1700 bytes of each frame into an buffer and did some > > byte-to-bit-to-image thing ... > > A bit strange in their datasheet (short) the mention 192 pixels x16 > lines. > One fingerprint 1700 lines means i have to change that part (skipped it > to 160 for my program) > For their other chips the use 1 pixel is 4bit. > > the interested part is that the device has an extrem > > high-framesPerSecond-Count so in a driver we would have to compare > > eache frame with another and process them to one finger-print .. > > (seams the real hard part) i finally did it ;) i've the complete scanning-frame-seq. attached the scanner works like an Optical-Mouse ... the first 10~20 frames are dump, when the finger-print gets recognized by the device the frames are only transmitted if they can be attached to each other, so it is just neccessary to detect when the frames are Ok (perhaps for this case there is flag in the proto) and then have to attached below each other and finish. after all i just triggered the IMAGE-Response-Header: // 02 BD 74 BE 00 E0 // 09 BD 6E BE 00 E0, // ** BD ** BE 00 E0 // ++ ++ ++ ++ i scanned the log for these 4 bytes and triggered 160 frames in the log file So every Image starts with [0xBD] [0x??][0xBE] [0x00] [0xE0] [192*8 Bytes] (4 Bit per Pixel works just perfect right) Now the Image-Processing showed first just a repeating thing but not a print ... i triggerd out the 192x16 is true "BUT" its not the Image-Direction ... 192x16 would normally say X=192, Y=16 .. right ? in this case the Sensor works so: X= 16 * 4 Bit with 192 lines .. (just rotate the device 90°degrees *g*) Working: for ( y = 0; y<192;y++) for ( x = 0; x<16;x++) pixel[x,y] = buffer[offset + ((y*16)+x)]; Aspected: for ( x = 0; x<192;x++) for (y = 0; y<16;y++) pixel[x,y] = buffer[offset + ((y*192)+x)]; so on scanner line is just 16 Pixels and not 192 ... and the image-buffer have also to be rotate .. // display xbuf a:=0;b:=0;x:=0;y:=0; for cd:=0 to (192*16)-1 do begin a:=xbuf[cd]; inc(x); if (x>16) then begin x:=1;inc(y); end; form1.pbf.canvas.pixels[y+xp,x+yp]:=rgb(a*8,a*8,a*8); (heres the complete magic code i used (delphi) ) var yp:word=0; xp:word=0; procedure extract_frame(ofs:longint); var x,y,cd,l:longint; a,d,b:byte; xbuf:array[0..192*16]of byte; begin cd:=0; fillchar(xbuf,sizeof(xbuf),0); for l:=ofs to ofs+192*8 do begin b:=buf[l]; // split Byte at offset l to b1 and b2 b1:=(b shl 4); b2:=(b shr 4); b1:=b shr 4; // shift l, shift r... if (cd <= 192*16) then begin // fill xbuf with new 4 bit pixel-data xbuf[cd]:=b1;inc(cd); xbuf[cd]:=b2;inc(cd); end; end; // display xbuf a:=0;b:=0;x:=0;y:=0; for cd:=0 to (192*16)-1 do begin a:=xbuf[cd]; inc(x); if (x>16) then begin x:=1;inc(y); end; form1.pbf.canvas.pixels[y+xp,x+yp]:=rgb(a*8,a*8,a*8); end; /* ---------------------------------------------------- ******* ATTENTION ****** Thats Point i mententioned above. ---------------------------------------------------- */ // next frame below this one, and at end cont. on top right side inc(yp,17); if (yp > form1.pbf.height) then begin yp:=0; inc(xp,195); end; end; // scan the extracted incoming-usb-log-traffic and seek for the image header // BE 00 E0 procedure TForm1.Button8Click(Sender: TObject); var frames,l:longint; begin pbf.left:=pb.left; pbf.width:=form1.Width; pbf.height:=form1.height; pbf.Canvas.FillRect(rect(0,0,pbf.width,pbf.height)); frames:=0; // ** BD ** BE 00 E0 for l:=1 to tp-10 do begin if (buf[l] = $BD)and (buf[l+2] = $BE)and (buf[l+3] = $00)and (buf[l+4] = $E0) then begin // we got an image inc(frames); extract_frame(l+5); end; end; // memo1.lines.insert(0,':: '+inttostr(frames)+' Frames Found.'); end;