下载安装
ohpm install @hxsmart/imatesdk
使用方法
引入插件
import { BluetoothThread, BluetoothTool, BleDevice } from '@hxsmart/imatesdk';
打开设备
BluetoothThread.openDevice(mac)
关闭设备
BluetoothThread.closeDevice()
设备连接状态
BluetoothThread.connectingTest()
设备版本号
BluetoothThread.deviceVersion()
设备序列号
BluetoothThread.deviceSerialNumber()
电池电量
BluetoothThread.batteryLevel()
buzzer
BluetoothThread.buzzer()
取消
BluetoothThread.cancel()
工作状态
BluetoothThread.workingStatus()
下载公钥
BluetoothThread.pinPadDownloadPK(2, 1,'623C9BCDECED2949F3C5ADD8C13DD60F7B9AF159F038CE48609099F979B771D210E853B8281F55464C19F50D05432997A467DC51514CC88AE61B045F48590FF7')
下载主密钥
BluetoothThread.pinPadDownloadMK(2, 1, "AEC76C40EFA18D05F33741A1E9EA146C", "9F1F7BFF6F5511384D9430531E538FD3")
下载工作密钥
BluetoothThread.pinPadDownloadWK(2, 1, 1, "9F1F7BFF6F5511384D9430531E538FD3","9F1F7BFF6F5511384D9430531E538FD3")
判断密钥存在
BluetoothThread.pinPadGetKey()
读取明文密码
BluetoothThread.pinPadInputPlainPin()
读取密文密码
BluetoothThread.pinPadInputPinblock(2, 1, 1, "1234567890123", 6, 6)
取消密码录入
BluetoothThread.pinPadCancel()
获取序列号
BluetoothThread.pinPadGetSN()
等卡
BluetoothThread.waitEvent(0xff, 10)
等待刷卡
BluetoothThread.swipeCard()
复位卡片
BluetoothThread.icResetCard(0, 10)
APDU
BluetoothThread.icApdu(0, "0084000004")
设置卡槽
BluetoothThread.pbocIcCardReaderType(0)
读取卡信息
BluetoothThread.pbocReadInfo()
IC卡交易明细
BluetoothThread.pbocReadLog()
读取ARQC
BluetoothThread.pbocGenARQC()
校验ARQC
BluetoothThread.withTxData("72199F180400000001861004DA9F790A000000001009C5B69D1B00")
启动签名
BluetoothThread.getSignature()
获取身份证信息
BluetoothThread.idReadMessage(10)
采集指纹
BluetoothThread.fingerprintFeature(9600, 4, 3)
取消采集指纹
BluetoothThread.fingerprintCancel()