AJ or michelle, if you are still here. Could you please email me that test program your speaking of? I'll send you a PM.
I'm having issues getting a successful PS_GetImage. I'm using a serial port monitor supplied by the PCW C Programming environment. Whenever I scan my finger and then send out the PS_GetImage packet, I receive a scan fail response everytime.
I've almost completed a program that will run enroll/delete/match routines but I can't monitor it over serial because those ports on the PIC18 that I am using are used to comm with the scanner.
Anyways thanks for all the help you guys have provided here! Very much appreciated.
For anyone programming a PIC to automate the process, feel free to check out what I have here. It does on the fly checksum.
Code: Select allvoid BIO_build_PKT(unsigned int CMD_Type, unsigned int CMD_ID, unsigned int CMD_var_length)
{
unsigned int var_length_cnt=0;
unsigned int checksum[2]={0,0};
unsigned int length[2]={0,0};
unsigned int a=0x00;
b=10;
checksum[0] = 0x00;
length[1] = 0x03 + CMD_var_length;
checksum[1] = length[0] + length[1] + CMD_ID;
var_length_cnt=0;
while(var_length_cnt < CMD_var_length)
{
checksum[1] = checksum[1] + cmd_variable[var_length_cnt];
var_length_cnt++;
}
PKT_build[0]=packetstrt[0] ;
PKT_build[1]=packetstrt[1] ;
PKT_build[2]=packetstrt[2] ;
PKT_build[3]=packetstrt[3] ;
PKT_build[4]=packetstrt[4] ;
PKT_build[5]=packetstrt[5] ;
PKT_build[6]=CMD_Type;
PKT_build[7]=length[0];
PKT_build[8]=length[1];
PKT_build[9]=CMD_ID;
a=0;
while(a<CMD_var_length)
{
PKT_build[b]=cmd_variable[a];
a++;
b++;
}
PKT_build[b]=checksum[0];
b++;
PKT_build[b]=checksum[1];
}
void PKT_SEND()
{
c=0;
while(c<=b)
{
putchar(PKT_build[c]);
delay_us(10);
c++;
}
}
void bio_enroll( )
{
BIO_build_PKT(0x01,PS_GetImage,0x00);
PKT_SEND();
delay_ms(2000);
cmd_variable[0] = 0x00;
BIO_build_PKT(0x01, PS_GenChar, 0x01);
PKT_SEND();
delay_ms(2000);
BIO_build_PKT(0x01,PS_GetImage,0x00);
PKT_SEND();
delay_ms(2000);
cmd_variable[0] = 0x01;
BIO_build_PKT(0x01, PS_GenChar, 0x01);
PKT_SEND();
delay_ms(2000);
BIO_build_PKT(0x01, PS_RegModel, 0x00);
PKT_SEND();
delay_ms(2000);
cmd_variable[0] = 0x01;
cmd_variable[1] = 0x00;
cmd_variable[2] = 0x03;
BIO_build_PKT(0x01, PS_StoreChar, 0x03);
PKT_SEND();
}