EPC Gen2 Tag Filtering

UHF Gen2 filters allow you to specify which tags should respond in an inventory. This feature allows you to isolate specific tags in large population. Tags that do not match the specified filter will not transmit a response, which greatly reduces the amount of RF traffic.

The following C# code sample shows how to filter tags based on EPC. In this example, only tags with EPCs that start with 78B5 will respond.

// Create the Inventory Command and RF Control parameters
PARAM_C1G2InventoryCommand c1g2Inv = new PARAM_C1G2InventoryCommand();
PARAM_C1G2RFControl c1g2RF = new PARAM_C1G2RFControl();
 
// Setup the tag filter
c1g2Inv.C1G2Filter = new PARAM_C1G2Filter[1];
c1g2Inv.C1G2Filter[0] = new PARAM_C1G2Filter();
c1g2Inv.C1G2Filter[0].C1G2TagInventoryMask = new PARAM_C1G2TagInventoryMask();
// Filter on EPC (memory bank #1)
c1g2Inv.C1G2Filter[0].C1G2TagInventoryMask.MB = new TwoBits(1);
// Start filtering at the address 0x20 (the start of the third word).
// The first two words of the EPC are the checksum and Protocol Control bits.
c1g2Inv.C1G2Filter[0].C1G2TagInventoryMask.Pointer = 0x20;
c1g2Inv.C1G2Filter[0].C1G2TagInventoryMask.TagMask = LLRPBitArray.FromHexString("78B5");
 
// Set the reader mode to one of these values.
// 0 = Max Throughput
// 1 = Hybrid
// 2 = Dense Reader M4
// 3 = Dense Reader M8
// 4 = Max Miller
// 1000 = Autoset Dense Reader
// 1001 = Autoset Single Reader
c1g2RF.ModeIndex = 1000;
c1g2RF.Tari = 0;
c1g2Inv.C1G2RFControl = c1g2RF;
 
// Set the session.
PARAM_C1G2SingulationControl c1g2Sing = new PARAM_C1G2SingulationControl();
c1g2Sing.Session = new TwoBits(1);
c1g2Sing.TagPopulation = 32;
c1g2Sing.TagTransitTime = 0;
c1g2Inv.C1G2SingulationControl = c1g2Sing;
c1g2Inv.TagInventoryStateAware = false;
 
// Set the search mode.
PARAM_ImpinjInventorySearchMode impISM = new PARAM_ImpinjInventorySearchMode();
impISM.InventorySearchMode = ENUM_ImpinjInventorySearchType.Single_Target;
c1g2Inv.Custom.Add(impISM);
 
// Build the AI spec.
aiSpec.InventoryParameterSpec = new PARAM_InventoryParameterSpec[1];
aiSpec.InventoryParameterSpec[0] = new PARAM_InventoryParameterSpec();
aiSpec.InventoryParameterSpec[0].InventoryParameterSpecID = 1234;
aiSpec.InventoryParameterSpec[0].ProtocolID = ENUM_AirProtocols.EPCGlobalClass1Gen2;
aiSpec.InventoryParameterSpec[0].AntennaConfiguration = new PARAM_AntennaConfiguration[1];
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0] = new PARAM_AntennaConfiguration();
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].AntennaID = 0;
// Add the inventory command to the AI spec.
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].AirProtocolInventoryCommandSettings.Add(c1g2Inv);
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter = new PARAM_RFTransmitter();
// Tx power.
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter.TransmitPower = 81;
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter.HopTableID = 1;
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter.ChannelIndex = 0;
 
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFReceiver = new PARAM_RFReceiver();
// Receive sensitivity.
aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFReceiver.ReceiverSensitivity = 20;
msg.ROSpec.SpecParameter.Add(aiSpec);

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.