需要的来看一下,看能不能帮到你们
各项协议:
const unsigned char FP_Pack_Head[6] = {0xEF,0x01,0xFF,0xFF,0xFF,0xFF}; //协议包头
const unsigned char FP_Get[6] ={0x01,0x00,0x03,0x01,0x00,0x05};//获得指纹图像
const unsigned char FP_Buffer1[7] ={0x01,0x00,0x04,0x02,0x01,0x00,0x08};//临时指纹空间1
const unsigned char FP_Buffer2[7] ={0x01,0x00,0x04,0x02,0x02,0x00,0x09};//临时指纹空间2
const unsigned char FP_Model[6] ={0x01,0x00,0x03,0x05,0x00,0x09};//合并指纹图像
const unsigned char FP_BufferX[7] ={0x01,0x00,0x04,0x02,0x01,0x00,0x08};//搜索指纹临时空间
const unsigned char FP_Count[6] = {0x01,0x00,0x03,0x1D,0x00,0x21};//取指纹总数
const unsigned char FP_Search[11] ={0x01,0x00,0x08,0x04,0x01,0x00,0x00,0x03,0xA1,0x00,0xB2};//搜索指纹
unsigned char FP_Save_Finger[9]={0x01,0x00,0x06,0x06,0x01,0x00,0x0B,0x00,0x19}; //将BUFFER1中的特征码存放到指定的位置
unsigned char FP_Delete_Model[10]={0x01,0x00,0x07,0x0C,0x00,0x00,0x00,0x01,0x00,0x00}; //删除指定的模版
unsigned char FP_LoadChar[9]={0x01,0x00,0x06,0x07,0x01,0x00,0x00,0x00,0x19};//读取指定ID指纹
校检码计算
FP_Save_Finger[5] = Uc_H;//指纹ID高位
FP_Save_Finger[6] = Uc_L;//指纹ID低位
for(i=0;i<7;i++) //计算校验和
temp = temp + FP_Save_Finger[i];
FP_Save_Finger[7]=(temp & 0x00FF00) >> 8; //存放校验数据
FP_Save_Finger[8]= temp & 0x0000FF;
指纹ID 十进制转十六进制
Uc_H_L[0] = ix>>8;//十进制转为十六进制
Uc_H_L[1] = ix&0xff;//十进制转为十六进制
需要的拿去吧!