0% found this document useful (0 votes)
13 views

RS804 Web API Programming Manual_V1_2_20220208 (1)

The RS804 Web API Programming Manual provides comprehensive guidance for developers to utilize RS804 web APIs for configuring devices and executing RFID operations. It includes details on basic authentication, system settings, reader and inventory management, tag operations, and firmware updates. The manual outlines the architecture, process flow, and specific commands available for various operations, ensuring effective communication with the RS804 device.

Uploaded by

Carlos Barrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

RS804 Web API Programming Manual_V1_2_20220208 (1)

The RS804 Web API Programming Manual provides comprehensive guidance for developers to utilize RS804 web APIs for configuring devices and executing RFID operations. It includes details on basic authentication, system settings, reader and inventory management, tag operations, and firmware updates. The manual outlines the architecture, process flow, and specific commands available for various operations, ensuring effective communication with the RS804 device.

Uploaded by

Carlos Barrera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

RS804 Web API

Programming Manual

Programming Manual
Version 1.2 (based on API V1.0.20)
Revision Pages Description By Date
Release (RS804_Web_API-
V1.0 Richard 2020/08/19
v1.0.20.DOCX)
V1.1 Revise API document Matisse 2021/06/04
Revise API document:
Add architecture, process
V1.2 Jimmy 2022/02/08
flow and RFID operation
commands
Table of Contents

Chapter 1 - Basic Authentication:................................................................................................................... 4


1.1. Architecture ...................................................................................................................................... 4
1.2. Process Flow..................................................................................................................................... 5
1.3. RFID Operation Commands .............................................................................................................. 7
Chapter 2 - System setting ............................................................................................................................. 8
Chapter 3 - Reader and inventory ................................................................................................................. 13
Chapter 4 - Tag operations ........................................................................................................................... 21
Chapter 5 – Profile ....................................................................................................................................... 26
Chapter 6 – Region ...................................................................................................................................... 27
Chapter 7 – Antenna .................................................................................................................................... 28
Chapter 8 - I/O ............................................................................................................................................. 30
Chapter 9 – Firmware .................................................................................................................................. 34
Chapter 10 - Events ..................................................................................................................................... 37
Chapter 1 - Introduction
This manual is intended for the development of application using RS804 web APIs. RS804 Web APIs
follow standard HTTPS and Web Socket Secure protocol. Developers could develop applications on
any platform with different development languages using Web APIs to communicate with RS804 to
configure the device and execute multiple RFID operations.

We will discuss these in more details in the upcoming chapters below.

1.1. Architecture
The figure below shows the basic architecture of using RS804 Web APIs. Application needs to set
up two connections to RS804:
 Command session: to send the command to RS804 and receive the response.
 URL: https://{RS804_IP_Address}:8443
 Protocol: HTTPS
 Port: 8443
 Authentication*: HTTP basic authentication (RFC 7617). Note that RS804 account is man-
aged at web management console https://{RS804_IP_Address}/
 Data session: to receive RFID data and all other events from RS804
 URL: wss://{RS804_IP_Address}:8443/socket
 Protocol: Web Socket Secure
 Port: 8443
1.2. Process Flow
We describe a typical flow of using a fixed RFID reader and corresponding commands of RS804.
1. Connect: Application can set up the Web Socket connection first to receive all events from the
device. A /getreaderinfo command could help to check if the connected device is the correct
one.
2. Configure: Once the device is connected, application can configure RS804, such as region, time,
NTP server, antenna, etc.
3. Start/Stop Inventory: Before performing RFID inventory, application needs to send
/setinventory first to configure the parameters of inventory. Once it is configured,
/startinventory will trigger the action. Similarly, /stopinventory command could stop the inven-
tory. If such inventory configuration is not required anymore, /deleteinventory could be trig-
gered. Note that if you want to perform inventory with the same configuration, you could skip
/deleteinventory and send /startinventory later without another /setinventory.
4. Tag Operations: Besides inventory, users can also perform tag operation to a specific tag. Tag
operation includes read, write, lock, and kill. All tag operations use the same command
/exectagoperation with different parameters.
5. Disconnect: close websocket to disconnect

We take RFID inventory as an example to describe the detailed flow. Application sends a
/setinvetory command to configure the RFID parameters for inventory. Once the inventory is set, a
/startinventory command could trigger RS804 to start inventory. All inventory data will be deliv-
ered by TagData Events through web socket as shown as the blue line in the figure below. When
users want to stop the inventory, application could send /stopinventory command to RS804. An-
other optional /deleteinventory command could be sent to RS804 to remove the inventory config-
uration on RS804. If inventory configuration is kept (without triggering /delete inventory com-
mand), application can send /startinventory directly without /setinventory again.
1.3. RFID Operation Commands
RS804 provides Web APIs to configure RS804 and run RFID operations. We list the summary
of all commands and corresponding sections to describe the details of the each command.
Operation Item Command Section
Get Device Web API version Getversion 2.15
Information Model Getmodelname 2.16
OS version Getlinuxversion 2.17
OS build getfwbuildnumber 2.18
Serial number Getserialnumber 2.19
Ethernet MAC Getethmac 2.20
Bootloader version getbootloaderversion 2.21
Get/Set Device Time zone name gettimezonename 2.1
configuration settimezonename 2.2
Time zone Gettimezone 2.3
Time zone DB gettimezonedatabase 2.4
UTC time getutctime 2.5
setutctime 2.6
Time Settime 2.7
NTP service getntpenabled 2.8
setntpenabled 2.9
NTP server getntpserver 2.10
setntpserver 2.11
Get/Set RFID Reader information getreaderinfo 3.1
Reader Reader Region list getregionlist 6.2
Reader Region Getregion 6.1
setregion 6.3
Reader profile getprofile 5.1
setprofile 5.2
Get Antenna Antenna status Antennaconnectionstatus 7.2
status AntennaConnectionStatusEvent 10.2
Inventory Start inventory Getinventory 3.2
Setinventory 3.3
Startinventory 3.4
TagData event 10.3
Stop inventory Stopinventory 3.5
Deleteinventory 3.6
Tag Operation Tag Operation Exectagoperation 4.7
TagData event 10.3
GPIO & LED GPI getgpistatus 8.1
Control GPO getgpostatus 8.2
setgpostatus 8.3
LED getledstatus 8.4
setledstatus 8.5
Firmware Firmware fwupdateftp 9.1
Update fwupdatefile 9.2
FW Update Event 9.4
Chapter 2 - System setting
2.1 Get Timezone Name:

URL: http://xxx.xxx.xxx.xxx:8443/api/gettimezonename

POST data: None.

Sample Zonename: Asia/Taipei

2.2 Set Timezone Name:

URL: http://xxx.xxx.xxx.xxx:8443/api/settimezonename

POST data:
{zonename:<zonename>}

Sample<zonename>: Asia/Taipei

2.3 Get Timezone:

URL: http://xxx.xxx.xxx.xxx:8443/api/gettimezone

POST data: None.

Sample timezone: CST-8

2.4 Get Timezone Database:

URL: http://xxx.xxx.xxx.xxx:8443/api/gettimezonedatabase

POST data: None.

Get all the supported timezone info (JSON object of zonename to timezone mapping)
{
'Africa/Abidjan': 'GMT0' ,
'Africa/Accra': 'GMT0' ,
'Africa/Addis Ababa': 'EAT-3' ,
'Africa/Algiers': 'CET-1' ,
'Africa/Asmara': 'EAT-3' ,
'Africa/Bamako': 'GMT0' ,
...
}
2.5 Get UTC Time:

URL: http://xxx.xxx.xxx.xxx:8443/api/getutctime

POST data: None.

Return UTC time in milliseconds since Epoch time.

2.6 Set UTC Time:

URL: http://xxx.xxx.xxx.xxx:8443/api/setutctime

POST data:
{utctime: <utctime>}

Set time to utctime (integer of epoch in milliseconds). The decimal part of a second
is ignored. Therefore utctime value as xxxxxxxxxxxxxxx is equivalent to
xxxxxxxxxxxx000.

Return UTC time in milliseconds since Epoch time after set.

2.7 Set Time:

URL: http://xxx.xxx.xxx.xxx:8443/api/settime

POST data:
{year: <year>, month:<month>, date:<date>, hour:<hour>, minute:<minute>,
second:<second>}

Set Time according to server timezone.

2.8 Get NTP Enabled

URL: http://xxx.xxx.xxx.xxx:8443/api/getntpenabled

POST data: None.

Return NTP enabled ‘1’ or disabled ‘0’


2.9 Set NTP Enabled

URL: http://xxx.xxx.xxx.xxx:8443/api/setntpenabled

POST data:
{enabled: <enabled>} 1 for enable and 0 for disable

2.10 Get NTP Server:

URL: http://xxx.xxx.xxx.xxx:8443/api/getntpserver

POST data: None.

Get a list of ntp servers, separated by space ‘ ‘, up to 4.

2.11 Set NTP Server:

URL: http://xxx.xxx.xxx.xxx:8443/api/setntpserver

POST data:
{server: <server>}

Server is a string of servers separated by space ‘ ‘, up to 4

2.12 Get LLRP Server version:

URL: http://xxx.xxx.xxx.xxx:8443/api/getllrpserverversion
POST data: None.

2.13 Quit LLRP Server:

URL: http://xxx.xxx.xxx.xxx:8443/api/quitllrpserver
POST data: None.

Remark:
Ask LLRP server to quit by itself. System script will restart LLRP server. This
allows user to solve certain reader API errors that have to solve by reload the reader
API. Web API will reconnect to LLRP server when the server is restarted and ready.
2.14 Get Log File:

URL: http://xxx.xxx.xxx.xxx:8443/api/getlogfile

POST data: None.

2.15 Get Version:

URL: http://xxx.xxx.xxx.xxx:8443/api/getversion

POST data: None.

2.16 Get Model Name:

URL: http://xxx.xxx.xxx.xxx:8443/api/getmodelname

POST data: None.

2.17 Get Linux Version:

URL: http://xxx.xxx.xxx.xxx:8443/api/getlinuxversion

POST data: None.

2.18 Get FW Build Version:

URL: http://xxx.xxx.xxx.xxx:8443/api/getfwbuildnumber

POST data: None.

2.19 Get Serial Number:

URL: http://xxx.xxx.xxx.xxx:8443/api/getserialnumber

POST data: None.


2.20 Get Ethernet Mac Address:

URL: http://xxx.xxx.xxx.xxx:8443/api/getethmac

POST data: None.

2.21 Get Bootloader Version:

URL: http://xxx.xxx.xxx.xxx:8443/api/getbootloaderversion

POST data: None.


Chapter 3 - Reader and inventory
3.1 Get Reader Info:

URL: http://xxx.xxx.xxx.xxx:8443/api/getreaderinfo

POST data: None.

Sample return JSON:


{
"totalAntennas":4,
"totalGPIs":4,
"totalGPOs":4,
“inventorySpeed”: 0,
“readerTemperature”: 39,
"antennaPowersLevel":
[1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000,2100,2200,2300,2400
,2500,2600,2700,2800,2900,3000],
"frequencies": [916800,918000,919200,920400,920600,920800],
"allProfiles": [0,1,2,3,4],
"gpiStatus": [
{"port": 1,"status": 0},
{"port": 2,"status": 0},
{"port": 3,"status": 0},
{"port": 4,"status": 0}
],
"gpoStatus": [
{"port": 1,"status": false},
{"port": 2,"status": false},
{"port": 3,"status": false},
{"port": 4,"status": false}
],
"RESULT": "Success",
"DESC": null
}

Remarks:

<gpiStatus>: list of object {port: int, status: int}


<status>: Low = 0, High = 1, Unknown = 2.

<gpoStatus>: list of object {port: int, status: bool}


v1.0.8 adds <inventorySpeed> for number of tags read per second. This value may
change while inventory is running. If inventory is stopped, this will be the latest
recorded value.
v1.0.8 adds <readerTemperature> for the measured reader temperature in Celsius.
This actual value needs to be obtained while inventory is not running.

3.2 Get Inventory Definition

URL: http://xxx.xxx.xxx.xxx:8443/api/getinventory

POST data: None.

Sample return JSON:


{
"invtStartCriteria": {
"type": 1,
"offset_milsec": 0,
"period_milsec": 0,
"triggerGPI": null
},
"invtStopCriteria": {
"type": 0,
"duration_milsec": 0,
"triggerGPI": null
},
"antennaInvtSpecs": [
{
"ID": 1,
"antennas": [
1
],
"antennaConfigs": [
{
"antennaID": 1,
"setToUse": false,
"rfTransmitter": null,
"dtic": {
"dwellTime": 450,
"inventoryCycles": 0
},
"sequence": null,
"connectionStatus": null,
"C1G2InventoryCommand": {
"C1G2SingulationSpec": null
}
}
],
"antennaStopCriteria": {
"type": 0,
"duration_milsec": 0,
"triggerGPI": null,
"tagObservation": null
},
"tagRssiFilter_10ths": null,
"miscReqs": null
}
],
"reportSpec": {
"reportCriteriaType": 2,
"N": 1,
"reportSelector": {
"antennaID": true,
"antennaInvtSpecID": false,
"rssiRaw": true,
"timeFirstSeen": true,
"timeLastSeen": true,
"count": true,
"pc": true
}
},
"status": "Inactive",
"RESULT": "Success",
"DESC": null,
}

Sample C1G2InventoryCommand:

{
"C1G2SingulationSpec":{
"C1G2SingulationSessionAndAction":{
"sessionID":0,
"C1G2TagInventoryStateAwareSingulationAction":{
"I":0,
"S":0
}
},
"C1G2SingulationControl":{
"singulationAlgorithm":{
"algorithm":1
},
"singulationAlgorithmParameters":{
"algorithm":1,
"qValue":6,
"qMinValue":1,
"qMaxValue":15,
"retryCount":0,
"thresholdMultiplier":4,
"toggleTarget":true,
"repeatUntilNoTags":false
}
}
}
}

Remarks:

In v1.0.1 C1G2InventoryCommand is not implementation. Please do not set or set to


null.

C1G2 Inventory Command implemented in v1.0.4.

<invtStartCriteria>:
{type: int, offset_milsec: int, period_milsec: int, triggerGPI: object}

<type>: Null = 0, Immediate = 1, Periodic = 2, GPI = 3

<triggerGPI>: {port: int, evtGPI: bool, timeout_milsec: int}

<invtStopCriteria>:
{type: int, duration_milsec: int, triggerGPI: object}

<type>: Null = 0, Duration = 1, GPI_With_Timeout = 2

<triggerGPI>: {port: int, evtGPI: bool, timeout_milsec: int}

<antennaInvtSpecs>: list of object (Contains only 1 AI Spec)


{ID: int, antennas: [int], antennaConfigs: [object], antennaStopCriteria: object,
tagRssiFilter_10ths: object}

<ID>: 1

<antennas>: list of antenna id (int)

<antennaConfigs>: list of object for each of the antenna


{antennaID: int, antennaError: int, connected: bool, rfTransmitter: object, dtic:
object, sequence: object, C1G2InventoryCommand: object}
<rfTransmitter>: {channelIndex: int, transmitPowerIndex: int}
channelIndex index to the frequency table (start from 1), 0 means default.
transmitPowerIndex index to the power table (start from 1), 0 means all.

<dtic>: {dwellTime: int, inventoryCycles: int}

<sequence>: {sequence: int}

<C1G2InventoryCommand>: {C1G2SingulationSpec: object}

<C1G2SingulationSpec>: {C1G2SingulationSessionAndAction: object,


C1G2SingulationControl: object}

<C1G2SingulationSessionAndAction>: {sessionID: int,


C1G2TagInventoryStateAwareSingulationAction: object}

<sessionID>: InventorySession_S0 = 0, InventorySession_S1 = 1,


InventorySession_S2 = 2, InventorySession_S3 = 3

<C1G2TagInventoryStateAwareSingulationAction>: {I: int, S: int}


<I>: State_A = 0, State_B = 1
<S>: SL = 0, Not_SL = 1, SL_ALL = 2

<C1G2SingulationControl>: <singulationAlgorithm: object,


singulationAlgorithmParameters: object>

<singulationAlgorithm>: {algorithm: int}

<algorithm>: None = 0, Fixed_Q = 1, Dynamic_Q = 2

<singulationAlgorithmParameters >: {algorithm: int, qValue: int,


qMinValue: int, qMaxValue: int, retryCount: int, thresholdMultiplier: int, toggletarget:
bool,
repeatUntilNoTags: bool}

<algorithm>: None = 0, Fixed_Q = 1, Dynamic_Q = 2

<antennaStopCriteria>:
{type: int, duration_milsec: int, triggerGPI: object, tagObservation: object}

<type>: Null = 0, Duration = 1, GPI_With_Timeout = 2, Tag_Observation = 3,

<triggerGPI>: {port: int, evtGPI: bool, timeout_milsec: int}

<tabObservation>: {type: int, numTags: int, numAttempts: int, timeIdle_milsec: int,


timeout_milsec: int}
<type>:
Upon_Seeing_N_Tags_Or_Timeout = 0,
Upon_Seeing_No_More_New_Tags_For_Tms_Or_Timeout = 1,
N_Attempts_To_See_All_Tags_In_FOV_Or_Timeout = 2,
Upon_Seeing_N_Unique_Tags_Or_Timeout = 3,
Upon_Seeing_No_More_New_Unique_Tags_For_Tms_Or_Timeout = 4

<tagRssiFilter_10ths>: (v1.0.4.1 change to object below, v1.0.4 is int)


{from: int, to: int}
values: -999 to -1 (in 0.1 dbm), 0 means no limit.
abs(from) must < abs(to)

<reportSpec>:
{reportCriteriaType: int, N: int}

<reportCriteriaType>:
None = 0,
Upon_N_Tags_Or_End_Of_AISpec = 1,
Upon_N_Tags_Or_End_Of_ROSpec = 2,
Upon_N_Seconds_Or_End_Of_AISpec = 3,
Upon_N_Seconds_Or_End_Of_ROSpec = 4,
Upon_N_Milliseconds_Or_End_Of_AISpec = 5,
Upon_N_Milliseconds_Or_End_Of_ROSpec = 6

<status>: string. Report the inventory status

3.3 Set Inventory Definition:

URL: http://xxx.xxx.xxx.xxx:8443/api/setinventory

POST data:
data=<data: object> (<data> is JSON object)

Sample <data>:
{
"invtStartCriteria":{"type":1,"offset_milsec":0,"period_milsec":0,"triggerGPI":null},
"invtStopCriteria":{"type":0,"duration_milsec":0,"triggerGPI":null},
"antennaInvtSpecs":[
{
"ID":1,
"antennas":[1],
"antennaConfigs":[
{
"antennaID":1,

"rfTransmitter":null,
"dtic":{"dwellTime":450,"inventoryCycles":0},
"sequence":null,
"C1G2InventoryCommand":null
}
],
"antennaStopCriteria":{"type":0,"duration_milsec":0,"triggerGPI":null,"tagObservati
on":null},
"tagRssiFilter_10ths":{“from”: -1, “to”: -999}
}
],
"reportSpec":{"reportCriteriaType":2,"N":1, “reportSelector”: <reportSelector>},
}

Remarks:

Refer to return result in Get Inventory Definition.


In v1.0.1 C1G2InventoryCommand is not implementation. Please do not set or set to null.
C1G2InventoryCommand implemented in v1.0.4.

<reportSelector>: reportSelector: {antennaID: boolean, rssiRaw: boolean,


timeFirstSeen: boolean, timeLastSeen: boolean, count: boolean, pc: boolean }

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}

3.4 Start Inventory:

URL: http://xxx.xxx.xxx.xxx:8443/api/startinventory

POST data:
None.

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}

3.5 Stop Inventory:

URL: http://xxx.xxx.xxx.xxx:8443/api/stopinventory

POST data:
None.
Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}

3.6 Delete Inventory:

URL: http://xxx.xxx.xxx.xxx:8443/api/deleteinventory

POST data:
None.

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}
Chapter 4 - Tag operations
4.1. Get Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/gettagoperation

POST data:
{tagOpID:<tagOpID>}

<tagOpID>:tag Op ID of the tag Operation to get. 0 to get all tag operations.

Sample Return JSON:

{"tagOpID":0,"tagOps":[{"tagOpID":100,"tagOpStopCriteria":{"type":1,"cntOperation":1},
"targetTag":{"memoryBank":0,"pointer":0,"match":true,"tagPattern":[226,0,52,17,184,2,1
,23,24,48,0,14]},"tagOpsSpec":[{"ID":0,"op":"Read","memoryBank":1,"pointer":2,"count
er":6,"password":0,"writeAny":false,"data":null,"lockPayLoads":null}],"status":"Active"}],"
CLASS":"#TagOp","CMD":"Get","RESULT":"Success","DESC":null,"RID":15}

Remarks:

Not implemented in v1.0.1.


Implemented in v1.0.5.
<tagOps>: a list of tag operation returned.
<tagOpStopCriteria>: object {type: int, cntOperation: int}

<type>:
Null = 0,
Operation_Count = 1

<targetTag>: {memoryBank: int, pointer: int, match: bool, tagPattern: list}

<tagPattern>: list of bytes, which eqauls the EPC of target tag.


v1.0.6: Only full match EPC is supported. Please set memoryBank to 0, pointer
0, and match to true.

<tagOpsSpec>: list of {ID: int, op: string, memoryBank: int (MB), pointer: int, counter:
int, password: int, writeAny: bool, data: list of int, lockPayLoads: list}

ID: Uniquely defines a Tag Operation Spec. Cannot duplicate. Will be returned in Tag
Operation Result, to identify which operation spec gives the result.
op: One of “Read”, “Write”, “BlockWrite”, “BlockErase”, “Lock”, “Kill”
memoryBank: 0-Reserved, 1-EPC, 2-TID, 3-User
pointer: index to 16bit word in MemoryBank.
data: only for Write and BlockWrite operation. Format: 16 bit integer list: [int, int,
int, … ], each range from 0 to 65535

<lockPayLoads>: list of {privilege: int, dataField: int}

<privilege>:
Read_Write = 0,
Perma_Lock = 1,
Perma_Unlock = 2,
Unlock = 3,

<dataField>:
Kill_Password = 0,
Access_Password = 1,
EPC_Memory = 2,
TID_Memory = 3,
User_Memory = 4

<status>: string, whether the tag operation is active or inactive.

4.2. Set Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/settagoperation

POST data:
data=<tagOps: list of tag operations> (data is JSON object)

Remarks:
Not Implemented in v1.0.1
Implemented in v1.0.5
Refer to Get Tag Operation

Sample post data:


{"tagOps":[{"tagOpID":100,"tagOpStopCriteria":{"type":1,"cntOperation":1},"targetTag":{"
memoryBank":0,"pointer":0,"match":true,"tagPattern":[226,0,52,17,184,2,1,23,24,48,0,5
]},"tagOpsSpec":[{"specID":10000,"op":"Read","memoryBank":1,"pointer":2,"counter":6,
"password":0,"writeAny":false,"data":null,"lockPayLoads":null}]}]}

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}
4.3. Delete Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/deletetagoperation

POST data:
{tagOpID:<tagOpID>}

<tagOpID>: tag Op ID of the tag Operation to delete. 0 to delete all tag operations.

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}

4.4. Activate Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/activatetagoperation

POST data:
{tagOpID:<tagOpID>}

<tagOpID>: tag Op ID of the tag Operation to activate. Cannot be 0.

Remarks:
Tag Operations are inactive after set. Need to activate before use. Then tag op
results will be sent through Tag Data events during the next inventory. Tag
Operations will be automatically inactivated if the stop criteria is set to count
operations and the number of operations has been completed.

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}

4.5. Inactivate Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/inactivatetagoperation

POST data:
{tagOpID:<tagOpID>}

<tagOpID>: tag Op ID of the tag Operation to inactivate. Cannot be 0.

Return JSON:
{RESULT: <result:string>, DESC: <desc:string>}
4.6. Start Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/starttagoperation

POST data:
{
antennaInvtSpec:<antennaInvtSpec>,
retry: {retry: int, delay: int}
}

Remarks:
This is a special inventory command to start tag operation. This is to simplify
the procedures to start tag operation, which can also be started by issuing start
inventory command. This API should fail if there is already inventory running. If this API
returns Success, tag operation results will come in websocket events. Check events for
details of tag operation results. This special inventory will be automatically stopped and
deleted after it finishes.

<antennaInvtSpec>: please check the definition in set inventory command. Only the
first antenna config will be used to start tag opeartion.
If <antennaInvtSpec> is null, will use the first antenna config defined in the last
inventory. If inventory is never set, this API will fail if <antennaInvtSpec> is specified
as null.

<retry>: add parameter to retry in v1.0.14. retry(int) is the number of times to retry.
delay(int) is ms to delay between retries. This allows the tag operation to retry certain
times to increase the probability of success.

Note: tag opeartion can only use Fixed_Q as singulation algorithm.

4.7. Exec Tag Operation:

URL: http://xxx.xxx.xxx.xxx:8443/api/exectagoperation

POST data:
{
tagOps: <tagOps>
antennaInvtSpec:<antennaInvtSpec>
retry: {retry: int, delay: int}
}
Remarks:
Add in v1.0.14.
Usually tag operation needs 4 steps:
delete all tag operation, set tag operation, enable tag operation, start tag operation.
This API makes 1 step to do all. Refer to API settagoperation for definition of parameter
tagOps. Refer to API starttagoperation for parameter antennaInvtSpec and retry.
Chapter 5 – Profile
5.1. Get Profile:

URL: http://xxx.xxx.xxx.xxx:8443/api/getprofile

POST data:
None.

Sample Return JSON:


{"profile":1,"RESULT":"Success","DESC":null}

Remarks:
<profile>: int

5.2. Set Profile:

URL: http://xxx.xxx.xxx.xxx:8443/api/setprofile

POST data:
{profile:<profile>}

Return JSON:
{"RESULT":"Success","DESC":null}

Remarks:
<profile>: int
Chapter 6 – Region
6.1. Get RFID Region:

URL: http://xxx.xxx.xxx.xxx:8443/api/getregion

POST data:
None.

Sample Return JSON:


{"RFIDRegion":" JAPAN_CH6_LBT ", "RESULT":"Success", "DESC":null}

Remarks:
<RFIDRegion>: string

6.2. Get RFID Region List:

URL: http://xxx.xxx.xxx.xxx:8443/api/getregionlist

POST data:
None.

Returns the supported regions in JSON:


{“RESULT”: "Success", “VALUES”: ["CHINA", "EUROPE",
"JAPAN_CH4_MS", "JAPAN_CH4_LBT", "JAPAN_CH6_LBT", "TAIWAN", "USA"]}

Remarks:
Available since v1.0.8.

6.3. Set RFID Region:

URL: http://xxx.xxx.xxx.xxx:8443/api/setregion

POST data:
{RFIDRegion:<RFIDRegion>}

Return JSON:
{"RESULT":"Success","DESC":null}

Remarks:
<RFIDRegion>: string
Available values: “CHINA”, “EUROPE”,
“JAPAN_CH4_MS”, “JAPAN_CH4_LBT”, “JAPAN_CH6_LBT”, “TAIWAN”, “USA”
Due to hardware differences, Hardware for CHINA, TAIWAN, USA can switch region to
each other. Different regions for JAPAN can switch region to each other. Other
switches are not allowed and will cause API to return failure.

After change region, need getreaderinfo again to refresh frequency changes. This API
is recommended to do be done once at initialization time only.

API available since v1.0.8

Chapter 7 – Antenna
7.1. Get Antenna Config:
Returns the runtime Antenna Config info.
Remark: This API returns runtime info, getinventory returns inventory definition.
Although these 2 are similar, getinventory does NOT return runtime antenna
‘connected’ info.

URL: http://xxx.xxx.xxx.xxx:8443/api/getantennaconfig

POST data:
None

antennaID:
0 = All antennas,
1~n = One antenna ID

Sample Return JSON:


{
"antennaID": 0,
"antennaConfigs": [
{
"antennaID":1,
"setToUse": true,
"rfTransmitter": {"channelIndex": 0,"transmitPowerIndex": 18},
"dtic": {"dwellTime": 450,"inventoryCycles": 0},
"sequence": null,
"connectionStatus": {"antennaID": 1,regB00": 290,"regB04": 139,"connected":
true},
"C1G2InventoryCommand": {"C1G2SingulationSpec": null}
},
{
"antennaID": 2,
"setToUse": false,
"rfTransmitter": {"channelIndex": 0,"transmitPowerIndex": 18},
"dtic": {"dwellTime": 400,"inventoryCycles": 0},
"sequence": null,
"connectionStatus": {"antennaID": 2,"regB00": 290,"regB04": 295,"connected":
false},
"C1G2InventoryCommand": {"C1G2SingulationSpec": null}
},
{
"antennaID": 3,
"setToUse": false,
"rfTransmitter": {"channelIndex": 0,"transmitPowerIndex": 18},
"dtic": {"dwellTime": 400,"inventoryCycles": 0},
"sequence": null,
"connectionStatus": {"antennaID": 3,"regB00": 290,"regB04": 302,"connected":
false},
"C1G2InventoryCommand": {"C1G2SingulationSpec": null}
},
{
"antennaID": 4,
"setToUse": false,
"rfTransmitter": {"channelIndex": 0,"transmitPowerIndex": 18},
"dtic": {"dwellTime": 400,"inventoryCycles": 0},
"sequence": null,
"connectionStatus": {"antennaID": 4,"regB00": 286,"regB04": 290,"connected":
false},
"C1G2InventoryCommand": {"C1G2SingulationSpec": null}
}
],
"RESULT": "Success",
"DESC": null
}

Remarks:

<antennaConfigs>: list of object,


Refer to <antennaInvtSpecs.antennaConfigs> in Get Inventory Definition.
When the input antennaID = 0, antennaConfigs contains n items, one for each
antenna, otherwise antennaConfigs contains 1 items for the specified anntennaID.

V1.0.8: renamed <connected> to <setToUse>. This information reflects the antennas


set to use in inventory definition.
V1.0.8 added <connectionStatus>. ConnectionStatus is updated after the
result(websocket event) is received after issuing command antennaconnectionstatus.
Sample <connectionStatus> as:
[
{"antennaID":1,"regB00":270,"regB04":77,"connected":True},
{"antennaID":2,"regB00":270,"regB04":-4,"connected":True},
{"antennaID":3,"regB00":270,"regB04":265,"connected":False},
{"antennaID":4,"regB00":270,"regB04":264,"connected":False}
]
7.2. Obtain Antenna Connection Status Spec

URL: http://xxx.xxx.xxx.xxx:8443/api/antennaconnectionstatus

POST data:
{dtic:<dtic>}

Remarks:
This is a special inventory command in order to obtain antenna connection status
spec. It fails when there is currently an inventory running. After issuing this command,
and the command returns “Success”, results will come in asynchronous manner.
Results of antenna connection status will come as web socket events
(CLASS=”#AntennaConnectionStatusEvent”). Check the details in web socket
events. The special inventory will be automatically stopped and deleted after result is
obtained.

Dtic is defined the same as dtic defined in inventory settings, like the following:
"dtic":{"dwellTime":450,"inventoryCycles":0}

API available since v1.0.8.


Dtic parameter added since v1.0.10

Chapter 8 - I/O
8.1. Get GPI Status:

URL: http://xxx.xxx.xxx.xxx:8443/api/getgpistatus

POST data:
None.

Sample Return JSON:


{
"gpiStatus": [
{"port": 1,"status": 0},
{"port": 2,"status": 0},
{"port": 3,"status": 0},
{"port": 4,"status": 0}
],
"RESULT": "Success",
"DESC": null
}
Remarks:
Refer to Get Reader Info for GPI status definitions.

8.2. Get GPO Status:

URL: http://xxx.xxx.xxx.xxx:8443/api/getgpostatus

POST data:
None.

Sample Return JSON:


{
"gpoStatus": [
{"port": 1,"status": false},
{"port": 2,"status": false},
{"port": 3,"status": false},
{"port": 4,"status": false}
],
"RESULT": "Success",
"DESC": null
}
8.3. Set GPO Status:

URL: http://xxx.xxx.xxx.xxx:8443/api/setgpostatus

POST data:
{gpoStatus:<gpoStatus: list>} (gpoStatus is JSON list)

Sample <gpoStatus>:
[
{"port":1,"status": false},
{"port":2,"status": false},
{"port":3,"status": false},
{"port":4,"status": false},
]

Return JSON:
{"RESULT":"Success","DESC":null}

8.4. Get LED Status:

URL: http://xxx.xxx.xxx.xxx:8443/api/getledstatus

POST data:
{ledStatus:<ledStatus: list>} (ledStatus is JSON list)

Sample <ledStatus>:
[
{"led":"LED_USER_GREEN"},
{"led":"LED_USER_RED"},
]

Return JSON:
{"RESULT":"Success","ledStatus":[
{"led":"LED_USER_GREEN","status":false},
{"led":"LED_USER_RED","status":false},
]}
Remarks:
Available since v1.0.8
v1.0.19: remove LED_STATUS_GREEN and LED_STATUS_RED from user
access.
8.5. Set LED Status:

URL: http://xxx.xxx.xxx.xxx:8443/api/setledstatus

POST data:
{ledStatus:<ledStatus: list>} (ledStatus is JSON list)

Sample <ledStatus>:
[
{"led":"LED_USER_GREEN","status":false},
{"led":"LED_USER_RED","status":false},
]

Return JSON:
{"RESULT":"Success","DESC":null}
Chapter 9 – Firmware
9.1. Firmware Update through FTP:

URL: http://xxx.xxx.xxx.xxx:8443/api/fwupdateftp

POST data:
{
server=<server: string>
path=<path: string>
port=<port: int>
user=<user: string>
password=<password: string>
{

Sample POST data:


{"server":"192.168.12.101","path":"/openwrt-omap-ti_am335x-rs804-
squashfs-sdcard.img.gz","port":2121,"user":"anonymous","password":"123"}

Return :
On Error, return:
“Error_FTP_Connection”
“Error_Download_Ftp”
“Error_Update_FW”
“Error_Update_In_Progress”
“Error_Integrity”
No return on Success, because the OS should reboot after OS update.
If it takes too long, the api may return error because of timeout. As long
as update has started, it should continue to update until finished. So the error
caused by timeout can be ignored.

Not implemented in v1.0.1.


Implemented in v1.0.6.
v1.0.7 adds events to indicate status. Check event definitions.
V1.0.14 removed checksum, use gzip to check gz integrity. In case of error,returns
“Error_Integrity”

9.2. Firmware Update through POST file:

URL: http://xxx.xxx.xxx.xxx:8443/api/fwupdatefile

POST data:
none
POST file:
name="fw_update"
Return:
On Error, return:
“Error_Move_File”,
“Error_Update_FW”
“Error_Update_In_Progress”
“Error_Integrity”
No return on Success, because the OS should reboot after OS update.
If it takes too long, the api may return error because of timeout. As long
as update has started, it should continue to update until finished. So the error
caused by timeout can be ignored.

Not implemented in v1.0.1.


Implemented in v1.0.6.
V1.0.14 removed checksum, use gzip to check gz integrity. In case of error,return
“Error_Integrity”

9.3. Turn ON/OFF Radio Carrier Wave:

URL: http://xxx.xxx.xxx.xxx:8443/api/radiocarrierwave

POST data:
{
antennaID:<antennaID: int>,
transmitPower:<transmitPower: int>,
frequency:<frequency: int>,
frequencyResolution:<frequencyResolution: int>,
turnOn:<turnOn: bool>
}

Sample POST data:


{"antennaID":1, "transmitPower":2500, "frequency":916800,
"frequencyResolution":24,"turnOn":false}

Remarks:
Available since v1.0.18
Modified in v1.0.20, add parameters to set antennaID, transmitPower, frequency
and frequencyResolution.
transmitPower and frequency refer to <rfTransmitter> in inventory definition, here
use the actually values instead of the indexes.
frequencyResolution: frequency divider. Available values: 24 and 60.
When turning off(turnOn = false), antennaID, transmitPower, frequency and
frequencyResolution do not need to be set.

Events:
Events are reported through web socket. Web socket is connected to:
http://xxx.xxx.xxx.xxx:8443/socket
9.4. FW Update Event:

Sample Format:
{“txt”: “FTP _CONNECTED”, “CLASS”: “#FW”}

<txt>: string
“FTP_CONNECTED”, “FTP_DOWNLOADING”,
“FTP_DOWNLOADED”,
“START_UPDATE”, “UPDATING”, “UPDATE_DONE”
when <txt>==“FTP_DOWNLOADING”, event format is:
{“txt”: “FTP _DOWNLOADING”, “size”:int, “total”:int, “CLASS”: “#FW”}
where size tells the total downloaded size, and total tells the total size of the file.

FTP _DOWNLOADING is reported for every 1M bytes downloaded.


UPDATING is reported every 10 seconds after START_UPDATE.

v1.0.15: add UPDATE_DONE before system reboot.


Chapter 10 - Events
10.1. Reader Event:

Sample Format:
{"e":249,"st":0,"p1":6001,"p2":0,"t":"","CLASS":"#RE"}

<e>: int
_WAE_UNDEFINED = 0,
WAE_INVENTORY = 249,
st: 0=start, 1=stop
p1: spec-ID
WAE_AIS = 254,
st: 0=end, //no-start-event!
p1: inventory-spec-ID
p2: op-spec-index
WAE_ANTENNA = 255,
st: 0=disabled, 1=enabled,
p1: physic-antenna-ID
p2: logical-antenna-ID

state: 240=start-antenna-cycle, 241=end-antenna-cycle,


255=error-and-disabled
p1: antenna-cycle-count

state: 255=error-and-disabled
p1: logical-antenna-ID

WAE_GPI = 248,
st: gpi state //ENUM_GPIPortState
p1: port

WAE_READER_ERROR = 1001,
st: //(RFID_STATUS)state
t: description

WAE_READER_DEAD = 1004,
t: description

WAE_TAGOP_ERROR = 1115
p1: op command
t: description
add in v1.0.15:
WAE_EVENT = 1500,
st: RE_EVENT_TYPE
RE_EVENT_TYPE: RET_QUIT_APP = 1, RET_RESET_RM300=2,
RET_TASK_COMPLETED=3

10.2. Antenna Connection Status Event:

Format:
{
"CLASS":"#AntennaConnectionStatusEvent",
"acs":[
{"antennaID":1,"regB00":270,"regB04":77,"REVPWRLEVTOOHIGH":False},
{"antennaID":2,"regB00":270,"regB04":-4,"REVPWRLEVTOOHIGH":False},
{"antennaID":3,"regB00":270,"regB04":265,"REVPWRLEVTOOHIGH":True},
{"antennaID":4,"regB00":270,"regB04":264,"REVPWRLEVTOOHIGH":True}
]
}
REVPWRLEVTOOHIGH means not connected.

10.3. TagData Event:


Format:
{"tags":list, "CLASS":"#TD"}

<tags>: list of object


{e: string, t: string, a: int, r: int, f: int, o:list}

<e>:epc
<a>: antennaID
<r>: rssi
<f>: time first seen
<l>: time last seen
<c>: count
<pc>: PC
<o>: list of object (tag op results, if no result then <o> is null or undefined)
{ID: int, op: string, result: int, dataLen: int, dataBytes: list of byte}

Definition of result code in results:


For different op(total 6, Read, Write, Kill, Lock, BlockErase, BlockWrite ), the
definition of result code is different, following the code below:

(v1.0.14: add Operation_Failed_Error to indicate cases that are not successful but
without reader error being reported. )
public enum ENUM_C1G2ReadResultType : byte
{
[XmlEnum(Name="Success")]Success = 0,
[XmlEnum(Name="Nonspecific_Tag_Error")]Nonspecific_Tag_Error = 1,
[XmlEnum(Name="No_Response_From_Tag")]No_Response_From_Tag = 2,
[XmlEnum(Name="Nonspecific_Reader_Error")]Nonspecific_Reader_Error = 3,
[XmlEnum(Name = "Operation_Failed!")]Operation_Failed_Error = 0xFF,
}

public enum ENUM_C1G2WriteResultType : byte


{
[XmlEnum(Name="Success")]Success = 0,
[XmlEnum(Name="Tag_Memory_Overrun_Error")]Tag_Memory_Overrun_Error =
1,
[XmlEnum(Name="Tag_Memory_Locked_Error")]Tag_Memory_Locked_Error =
2,
[XmlEnum(Name="Insufficient_Power")]Insufficient_Power = 3,
[XmlEnum(Name="Nonspecific_Tag_Error")]Nonspecific_Tag_Error = 4,
[XmlEnum(Name="No_Response_From_Tag")]No_Response_From_Tag = 5,
[XmlEnum(Name="Nonspecific_Reader_Error")]Nonspecific_Reader_Error = 6,
[XmlEnum(Name = "Operation_Failed!")]Operation_Failed_Error = 0xFF,
}

public enum ENUM_C1G2KillResultType : byte


{
[XmlEnum(Name="Success")]Success = 0,
[XmlEnum(Name="Zero_Kill_Password_Error")]Zero_Kill_Password_Error = 1,
[XmlEnum(Name="Insufficient_Power")]Insufficient_Power = 2,
[XmlEnum(Name="Nonspecific_Tag_Error")]Nonspecific_Tag_Error = 3,
[XmlEnum(Name="No_Response_From_Tag")]No_Response_From_Tag = 4,
[XmlEnum(Name="Nonspecific_Reader_Error")]Nonspecific_Reader_Error = 5,
[XmlEnum(Name = "Operation_Failed!")]Operation_Failed_Error = 0xFF,
}

public enum ENUM_C1G2LockResultType : byte


{
[XmlEnum(Name="Success")]Success = 0,
[XmlEnum(Name="Insufficient_Power")]Insufficient_Power = 1,
[XmlEnum(Name="Nonspecific_Tag_Error")]Nonspecific_Tag_Error = 2,
[XmlEnum(Name="No_Response_From_Tag")]No_Response_From_Tag = 3,
[XmlEnum(Name="Nonspecific_Reader_Error")]Nonspecific_Reader_Error = 4,
[XmlEnum(Name = "Operation_Failed!")]Operation_Failed_Error = 0xFF,
}

public enum ENUM_C1G2BlockEraseResultType : byte


{
[XmlEnum(Name="Success")]Success = 0,
[XmlEnum(Name="Tag_Memory_Overrun_Error")]Tag_Memory_Overrun_Error =
1,
[XmlEnum(Name="Tag_Memory_Locked_Error")]Tag_Memory_Locked_Error =
2,
[XmlEnum(Name="Insufficient_Power")]Insufficient_Power = 3,
[XmlEnum(Name="Nonspecific_Tag_Error")]Nonspecific_Tag_Error = 4,
[XmlEnum(Name="No_Response_From_Tag")]No_Response_From_Tag = 5,
[XmlEnum(Name="Nonspecific_Reader_Error")]Nonspecific_Reader_Error = 6,
[XmlEnum(Name = "Operation_Failed!")]Operation_Failed_Error = 0xFF,
}

public enum ENUM_C1G2BlockWriteResultType : byte


{
[XmlEnum(Name="Success")]Success = 0,
[XmlEnum(Name="Tag_Memory_Overrun_Error")]Tag_Memory_Overrun_Error =
1,
[XmlEnum(Name="Tag_Memory_Locked_Error")]Tag_Memory_Locked_Error =
2,
[XmlEnum(Name="Insufficient_Power")]Insufficient_Power = 3,
[XmlEnum(Name="Nonspecific_Tag_Error")]Nonspecific_Tag_Error = 4,
[XmlEnum(Name="No_Response_From_Tag")]No_Response_From_Tag = 5,
[XmlEnum(Name="Nonspecific_Reader_Error")]Nonspecific_Reader_Error = 6,
[XmlEnum(Name = "Operation_Failed!")]Operation_Failed_Error = 0xFF,
}

You might also like