Difference between revisions of "LLRP Tag Encoding"
From RifidiWiki
(→LLRP Encode Single Shot Commands) |
(→LLRP Encode Single Shot Commands) |
||
Line 135: | Line 135: | ||
Note: All MQTT (if set), timeout tagmask and epctarget always come form Global Variables | Note: All MQTT (if set), timeout tagmask and epctarget always come form Global Variables | ||
*Command | *Command | ||
− | /llrpencode/{readerID}/{sessionID | + | /llrpencode/{readerID}/{sessionID}/{operationCode}/{properties} |
List of operationCodes | List of operationCodes | ||
Line 145: | Line 145: | ||
LLRPAccessPasswordLock | LLRPAccessPasswordLock | ||
*Example LLRPECWrite - Used to Write a EPC ID | *Example LLRPECWrite - Used to Write a EPC ID | ||
− | http://localhost:8111/llrpencode/LLRP_1/1 | + | http://localhost:8111/llrpencode/LLRP_1/1/LLRPEPCWrite/accesspwd=12345678;tag=000000000001111111111268 |
*Example LLRPKillPasswordWrite - Used to Write a Kill Password | *Example LLRPKillPasswordWrite - Used to Write a Kill Password | ||
− | http://localhost:8111/llrpencode/LLRP_1/1 | + | http://localhost:8111/llrpencode/LLRP_1/1/LLRPKillPasswordWrite/accesspwd=12345678;killpwd=87654321 |
*Example LLRPAccessPasswordWrite - Used to Write a Access Password | *Example LLRPAccessPasswordWrite - Used to Write a Access Password | ||
− | http://localhost:8111/llrpencode/LLRP_1/1 | + | http://localhost:8111/llrpencode/LLRP_1/1/LLRPAccessPasswordWrite/oldaccesspwd=12345678;accesspwd=98765432 |
*Example LLRPEPCLock - Set EPC Lock Priveledge | *Example LLRPEPCLock - Set EPC Lock Priveledge | ||
− | http://localhost:8111/llrpencode/LLRP_1/1 | + | http://localhost:8111/llrpencode/LLRP_1/1/LLRPEPCLock/accesspwd=98765432;privilege=Read_Write |
*Example LLRPKillPasswordLock - Set Kill Password Lock Privilege | *Example LLRPKillPasswordLock - Set Kill Password Lock Privilege | ||
Line 160: | Line 160: | ||
*Example LLRPAccessPasswordLock - Set Access Password Lock Privilege | *Example LLRPAccessPasswordLock - Set Access Password Lock Privilege | ||
− | http://localhost:8111/llrpencode/LLRP_1/1 | + | http://localhost:8111/llrpencode/LLRP_1/1/LLRPAccessPasswordLock/accesspwd=98765432;privilege=Read_Write |
===Single Shot Encode Operations Response=== | ===Single Shot Encode Operations Response=== | ||
If MQTT Variables defined Globally (above) then operations result response will be sent to MQTT topic otherwise response is synchronous | If MQTT Variables defined Globally (above) then operations result response will be sent to MQTT topic otherwise response is synchronous |
Revision as of 19:49, 26 October 2014
Contents
LLRP Tag Encoding Options
LLRP Encode Command
LLRP Encode Command is used to encode a new Tag with the following operations:
Order: operationCode 1 - LLRPAccessPasswordWrite 2 - LLRPEPCWrite 3 - LLRPKillPasswordWrite 4 - LLRPEPCLock 5 - LLRPKillPasswordLock 6 - LLRPAccessPasswordLock
What are EPC, Kill Password, Access Password:
- EPC is the GEN2 EPC ID for a Tag
- Kill Password is used to set the password necessary to kill/destroy a tag for future use (by default there is no password (value(0))
- Access Password is used to perform tag writes such as EPC, Kill Password, Access Password (by default there is no password (value(0))
- C1G2Write and C1G2Lock are the LLRP Access Spec operations used
- Command
llrpencode/{readerID}/{sessionID}/{tag}- Performs all LLRP Encoding operations for a New RFID Tag
- Example
http://localhost:8111/llrpencode/LLRP_1/1/111122223333444455556666
- Prerequisites
- Only one tag can be present(This is Not a Bulk encoding operation)
- Must be a LLRP reader
- Must be a valid readerID and sessionID
- tag must be evenly divide by 4 (word in hex) and tag must be able to support length
- access password and kill password must be evenly divide by 4 (4 or 8 characters/1 or 2 words) or 0
- Only one encoding session per reader can be active at one time
Global Settings via Edge_Server_Configuration
Global Properties below need to be set for LLRP encode based on ones requirements
- Note: All MQTT (if set), timeout tagmask and epctarget always come form Global Variables
- Note: These are set globally using the Rifidi Edge Configuration Edge_Server_Configuration
-Dorg.rifidi.llrp.encode.targetepc=000000000000000000000000 - (Hex Value) Sets the EPC Tag Data to perform operation on (Must be even block of 4 charaters and size depends on Tag - typical is 24 characters) - default if not set is 000000000000000000000000 -Dorg.rifidi.llrp.encode.tagmask=000000000000000000000000 - (Hex Value) Sets the Tag Mask to perform operation on (0 is wildcard match, F is Exact Match) (Must be even block of 4 characters and size depends on Tag - typical is 24 characters) - default if not set is 000000000000000000000000 -Dorg.rifidi.llrp.encode.timeout=5000 - Sets the duration of time to attempt operation (O is infinite until operation occurs, set in milliseconds) -Dorg.rifidi.llrp.encode.accesspwd=0 - Access Password (Hex Value) (8 Characters or value of 0) - default if not set is 0 -Dorg.rifidi.llrp.encode.oldaccesspwd=0 - Old Access Password (Hex Value) (8 Characters or value of 0) - default if not set is 0 Note: used when setting new access password -Dorg.rifidi.llrp.encode.killpwd=0 - Kill Password (Hex Value) (8 Characters or value of 0) - default if not set is 0 -Dorg.rifidi.llrp.encode.killpwdlockprivilege=Read_Write - If Set Performs a Kill Password Lock Operation (values can be Read_Write (which Locks), Perma_Lock, Unlock) - default if not set is Read_Write -Dorg.rifidi.llrp.encode.accesspwdlockprivilege=Read_Write - If Set Performs a Access Password Lock Operation (values can be Read_Write (which Locks), Perma_Lock, Unlock) default if not set is Read_Write -Dorg.rifidi.llrp.encode.epclockprivilege=Read_Write - If Set Performs a EPC Lock Operation (values can be Read_Write (which Locks), Perma_Lock, Unlock) - default if not set is Read_Write -Dorg.rifidi.llrp.encode.mqttbroker -- mqtt broker url (if set, received response of encode operation is posted to this queue in asynchronous mode). Mqttqos and mqttclientid must be set too in order to post to queue -Dorg.rifidi.llrp.encode.mqttqos -- Quality of service level for mqtt, example: 2 -Dorg.rifidi.llrp.encode.mqttclientid -- Client id to publish messages on queue
Note: These are optional Global variables for MQTT. If these are set then llrpencode command operations response to sent asynchronously to a topic
- topic naming convention {readerId}/encode with result of encoding operations
-Dorg.rifidi.llrp.encode.mqttqos=2 -Dorg.rifidi.llrp.encode.mqttbroker=tcp://localhost:1883 -Dorg.rifidi.llrp.encode.mqttclientid=llrpEncodeId
Encode Response
Response: Success
<?xml version="1.0" encoding="UTF-8"?> <response> <message>Success</message> </response>
Response: Fail
<?xml version="1.0" encoding="UTF-8"?> <response> <message>Fail</message> <Description> LLRP Message Returned goes here such as Tag mask and Tag data not matching - such</Description> </response> Note: Some types of Fail responses could be # More than one tag # Not a LLLRP reader # Not a valid session # Invalid access spec request # Encoding session already active
Encode Operations Response
If MQTT Variables defined Globally (above) then operations result response will be sent to MQTT topic
- Topic naming convention: {readerID}/encode
Success Message
<encodeMessage> <status>Success</Status> </encodeMessage>
Fail Message
<encodeMessage> <status>Fail</status> <operationList> <operation>LLRPEPCWrite:Sucess</operation> <operation>LLRPKillPasswordWrite:Sucess</operation> <operation>LLRPAccessPasswordWrite:Sucess</operation> <operation>LLRPEPCLock:No_Response_From_Tag</operation> <operation>LLRPKillPaswordLock: Success</operation> <operation>LLRPAccessPaswordLock: Success</operation> </operationList> </encodeMessage>
Full List of Return Failure Codes:
Insufficient_Power No_Response_From_Tag Nonspecific_Reader_Error Nonspecific_Tag_Error Tag_Memory_Locked_Error Tag_Memory_Overrun_Error
LLRP Encode Single Shot Commands
These are used to perform single operations and override Global properties therefore all values must be supplied in request Note: All MQTT (if set), timeout tagmask and epctarget always come form Global Variables
- Command
/llrpencode/{readerID}/{sessionID}/{operationCode}/{properties}
List of operationCodes
LLRPEPCWrite LLRPKillPasswordWrite LLRPAccessPasswordWrite LLRPEPCLock LLRPKillPasswordLock LLRPAccessPasswordLock
- Example LLRPECWrite - Used to Write a EPC ID
- Example LLRPKillPasswordWrite - Used to Write a Kill Password
http://localhost:8111/llrpencode/LLRP_1/1/LLRPKillPasswordWrite/accesspwd=12345678;killpwd=87654321
- Example LLRPAccessPasswordWrite - Used to Write a Access Password
- Example LLRPEPCLock - Set EPC Lock Priveledge
http://localhost:8111/llrpencode/LLRP_1/1/LLRPEPCLock/accesspwd=98765432;privilege=Read_Write
- Example LLRPKillPasswordLock - Set Kill Password Lock Privilege
- Example LLRPAccessPasswordLock - Set Access Password Lock Privilege
Single Shot Encode Operations Response
If MQTT Variables defined Globally (above) then operations result response will be sent to MQTT topic otherwise response is synchronous
- Topic naming convention: {readerID}/encode
Encode Single Shot Response
Response: Success
<?xml version="1.0" encoding="UTF-8"?> <response> <message>Success</message> </response>
Response: Fail
<?xml version="1.0" encoding="UTF-8"?> <response> <message>Fail</message> <Description> LLRP Message Returned goes here such as Tag mask and Tag data not matching - such</Description> </response> Note: Some types of Fail responses could be # More than one tag # Not a LLLRP reader # Not a valid session # Invalid access spec request # Encoding session already active
Success Message
<encodeMessage> <status>Success</Status> </encodeMessage>
Fail Message
<encodeMessage> <status>Fail</status> <operationList> <operation>LLRPEPCLock:No_Response_From_Tag</operation> </operationList> </encodeMessage>
Full List of Return Failure Codes:
Insufficient_Power No_Response_From_Tag Nonspecific_Reader_Error Nonspecific_Tag_Error Tag_Memory_Locked_Error Tag_Memory_Overrun_Error