下載安裝
ohpm install @hxsmart/imatesdk
使用方法
引入插件
import { BluetoothThread, BluetoothTool, BleDevice } from '@hxsmart/imatesdk';
打開設(shè)備
BluetoothThread.openDevice(mac)
關(guān)閉設(shè)備
BluetoothThread.closeDevice()
設(shè)備連接狀態(tài)
BluetoothThread.connectingTest()
設(shè)備版本號(hào)
BluetoothThread.deviceVersion()
設(shè)備序列號(hào)
BluetoothThread.deviceSerialNumber()
電池電量
BluetoothThread.batteryLevel()
buzzer
BluetoothThread.buzzer()
取消
BluetoothThread.cancel()
工作狀態(tài)
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()
獲取序列號(hào)
BluetoothThread.pinPadGetSN()
等卡
BluetoothThread.waitEvent(0xff, 10)
等待刷卡
BluetoothThread.swipeCard()
復(fù)位卡片
BluetoothThread.icResetCard(0, 10)
APDU
BluetoothThread.icApdu(0, "0084000004")
設(shè)置卡槽
BluetoothThread.pbocIcCardReaderType(0)
讀取卡信息
BluetoothThread.pbocReadInfo()
IC卡交易明細(xì)
BluetoothThread.pbocReadLog()
讀取ARQC
BluetoothThread.pbocGenARQC()
校驗(yàn)ARQC
BluetoothThread.withTxData("72199F180400000001861004DA9F790A000000001009C5B69D1B00")
啟動(dòng)簽名
BluetoothThread.getSignature()
獲取身份證信息
BluetoothThread.idReadMessage(10)
采集指紋
BluetoothThread.fingerprintFeature(9600, 4, 3)
取消采集指紋
BluetoothThread.fingerprintCancel()