|
沙发

楼主 |
发表于 2019-5-30 20:16:19
|
只看该作者
访问USB身份证模块
本帖最后由 ancientcc 于 2019-5-30 20:18 编辑
1、mHIDDev.GetSamStaus();
{0, 3, 17, -1, -19}
2、ret = mHIDDev.GetSamId(samIDInfo);
{0, 3, 18, -1, -18}
3、ret = mHIDDev.Authenticate();
- public int Authenticate() {
- byte[] inn = new byte[4];
- byte[] sn = new byte[8];
- return this.findIDCard(inn) < 0?-1:(this.selectIDCard(sn) < 0?-2:0);
- }
复制代码 ret >=0 时表示找到卡
4、ReadBaseFPMsg
- sIDInfo = mHIDDev.new SecondIDInfo();
- byte[] fingerPrint = new byte[1024];
- ret = mHIDDev.ReadBaseFPMsg(sIDInfo, fingerPrint);
复制代码 读取身份证数据。在selectIDCard和ReadBaseFPMsg之间挪开身份证时,ReadBaseFPMsg就可能返回失败。得到的sIDInfo保存着读到的身份证
5、峰鸣。有些身份证模块自带
ret = mHIDDev.BeepLed(true, true, 500);
|
|