public class RFIDWithISO15693
extends java.lang.Object
注意:
Attention:
1、使用前请确认您的机器已安装此模块。
1. Make sure this module is installed before using your device.
2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件
2. Put libDeviceAPI.so file in directory \libs\armeabi\ then module can be used normally.
3、在操作设备前需要调用 init()
打开设备,使用完后调用 free()
关闭设备
3. Call init()
to switch on device before using device, call free()
to switch off the device after using.
Modifier and Type | Class and Description |
---|---|
static class |
RFIDWithISO15693.TagType
标签类型
Tag type |
Modifier and Type | Method and Description |
---|---|
boolean |
free()
释放rfid模块
Release RFID module |
char[] |
genericFunction_ex(char command,
char IcMfg,
char[] databuf,
int datalen) |
char[] |
genericFunction(char command,
char[] databuf,
char datalen) |
static RFIDWithISO15693 |
getInstance()
获取ISO15693协议操作实例
Acquire ISO15693 protocol operation Instance |
java.lang.String |
getVersion()
获取rfid 版本信息
Acquire RFID version infor |
boolean |
init()
初始化rfid模块
initialize RFID module |
boolean |
init(boolean isRfOff) |
ISO15693Entity |
inventory()
读卡
read card |
boolean |
isPowerOn()
判断设备是否上电
Judge the device is powered on or not. |
boolean |
lockAFI()
锁定AFI
lock AFI |
boolean |
lockDSFID()
锁定DSFID
lock DSFID |
ISO15693Entity |
read(int block)
读取块数据
read block data |
ISO15693Entity |
read(int startBlock,
int Blocklen)
读取块数据
block data |
boolean |
rfidUpgrade(int packageCount,
int index,
int currSize,
byte[] data)
固件升级
firmware upgrade |
boolean |
write(int startBlock,
int Blocklen,
java.lang.String hexData)
写卡
card writing |
boolean |
write(int block,
java.lang.String hexData)
写卡
card writing |
boolean |
writeAFI(int iAFI)
写入AFI
Write AFi |
boolean |
writeDSFID(int iDSFID)
写入DSFID
Write DSFID |
public static RFIDWithISO15693 getInstance() throws ConfigurationException
ConfigurationException
- 配置错误异常public ISO15693Entity inventory()
public ISO15693Entity read(int block) throws RFIDReadFailureException
block
- 块区RFIDReadFailureException
- 读卡失败异常public ISO15693Entity read(int startBlock, int Blocklen) throws RFIDReadFailureException
block
- 块区RFIDReadFailureException
- 读卡失败异常public boolean write(int block, java.lang.String hexData) throws RFIDNotFoundException
block
- 块区hexData
- 十六进制数据RFIDNotFoundException
- 寻卡失败异常public boolean write(int startBlock, int Blocklen, java.lang.String hexData) throws RFIDNotFoundException
block
- 块区hexData
- 十六进制数据RFIDNotFoundException
- 寻卡失败异常public boolean writeAFI(int iAFI) throws RFIDNotFoundException
iAFI
- AFI值RFIDNotFoundException
- 寻卡失败异常public boolean lockAFI() throws RFIDNotFoundException
RFIDNotFoundException
public boolean writeDSFID(int iDSFID) throws RFIDNotFoundException
iDSFID
- DSFID值RFIDNotFoundException
- 寻卡失败异常public boolean lockDSFID() throws RFIDNotFoundException
RFIDNotFoundException
- 寻卡失败异常public char[] genericFunction(char command, char[] databuf, char datalen)
command
- 命令databuf
- 数据datalen
- 数据长度public char[] genericFunction_ex(char command, char IcMfg, char[] databuf, int datalen)
command
- 命令IcMfg
- 厂商信息databuf
- 数据datalen
- 数据长度public boolean init()
public boolean init(boolean isRfOff)
public boolean free()
public java.lang.String getVersion()
public boolean rfidUpgrade(int packageCount, int index, int currSize, byte[] data)
packageCount
- 包的数量index
- 当前为第几个包currSize
- 当前包大小data
- 包数据public boolean isPowerOn()