Getting Started with LLRP in RIFIDI

From RifidiWiki

Jump to: navigation, search

LLRP Standards

The LLRP standards doc has a good overview of how they work: http://www.gs1.org/gsmp/kc/epcglobal/llrp

Reader Configuration

This sets the reader configuration when a reader session connects such as enabling Event Types, AccessReportSpec, GPIO, TagReportContent.

The defaults should support most if not all requireed configurations hence no need to override theses values but one can override when creating the reader adapter configuration by setting the following property

  • ReaderConfigPath: The path of an optional .llrp file which can be used to configure the reader when the session starts. Simply create a “SET_READER_CONFIG” command in LLRP Commander (URL), and export the resulting XML into the desired file.

Please refer to user guide for more details User's_Guide

Default Configuration:


<?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>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>
- <llrp:GPIPortCurrentState>
  <llrp:GPIPortNum>4</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>

ROSpec Configuration

The LLRP commander project for eclipse is a good way to configure LLRP rospecs without having to go through Rifidi: https://code.google.com/p/fosstrak/wiki/LlrpMain

ROSpec default Configuration

The file "default.llrp" in the "config" folder of rifidi is a good starting ROSpec to build off of, as the antennas are already configured there. Attached is a version of that with the regular start/stop triggers replaced with GPI ones. It may serve for what you need, though you might have to adjust the "GPIEvent" and "GPIPortNum" values (and the timeout on the stop trigger).

Example Default ROSpec Configuration:


<?xml version="1.0" encoding="UTF-8" ?> 
- <llrp:ADD_ROSPEC xmlns:llrp="http://www.llrp.org/ltk/schema/core/encoding/xml/1.0" Version="1" MessageID="42">
- <llrp:ROSpec>
  <llrp:ROSpecID>1</llrp:ROSpecID> 
  <llrp:Priority>0</llrp:Priority> 
  <llrp:CurrentState>Disabled</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:ADD_ROSPEC>


How to Override Default RoSpec

One may want to override the default ROSpec to be able to access extended Reader and LLRP features (example Vendor Extensions, GPIO Triggers etc..)

Please refer to user guide for any additional details User's_Guide. Below provides the required steps

One can override teh default ROSpec by using the following LLRP command.

LLRP-ADD_ROSPEC-File This command allows you to add a ROSpec from a file. You can configure the file using the excellent LLRP Commander then you can export that file and submit it to the reader using this command. This command will delete all ROSpecs that are on the reader at the moment, and it will add and enable the ROSpec that you submit (it is assumed to have a start trigger that isn't NULL, if it is NULL you will have to edit the file and re-submit or manually start the ROSpec; if you aren't sure what trigger to use use an IMMEDIATE trigger). This command has 2 properties: Filename: The name of the file that you wish to submit to the reader. It is recommended to put the file in the ./config directory. ImpinjExtensions: If set to true, the “enable vendor extensions” command for Impinj readers will be sent to the reader before the ROSpec is sent. If your ROSpec has Impinj extensions specified, this setting will allow you to use them.

  • createcommand LLRP-ADD_ROSPEC-File
  • setproperties LLRP_ADD_ROSPEC_File_1 Filename config/myrospec.llrp
  • executecommand LLRP_1 1 LLRP_ADD_ROSPEC_File_1 -1

This sequence of commands will look at the file “myrospec.llrp” in the ./config directory and craft a ROSpec out of it. All existing ROSpecs will be deleted, and the new ROSpec will be sent, enabled and started. The parameters of how the ROSpec is configured are completely up to you. If you need help crafting a ROSpec, try LLRP Commander.

How to Validate Impinj LLRP Configuration

Follow these steps To validate which llrp configuration is active on Impinj reader


https://support.impinj.com/hc/en-us/articles/202756548-Get-LLRP-Configuration-with-RShell-VIDEO-

That link shows how to use Impinj rshell to pull the config directly off of the reader. ONE CAN compare the ADD_Rospec VIA rshell to the ADD_Rospec expected to be configured vua Rifidi . This should be easier than LLRP Commander.

GPIO

Basically, you will need to use the LLRP "from file" command instead of the regular LLRP-Configure command in order to use the GPIO triggers (the rifidi user doc will show how to use this command). The triggers themselves will look like this:

<llrp:ROSpecStartTrigger>

       <llrp:ROSpecStartTriggerType>GPI</llrp:ROSpecStartTriggerType> 
       <llrp:GPITriggerValue> 
         <llrp:GPIPortNum>1</llrp:GPIPortNum> 
         <llrp:GPIEvent>1</llrp:GPIEvent> 
         <llrp:Timeout>0</llrp:Timeout> 
       </llrp:GPITriggerValue> 
     </llrp:ROSpecStartTrigger> 
     <llrp:ROSpecStopTrigger> 
       <llrp:ROSpecStopTriggerType>GPI_With_Timeout</llrp:ROSpecStopTriggerType> 
       <llrp:DurationTriggerValue>0</llrp:DurationTriggerValue> 
       <llrp:GPITriggerValue> 
         <llrp:GPIPortNum>1</llrp:GPIPortNum> 
         <llrp:GPIEvent>0</llrp:GPIEvent> 
         <llrp:Timeout>0</llrp:Timeout> 
       </llrp:GPITriggerValue> 

</llrp:ROSpecStopTrigger>

Personal tools