Edge LLRP Reader Management

From RifidiWiki

Revision as of 00:23, 8 December 2014 by Bppause (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Edge LLRP Reader Management

These are the RESTful commands specific for managing LLRP readers with Rifidi

LLRP Dynamic Configuration command example

Example LLRP Message (Setting Reader Configuration) -

<llrp:SET_READER_CONFIG xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="0">
  <llrp:ResetToFactoryDefault>0</llrp:ResetToFactoryDefault>
  <llrp:ReaderEventNotificationSpec>
    <llrp:EventNotificationState>
      <llrp:EventType>GPI_Event</llrp:EventType>
      <llrp:NotificationState>1</llrp:NotificationState>
    </llrp:EventNotificationState>
  </llrp:ReaderEventNotificationSpec>
  <llrp:ROReportSpec>
    <llrp:ROReportTrigger>None</llrp:ROReportTrigger>
    <llrp:N>0</llrp:N>
    <llrp:TagReportContentSelector>
      <llrp:EnableROSpecID>1</llrp:EnableROSpecID>
      <llrp:EnableSpecIndex>0</llrp:EnableSpecIndex>
      <llrp:EnableInventoryParameterSpecID>0</llrp:EnableInventoryParameterSpecID>
      <llrp:EnableAntennaID>1</llrp:EnableAntennaID>
      <llrp:EnableChannelIndex>0</llrp:EnableChannelIndex>
      <llrp:EnablePeakRSSI>1</llrp:EnablePeakRSSI>
      <llrp:EnableFirstSeenTimestamp>1</llrp:EnableFirstSeenTimestamp>
      <llrp:EnableLastSeenTimestamp>1</llrp:EnableLastSeenTimestamp>
      <llrp:EnableTagSeenCount>1</llrp:EnableTagSeenCount>
      <llrp:EnableAccessSpecID>1</llrp:EnableAccessSpecID>
      <llrp:C1G2EPCMemorySelector>
        <llrp:EnableCRC>0</llrp:EnableCRC>
        <llrp:EnablePCBits>0</llrp:EnablePCBits>
      </llrp:C1G2EPCMemorySelector>
    </llrp:TagReportContentSelector>
  </llrp:ROReportSpec>
  <llrp:AccessReportSpec>
    <llrp:AccessReportTrigger>Whenever_ROReport_Is_Generated</llrp:AccessReportTrigger>
  </llrp:AccessReportSpec>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>1</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>2</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>3</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  • posting the example LLRP Message using MyHttpTestClient

Response: Success

<?xml version="1.0" encoding="UTF-8"?>
<llrp:SET_READER_CONFIG_RESPONSE xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="0">
  <llrp:LLRPStatus>
    <llrp:StatusCode>M_Success</llrp:StatusCode>
    <llrp:ErrorDescription />
  </llrp:LLRPStatus>
</llrp:SET_READER_CONFIG_RESPONSE>
  • posting the example LLRP Message using MyHttpTestClient, setting wrong reader id

Response: Fail

<?xml version="1.0" encoding="UTF-8"?>
<response>
   <message>Fail</message>
   <description>ReaderID is missing or invalid</description>
</response>
  • posting the example LLRP Message using MyHttpTestClient, setting wrong session id

Response: Fail

<?xml version="1.0" encoding="UTF-8"?>
<response>
   <message>Fail</message>
   <description>SessionID is missing or invalid</description>
</response>
  • posting the example LLRP Message using MyHttpTestClient, setting wrong entry in xml message, for example setting <llrp:EnableCRC>xxAB1</llrp:EnableCRC>

Response: Fail

LTK XML message can not be validated against schema org/llrp/ltk/llrp-1x0.xsd
<?xml version="1.0" encoding="UTF-8"?>
<llrp:SET_READER_CONFIG xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="0">
   <llrp:ResetToFactoryDefault>0</llrp:ResetToFactoryDefault>
   <llrp:ReaderEventNotificationSpec>
      <llrp:EventNotificationState>
         <llrp:EventType>GPI_Event</llrp:EventType>
         <llrp:NotificationState>1</llrp:NotificationState>
      </llrp:EventNotificationState>
   </llrp:ReaderEventNotificationSpec>
   <llrp:ROReportSpec>
      <llrp:ROReportTrigger>None</llrp:ROReportTrigger>
      <llrp:N>0</llrp:N>
      <llrp:TagReportContentSelector>
         <llrp:EnableROSpecID>1</llrp:EnableROSpecID>
         <llrp:EnableSpecIndex>0</llrp:EnableSpecIndex>
         <llrp:EnableInventoryParameterSpecID>0</llrp:EnableInventoryParameterSpecID>
         <llrp:EnableAntennaID>1</llrp:EnableAntennaID>
         <llrp:EnableChannelIndex>0</llrp:EnableChannelIndex>
         <llrp:EnablePeakRSSI>1</llrp:EnablePeakRSSI>
         <llrp:EnableFirstSeenTimestamp>1</llrp:EnableFirstSeenTimestamp>
         <llrp:EnableLastSeenTimestamp>1</llrp:EnableLastSeenTimestamp>
         <llrp:EnableTagSeenCount>1</llrp:EnableTagSeenCount>
         <llrp:EnableAccessSpecID>1</llrp:EnableAccessSpecID>
         <llrp:C1G2EPCMemorySelector>
            <llrp:EnableCRC>xxAB1</llrp:EnableCRC>
            <llrp:EnablePCBits>0</llrp:EnablePCBits>
         </llrp:C1G2EPCMemorySelector>
      </llrp:TagReportContentSelector>
   </llrp:ROReportSpec>
   <llrp:AccessReportSpec>
      <llrp:AccessReportTrigger>Whenever_ROReport_Is_Generated</llrp:AccessReportTrigger>
   </llrp:AccessReportSpec>
   <llrp:GPIPortCurrentState>
      <llrp:GPIPortNum>1</llrp:GPIPortNum>
      <llrp:Config>1</llrp:Config>
      <llrp:State>Low</llrp:State>
   </llrp:GPIPortCurrentState>
   <llrp:GPIPortCurrentState>
      <llrp:GPIPortNum>2</llrp:GPIPortNum>
      <llrp:Config>1</llrp:Config>
      <llrp:State>Low</llrp:State>
   </llrp:GPIPortCurrentState>
   <llrp:GPIPortCurrentState>
      <llrp:GPIPortNum>3</llrp:GPIPortNum>
      <llrp:Config>1</llrp:Config>
      <llrp:State>Low</llrp:State>
   </llrp:GPIPortCurrentState>
   <llrp:EventsAndReports>
      <llrp:HoldEventsAndReportsUponReconnect>0</llrp:HoldEventsAndReportsUponReconnect>
   </llrp:EventsAndReports>
</llrp:SET_READER_CONFIG>
because cvc-datatype-valid.1.2.1: 'xxAB1' is not a valid value for 'boolean'.


LLRP Get Reader Configuration

Available starting in Rifidi 3.1.1

Note: Applies to LLRP sesnortypes only. Helpful for troubleshooting to determine the current LLRP Reader configuration example

Response

<?xml version="1.0" encoding="UTF-8"?>
<llrp:GET_READER_CONFIG_RESPONSE xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="0">
  <llrp:LLRPStatus>
    <llrp:StatusCode>M_Success</llrp:StatusCode>
    <llrp:ErrorDescription>Success</llrp:ErrorDescription>
  </llrp:LLRPStatus>
  <llrp:Identification>
    <llrp:IDType>MAC_Address</llrp:IDType>
    <llrp:ReaderID>000000000000</llrp:ReaderID>
  </llrp:Identification>
  <llrp:AntennaProperties>
    <llrp:AntennaConnected>1</llrp:AntennaConnected>
    <llrp:AntennaID>1</llrp:AntennaID>
    <llrp:AntennaGain>0</llrp:AntennaGain>
  </llrp:AntennaProperties>
  <llrp:AntennaConfiguration>
    <llrp:AntennaID>1</llrp:AntennaID>
    <llrp:RFReceiver>
      <llrp:ReceiverSensitivity>0</llrp:ReceiverSensitivity>
    </llrp:RFReceiver>
    <llrp:RFTransmitter>
      <llrp:HopTableID>0</llrp:HopTableID>
      <llrp:ChannelIndex>0</llrp:ChannelIndex>
      <llrp:TransmitPower>0</llrp:TransmitPower>
    </llrp:RFTransmitter>
  </llrp:AntennaConfiguration>
  <llrp:ReaderEventNotificationSpec>
    <llrp:EventNotificationState>
      <llrp:EventType>Upon_Hopping_To_Next_Channel</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>GPI_Event</llrp:EventType>
      <llrp:NotificationState>1</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>ROSpec_Event</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>Report_Buffer_Fill_Warning</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>Reader_Exception_Event</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>RFSurvey_Event</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>AISpec_Event</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>AISpec_Event_With_Details</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
    <llrp:EventNotificationState>
      <llrp:EventType>Antenna_Event</llrp:EventType>
      <llrp:NotificationState>0</llrp:NotificationState>
    </llrp:EventNotificationState>
  </llrp:ReaderEventNotificationSpec>
  <llrp:ROReportSpec>
    <llrp:ROReportTrigger>None</llrp:ROReportTrigger>
    <llrp:N>0</llrp:N>
    <llrp:TagReportContentSelector>
      <llrp:EnableROSpecID>1</llrp:EnableROSpecID>
      <llrp:EnableSpecIndex>0</llrp:EnableSpecIndex>
      <llrp:EnableInventoryParameterSpecID>0</llrp:EnableInventoryParameterSpecID>
      <llrp:EnableAntennaID>0</llrp:EnableAntennaID>
      <llrp:EnableChannelIndex>0</llrp:EnableChannelIndex>
      <llrp:EnablePeakRSSI>0</llrp:EnablePeakRSSI>
      <llrp:EnableFirstSeenTimestamp>0</llrp:EnableFirstSeenTimestamp>
      <llrp:EnableLastSeenTimestamp>0</llrp:EnableLastSeenTimestamp>
      <llrp:EnableTagSeenCount>0</llrp:EnableTagSeenCount>
      <llrp:EnableAccessSpecID>0</llrp:EnableAccessSpecID>
      <llrp:C1G2EPCMemorySelector>
        <llrp:EnableCRC>0</llrp:EnableCRC>
        <llrp:EnablePCBits>0</llrp:EnablePCBits>
      </llrp:C1G2EPCMemorySelector>
    </llrp:TagReportContentSelector>
  </llrp:ROReportSpec>
  <llrp:AccessReportSpec>
    <llrp:AccessReportTrigger>Whenever_ROReport_Is_Generated</llrp:AccessReportTrigger>
  </llrp:AccessReportSpec>
  <llrp:LLRPConfigurationStateValue>
    <llrp:LLRPConfigurationStateValue>19</llrp:LLRPConfigurationStateValue>
  </llrp:LLRPConfigurationStateValue>
  <llrp:KeepaliveSpec>
    <llrp:KeepaliveTriggerType>Null</llrp:KeepaliveTriggerType>
    <llrp:PeriodicTriggerValue>0</llrp:PeriodicTriggerValue>
  </llrp:KeepaliveSpec>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>1</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>2</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>3</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  <llrp:GPIPortCurrentState>
    <llrp:GPIPortNum>4</llrp:GPIPortNum>
    <llrp:Config>1</llrp:Config>
    <llrp:State>Low</llrp:State>
  </llrp:GPIPortCurrentState>
  <llrp:GPOWriteData>
    <llrp:GPOPortNumber>1</llrp:GPOPortNumber>
    <llrp:GPOData>0</llrp:GPOData>
  </llrp:GPOWriteData>
  <llrp:GPOWriteData>
    <llrp:GPOPortNumber>2</llrp:GPOPortNumber>
    <llrp:GPOData>0</llrp:GPOData>
  </llrp:GPOWriteData>
  <llrp:GPOWriteData>
    <llrp:GPOPortNumber>3</llrp:GPOPortNumber>
    <llrp:GPOData>0</llrp:GPOData>
  </llrp:GPOWriteData>
  <llrp:GPOWriteData>
    <llrp:GPOPortNumber>4</llrp:GPOPortNumber>
    <llrp:GPOData>0</llrp:GPOData>
  </llrp:GPOWriteData>
  <llrp:EventsAndReports>
    <llrp:HoldEventsAndReportsUponReconnect>0</llrp:HoldEventsAndReportsUponReconnect>
  </llrp:EventsAndReports>
</llrp:GET_READER_CONFIG_RESPONSE>

LLRP Get ROSpec

Available starting in Rifidi 3.1.1

Note: Applies to only LLRP sensortypes - Helpful for troubleshooting to determine the current LLRP ROSpec configuration example


<?xml version="1.0" encoding="UTF-8"?>
<llrp:GET_ROSPECS_RESPONSE xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="0">
  <llrp:LLRPStatus>
    <llrp:StatusCode>M_Success</llrp:StatusCode>
    <llrp:ErrorDescription>sucess</llrp:ErrorDescription>
  </llrp:LLRPStatus>
  <llrp:ROSpec>
    <llrp:ROSpecID>1</llrp:ROSpecID>
    <llrp:Priority>0</llrp:Priority>
    <llrp:CurrentState>Active</llrp:CurrentState>
    <llrp:ROBoundarySpec>
      <llrp:ROSpecStartTrigger>
        <llrp:ROSpecStartTriggerType>Immediate</llrp:ROSpecStartTriggerType>
      </llrp:ROSpecStartTrigger>
      <llrp:ROSpecStopTrigger>
        <llrp:ROSpecStopTriggerType>Null</llrp:ROSpecStopTriggerType>
        <llrp:DurationTriggerValue>0</llrp:DurationTriggerValue>
      </llrp:ROSpecStopTrigger>
    </llrp:ROBoundarySpec>
    <llrp:AISpec>
      <llrp:AntennaIDs>0</llrp:AntennaIDs>
      <llrp:AISpecStopTrigger>
        <llrp:AISpecStopTriggerType>Null</llrp:AISpecStopTriggerType>
        <llrp:DurationTrigger>0</llrp:DurationTrigger>
      </llrp:AISpecStopTrigger>
      <llrp:InventoryParameterSpec>
        <llrp:InventoryParameterSpecID>40</llrp:InventoryParameterSpecID>
        <llrp:ProtocolID>EPCGlobalClass1Gen2</llrp:ProtocolID>
        <llrp:AntennaConfiguration>
          <llrp:AntennaID>0</llrp:AntennaID>
          <llrp:C1G2InventoryCommand>
            <llrp:TagInventoryStateAware>1</llrp:TagInventoryStateAware>
            <llrp:C1G2SingulationControl>
              <llrp:Session>0</llrp:Session>
              <llrp:TagPopulation>100</llrp:TagPopulation>
              <llrp:TagTransitTime>0</llrp:TagTransitTime>
            </llrp:C1G2SingulationControl>
          </llrp:C1G2InventoryCommand>
        </llrp:AntennaConfiguration>
      </llrp:InventoryParameterSpec>
    </llrp:AISpec>
    <llrp:ROReportSpec>
      <llrp:ROReportTrigger>Upon_N_Tags_Or_End_Of_ROSpec</llrp:ROReportTrigger>
      <llrp:N>1</llrp:N>
      <llrp:TagReportContentSelector>
        <llrp:EnableROSpecID>1</llrp:EnableROSpecID>
        <llrp:EnableSpecIndex>1</llrp:EnableSpecIndex>
        <llrp:EnableInventoryParameterSpecID>1</llrp:EnableInventoryParameterSpecID>
        <llrp:EnableAntennaID>1</llrp:EnableAntennaID>
        <llrp:EnableChannelIndex>1</llrp:EnableChannelIndex>
        <llrp:EnablePeakRSSI>1</llrp:EnablePeakRSSI>
        <llrp:EnableFirstSeenTimestamp>1</llrp:EnableFirstSeenTimestamp>
        <llrp:EnableLastSeenTimestamp>1</llrp:EnableLastSeenTimestamp>
        <llrp:EnableTagSeenCount>1</llrp:EnableTagSeenCount>
        <llrp:EnableAccessSpecID>1</llrp:EnableAccessSpecID>
        <llrp:C1G2EPCMemorySelector>
          <llrp:EnableCRC>1</llrp:EnableCRC>
          <llrp:EnablePCBits>1</llrp:EnablePCBits>
        </llrp:C1G2EPCMemorySelector>
      </llrp:TagReportContentSelector>
    </llrp:ROReportSpec>
  </llrp:ROSpec>
</llrp:GET_ROSPECS_RESPONSE>

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
  1. Only one tag can be present(This is Not a Bulk encoding operation)
  2. Must be a LLRP reader
  3. Must be a valid readerID and sessionID
  4. tag must be evenly divide by 4 (word in hex) and tag must be able to support length
  5. access password and kill password must be evenly divide by 4 (4 or 8 characters/1 or 2 words) or 0
  6. 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 - optional (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  -- optional - Quality of service level for mqtt, example: 2
-Dorg.rifidi.llrp.encode.mqttclientid  -- optional - 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

# Reader does not exist:
<response>
   <message>Fail</message>
   <description>Reader with id LLRP_13 does not exist</description>
</response>

# Not a LLRP reader
<response>
   <message>Fail</message>
   <description>Reader with id Front_Door_1 of type Alien is not an LLRP reader type</description>
</response>

# Not a valid session
<response>
   <message>Fail</message>
   <description>Session with id 2 does not exist for reader with id LLRP_1</description>
</response>

# More than one tag
<response>
   <message>Fail</message>
   <description>There are 2 tags in the scope of the reader with id LLRP_1</description>
</response>

# Invalid access spec request
<response>
   <message>Fail</message>
   <description><?xml version="1.0" encoding="UTF-8"?> <llrp:ADD_ACCESSSPEC_RESPONSE xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="0"> <llrp:LLRPStatus> <llrp:StatusCode>M_FieldError</llrp:StatusCode> <llrp:ErrorDescription>An unkown C1G2 Opsec was added</llrp:ErrorDescription> </llrp:LLRPStatus> </llrp:ADD_ACCESSSPEC_RESPONSE></description>
</response>

# 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>LLRPAccessPasswordWrite:Sucess</operation>
     <operation>LLRPEPCWrite:Sucess</operation>
     <operation>LLRPKillPasswordWrite: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

http://localhost:8111/llrpencode/LLRP_1/1/LLRPEPCWrite/accesspwd=12345678;tag=000000000001111111111268

  • 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

http://localhost:8111/llrpencode/LLRP_1/1/LLRPAccessPasswordWrite/oldaccesspwd=12345678;accesspwd=98765432

  • 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

http://localhost:8111/llrpencode/LLRP_1/1/LLRPKillPasswordLock/accesspwd=98765432;privilege=Read_Write

  • Example LLRPAccessPasswordLock - Set Access Password Lock Privilege

http://localhost:8111/llrpencode/LLRP_1/1/LLRPAccessPasswordLock/accesspwd=98765432;privilege=Read_Write

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 
Personal tools