<device code="RFID" type="rfid" port="COM3,115200" anti="" reader="01" /> 

<device code="RFID" type="rfid" port="COM3,115200" anti="00" reader="01"  pass=''  part="epc" size="12"  encode="ASCII" />

目前支持CN90系列 CNIST

port端口和波特率  逗号分隔的端口和波特率 "COM6,115200"

anti 天线列表 "000102" 16进制文本,解析为数组每个byte表示一个天线,没有为空

reader 读写器的编号读写器的编号 "01"    16进制文本

pass :十六进制 4byte密码 ,不指定为 00000000

{  String  command;  String  params; //命令参数  String  part;  }

PART 得到取值00,01,02,03,含义如下 00:RESERVED, 01:EPC, 02:TID, 03:USER   若未指定,默认为 EPC 即 01;

  • READ("READ") 读标签

参数:{"command":"READ","part":null}

{"command":"READ","part":"01"} 读取EPC

{"command":"READ","part":"02"} 读取id

{"command":"READ","part":"03"} 读取用户数据

返回值: 读取的数据内容十六进制字符串

{

    "result""ok",

    "message"null,

    "returnvalue""[\"32 30 30 33 30 34 2D 30 30 33 00 00\"]"

}

  • READBATCH("READBATCH"),//启动批量盘存,获得EPC,期间可以获得盘存标签数量,通过GET停止盘存获得已经盘存的数量

参数:{"command":"READBATCH"}

返回值:盘点标签的数量

  • GET("GET"),// 获得已经读取的标签内容

参数:{"command":"GET"}

返回值:返回READBATCH已经获得标签的缓存,并清除缓存。 

{

    "result""ok",

    "message"null,

    "returnvalue""[\"32 30 30 33 30 34 2D 30 30 32 00 00\",\"32 30 30 33 30 34 2D 30 30 33 00 00\",\"32 30 30 33 30 34 2D 30 30 31 00 00\"]"

}

  • READREALTIME("READREALTIME"),// 实时盘存,返回所有的标签。

参数:{command:'READREALTIME'}

返回值:标签列表 

{

    "result""ok",

    "message"null,

    "returnvalue""[\"32 30 30 33 30 34 2D 30 30 32 00 00\",\"32 30 30 33 30 34 2D 30 30 33 00 00\",\"32 30 30 33 30 34 2D 30 30 31 00 00\"]"

}

  • WRITE("WRITE"),//写标签 提供参数为 EPC 标签id part 区域 value 内容

参数:{"command":"WRITE","params":"{\"code\":\"3230303330342D3030310000\",\"value\":\"3230303330342D3030341100\"}","part":"03"}

{"command":"WRITE","params":"{\"code\":\"3230303330342D3030320000\",\"value\":\"3230303330342D3030340000\"}","part":"01","lock":true} 修改epc 同时永久锁定(这里 只有EPC能够永久锁定)。 

返回值:

{

    "result""ok",

    "message"null,

    "returnvalue""[\"32 30 30 33 30 34 2D 30 30 31 00 00\"]"

}

  • CLEAR("CLEAR"),// 停止盘存,清除缓存

参数:{"command":"CLEAR"}

返回值:

{

    "result""ok",

    "message"null,

    "returnvalue"""

}

  • CLOSE("CLOSE")   // 关闭设备连接

参数:{"command":"CLOSE"}

返回值:void

{

    "result""ok",

    "message"null,

    "returnvalue"""

}

  • RESET("RESET")  重启设备,(断开连接,重新连接)

参数:{"command":"RESET"}

返回值:void

{

    "result""ok",

    "message"null,

    "returnvalue"""

}

  • LOCK   锁定标签

参数 {"command":"LOCK","params":"{\"code\":\"3230303330342D3030310000\",\"value\":\"0101\"}","part":"00"}

params:{code:epc,value:[memobank,locktype]}

value 十六进制 2bytes 

锁定的存储:btMemBank -  Tag memory bank(0x01:User Memory, 0x02:TID Memory, 0x03:EPC Memory, 0x04:Access Password, 0x05:Kill Password)

锁定的类型:btLockType - Lock operation type(0x00:Open, 0x01:Lock, 0x02:Permanent open, 0x03:Permanent lock)

0101锁定UserMemory,Lock 临时锁定

返回值:

{

    "result""ok",

    "message"null,

    "returnvalue""[\"32 30 30 33 30 34 2D 30 30 31 00 00\"]"

}


关于标签锁定状态可分为四种,分两种情况分别进行说明:

1、如果没有修改访问密码,为默认的00000000情况:

未锁定:  使用密码00000000可读、可写;

暂时锁定:使用密码00000000可读、可写;

永久锁定:使用密码00000000可读,不可写;

解锁定:将暂时锁定的区域解锁,变成未锁定状态;永久锁定的区域无法被解锁。

2、如果修改了访问密码,不为默认的00000000情况,假设修改为000000FF:

未锁定:使用密码00000000或者000000FF可读、可写;

暂时锁定:RESERVER区暂时锁定后,使用密码000000FF可读、可写;其他区域(TID除外);

暂时锁定后,使用密码00000000或000000FF可读,使用密码000000FF可写;其他区域(TID除外)

永久锁定后使用密码00000000或000000FF不可读,不可写;

解锁定:将暂时锁定的区域解锁,变成未锁定状态;永久锁定的区域无法被解锁。

注意:如要进行密码区之外的区域的锁定操作,需要先锁定两个密码区,才能锁定其他区域。






  • KILL 销毁标签

参数 {"command":"KILL","params":"E2801160600002105E524D1F"}

返回值:

{

    "result""ok",

    "message"null,

    "returnvalue""[\"E2801160600002105E524D1F\"]"

}

Created with the Personal Edition of HelpNDoc: Free PDF documentation generator