1.调用流程
2.命令格式
-----------------关闭天线---------------------
发送02 00 00 04 05 00 09 03
返回02 00 00 03 05 00 08 03
----------------设置模块工作方式---------------------- 发送02 00 00 04 3A 41 7F 03
返回02 00 00 03 3A 00 3D 03
-----------------开启天线---------------------
发送02 00 00 04 05 01 0A 03
返回02 00 00 03 05 00 08 03
----------------CPU卡复位----------------------
发送02 00 00 04 53 52 A9 03
返回02 00 00 17 53 00 7C 12 0E 63 10 78 80 90 02 20 90 00 00 00 00 00 7C 12 0E 63B2 03
------------------选择目录,蓝色标识位置为90 00 则命令执行成功-------------------- 发送02 00 00 0A 54 00 A4 00 00 10 02 00 10 02 06 03 返回02 00 00 0F 54 00 6F 08 84 00 A5 04 9F 08 01 02 90 0041 03
-----------------获取随机数,标红的为返回的4字节随机数,蓝色标识位置为90 00 则命令执行成功---------------------
发送02 00 00 08 54 00 84 00 00 04 E4 03
返回02 00 00 09 54 00 86 67 DA E790 009B 03
----------------外部认证,认证方法见后,将加密结果替换红色部分发送给读卡器;蓝色标识位置为90 00 则命令执行成功----------------------
发送02 00 00 10 10 54 00 82 00 00 08 8B E7 87 44 E3 F5 A1 9B3F 03
返回02 00 00 05 54 00 90 00 E9 03
----------------选择文件,蓝色标识位置为90 00 则命令执行成功---------------------- 发送02 00 00 0A 54 00 A4 00 00 10 02 00 05 09 03
返回02 00 00 05 54 00 90 00E9 03
-----------------写入数据,写入了3个字符,0x31,0x32,0x33;蓝色标识位置为90 00 则命令执行成功---------------------
发送02 00 00 0D 54 00 D6 00 00 05 00 10 03 31 32 33 D5 03
返回02 00 00 05 54 00 90 00E9 03
-----------------选择文件,蓝色标识位置为90 00 则命令执行成功--------------------- 发送02 00 00 0A 54 00 A4 00 00 10 02 00 05 09 03
返回02 00 00 05 54 00 90 00E9 03
-----------------读取数据,红色为读取的数据,前两字节为有效数据长度;蓝色标
识位置为90 00 则命令执行成功---------------------
发送02 00 00 08 54 00 B0 00 00 2A 36 03
返回02 00 00 2F 54 00 0003 31 32 3366 73 64 66 64 73 66 73 66 7A 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 90 00 57 03
--------------------------------------
3.认证方法
加密算法:3DES
加密密钥(16字节):
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
加密数据:
0x00, 0x00, 0x00, 0x00, Rand[0], Rand[1], Rand[2], Rand[3]
加密结果:
8字节数据