UHF RFID Reader User manual-Python
UHF RFID Reader User manual-Python
manual-Python
V0.0.3
1. Introduction ........................................................................................................................... 5
3. Connection Description...................................................................................................... 8
7. Description ........................................................................................................................... 43
8. Appendix I ............................................................................................................................ 46
1. Introduction
1.1. Overview
For user better secondary developing, we provided function library for Python developer,
All contents in this document, including but not limited to text, photo are all properties of GEE
NFC LIMITED. Please do not add, delete, revise and use it in commercial if without consent of us.
if epcInfo.result == 0:
print(epcInfo.epc)
print("LogBaseEpcOver")
if __name__ == '__main__':
client = GClient()
if client.openSerial(("COM7", 115200)): # Do not reconnect, could close to release the resource, then
client.callEpcInfo = receivedEpc
client.callEpcOver = uploadEpcOver
msg = MsgBaseInventoryEpc(EnumG.AntennaNo_1.value,
EnumG.InventoryMode_Inventory.value)
if client.sendSynMsg(msg) == 0:
print(msg.rtMsg)
if client.sendSynMsg(stop) == 0:
print(stop.rtMsg)
3. Connection Description
Class GClient
Function openSerial(readName: (), kwargs) --> bool
Class GClient
Function openSerial485(readName: (), **kwargs) --> bool
Class GClient
Function openTcp(readName: (), **kwargs) --> bool
Class GServer
Function openServer(port: int)
Class GClient
Function openUsbHid(param: bytes) --> bool
Function client.close()
Disconnect connection and release the resources ( for invalid linked objects, need call this function to
Description
release resources)
4. Events Description
Class GClient
client.callEpcInfo = receiveEpc
Example Pass
Description 6C tag reports events actively: Tag info will be reported to upper server via this
event when antenna is in reading status. For details see Example code in SDK.
Class LogBaseEpcInfo
AntId:Antenna No.
Rssi:Signal strength
Class GClient
client.callEpcOver = receiveEpcOver
being synchronized
Class GClient
client.call6bInfo = receive6b
pass
Example
6B tag reports events actively; Tag info will be reported to upper server via this
Description
event when antenna is in reading status. For details see Example code in SDK.
Class LogBase6bInfo
AntId:Antenna No.
Rssi:Signal strength
Class GClient
client.call6bOver = receive6bOver
synchronized
4.5. GB Tag Reports Events
Class GClient
client.callGbInfo = receiveGbInfo
Example pass
Description GB tag reports events actively. When reader is in reading status, tag data will be
reported to upper server via this event. For details check” Quick start”
Report object
Class LogBaseGbInfo
AntId:Antenna No.
Rssi:Signal strength
Attribute
Result:Tag reading result, 0 read successfully, otherwise failed
Class GClient
client.callGbOver = receiveGbOver
synchronized
Class GClient
client.callGpiStart = gpiStart
Example pass
Description When GPI trigger activated, reader will reports an event to upper server actively
Report Object
Class LogAppGpiStart
gpiPortLevel:GPI port voltage level, 0 means low level, 1 means high level
Attribute
systemTime: system real time
Class GClient
client.callGpiOver = gpiOver
Example pass
Description When trigger stopped, reader will report a message actively to upper server,
Report object
Class LogAppGpiOver
Attribute gpiPortLevel:GPI port Voltage level, 0 means low level, 1 means high level
Class GClient
client.callTcpDisconnect = tcpDisconnect
pass
Description:
After event reported, it required the upper server ( the caller) release
Description connected object, otherwise the event will be repeatedly reported until
Class GServer
g_server.callGClientConnected = clientConnected
pass
TCP is under monitoring, if remote reader actively connected into upper server,
Report object
Class GClient
Class GClient
Sample code 1
stop = MsgBaseStop()
print(stop.rtMsg)
Sample code 2
msg = MsgBaseSetPower(**dicPower)
if client.sendSynMsg(msg) == 0:
print(msg.rtMsg)
6. Message Description
Class MsgAppReset
Attribute N/A
Set reader COM port parameters. After set, it will be stored into reader even
Description
powered off
6.1.3. Set GPO State parameter
Class MsgAppSetGpo(**kwargs)
…….
Set Reader GPO parameters. After set, it will be stored into reader even powered
Description
off
Class MsgAppGetGpiState
triggerStart: Trigger start(0 trigger closed,1 Low level trigger,2 High Level
trigger,3 Rising edge trigger,4 Falling edge trigger,5 Random edge trigger)
triggerOver: trigger stop(0 no stop,1 Low level trigger,2 High Level trigger,
Attribute 3 Rising edge trigger,4 Falling edge trigger,5 Random edge trigger)
“overDelayTime”)
Set reader GPI trigger parameter. After set, it will be stored into reader even
Description
powered off
6.1.6. Get Software Baseband Version
Class MsgAppGetBaseVersion
Class MsgBaseGetCapabilities
AntennaCount:Antennas quantity
0, GB 920~925MHz
1, GB 840~845MHz
2, GB 840~845MHz 和 920~925MHz
Attribute
3, FCC,902~928MHz
4,ETSI,866~868MHz
ProtocolArray:supported protocols
0, ISO18000-6C/EPC C1G2
1, ISO18000-6B
2, GB/T 29768-2013
3, GJB 7383.1-2011
Description N/A
6.1.8. Get Reader Info
Class MsgAppGetReaderInfo
powerOnTime:Power on time
Description N/A
Class MsgAppSetBeep
Description N/A
6.2. RFID Configuration and Operation
Class MsgBaseStop
Attribute N/A
Stop all RFID operations of reader and make the reader into idle status
Description Note: when reader is in reading, all configuration messages can not be sent
Set reader antenna power, once set, it will be stored into reader even powered
Description
off
msg = MsgBaseSetPower(**dicPower)
Example
if client.sendSynMsg(msg) == 0:
print(msg.rtMsg)
6.2.3. Set and Get Reader Frequency Range
Attribute freqRangeIndex: Frequency range index, for detail, please check Appendix I
Set reader working frequency range, once set, it will be stored into reader even
Description
powered off
Set base band parameter of reader, once set, it will be stored into reader even
Description
powered off
6.2.5. Set and Get GB Baseband Parameter
speed_tc: 0,Tc=6.25us;1,Tc=12.5us
4,K=2/5;5,K=6/7;6,K=12/11;7,K=2;8~15,Reserve
value 3
Set GB standard base band parameter of reader, once set, it will be stored into
Description
reader even powered off
6.2.6. Set and Get Tag Uploading Log
Attribute 10ms)。
Set Reader upload parameters, once set, it will be saved into reader even
Description
powered off
6.2.7. Read EPC Tag
Class MsgBaseInventoryEpc
read tags for one time on each enabled antennas then stop reading and into
Set inventory parameter and start reading, user shall first get tag’s EPC
Description
before operate the data of a tag.
6.2.8. Write EPC Tag
Class MsgBaseWriteEpc
BwriteData:Data to be written
ISO18000-6C protocol regulate that read write min data length is 1 word
(16 bit)
EPC bank is composed by CRC-16( the 0th word) + PC(the 1st word) +
EPC:
Description
CRC16: the 0th word, not writable.
PC:the 1st word,first 5 bit means EPC word lenth,calculated by the method
4, CRC error
10,Tag missed
Class MsgBaseLockEpc
3,TID;4,user)
permanently lock)
Class MsgBaseDestoryEpc
Kill a tag, after killed, the tag will be permanently disabled. It is a command for
Description
single operation.
6.2.11. Read 6B tag
Class MsgBaseInventory6b
tags for one time on each enabled antennas then stop reading and into idle
details)
Class MsgBaseWrite6b
BwriteData:Data to be written
Class MsgBaseLock6b
Class MsgBaseLock6bGet
Class MsgBaseInventoryGb
tags for one time on each enabled antennas then stop reading and into idle
details)
Set tag reading parameters and start reading operation , any data to be
Description
operated shall firstly read Tag’s EPC.
6.2.16. Write GB Tag
Class MsgBaseWriteGb
BwriteData:Data to be written
Class MsgBaseLockGb
secure area ,
Description)
Class MsgBaseDestoryGb
Kill a tag, after killed; the tag will be permanently disabled. It is a command for
Description
single operation.
7. Description
Class ParamEpcFilter
Class ParamEpcReadTid
exceed the length defined in byte 1;1,read TID according to the length defined
Attribute
in byte 1 )
Class ParamEpcReadUserdata
Class Param6bReadUserdata
Class ParamGbReadUserdata
Index Description
0 GB 920~925MHz
1 GB 840~845MHz
3 FCC,902~928MHz
4 ETSI,866~868MHz