Question

I am currently connecting to an Impinj Speedway reader 220 and I have 2 antennas connected to it.

When I load the Impinj MultiReader application and switch on Display Antenna Port, it gets which antenna the RFID tag was read on back to the application.

I am currently using C# to connect to the reader (though I believe the SDK is similar for all languages). Below is the sample code I am using, however I don't know which configuration option turns on the ability to read the antenna port.

Could someone please let me know which configuration option turns on the option so the AntennaID is returned with the tag?

        MSG_ERROR_MESSAGE msg_err;
        MSG_ADD_ROSPEC msg = new MSG_ADD_ROSPEC();

        // Reader Operation Spec (ROSpec)
        msg.ROSpec = new PARAM_ROSpec();
        // ROSpec must be disabled by default
        msg.ROSpec.CurrentState = ENUM_ROSpecState.Disabled;
        // The ROSpec ID can be set to any number
        // You must use the same ID when enabling this ROSpec
        msg.ROSpec.ROSpecID = 123;

        // ROBoundarySpec
        // Specifies the start and stop triggers for the ROSpec
        msg.ROSpec.ROBoundarySpec = new PARAM_ROBoundarySpec();
        // Immediate start trigger
        // The reader will start reading tags as soon as the ROSpec is enabled
        msg.ROSpec.ROBoundarySpec.ROSpecStartTrigger =
        new PARAM_ROSpecStartTrigger();
        msg.ROSpec.ROBoundarySpec.ROSpecStartTrigger.ROSpecStartTriggerType =
        ENUM_ROSpecStartTriggerType.Immediate;
        // No stop trigger. Keep reading tags until the ROSpec is disabled.
        msg.ROSpec.ROBoundarySpec.ROSpecStopTrigger = new PARAM_ROSpecStopTrigger();
        msg.ROSpec.ROBoundarySpec.ROSpecStopTrigger.ROSpecStopTriggerType =
        ENUM_ROSpecStopTriggerType.Null;

        // Antenna Inventory Spec (AISpec)
        // Specifies which antennas and protocol to use
        msg.ROSpec.SpecParameter = new UNION_SpecParameter();

        PARAM_AISpec aiSpec = new PARAM_AISpec();
        aiSpec.AntennaIDs = new UInt16Array();

        // Enable all antennas
        aiSpec.AntennaIDs.Add(0);
        // No AISpec stop trigger. It stops when the ROSpec stops.
        aiSpec.AISpecStopTrigger = new PARAM_AISpecStopTrigger();
        aiSpec.AISpecStopTrigger.AISpecStopTriggerType = ENUM_AISpecStopTriggerType.Null;
        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].RFTransmitter = new PARAM_RFTransmitter();
        aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter.HopTableID = 1;
        aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter.ChannelIndex = 1;
        aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFTransmitter.TransmitPower = 91; // Max power of 32.5 dbm
        aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFReceiver = new PARAM_RFReceiver();
        aiSpec.InventoryParameterSpec[0].AntennaConfiguration[0].RFReceiver.ReceiverSensitivity = 1; // 1= -80 (the max), 2 = -70, etc.

        msg.ROSpec.SpecParameter.Add(aiSpec);

        // Report Spec
        msg.ROSpec.ROReportSpec = new PARAM_ROReportSpec();
        // Send a report for every tag read
        msg.ROSpec.ROReportSpec.ROReportTrigger =
        ENUM_ROReportTriggerType.Upon_N_Tags_Or_End_Of_ROSpec;
        msg.ROSpec.ROReportSpec.N = 1;
        msg.ROSpec.ROReportSpec.TagReportContentSelector =  new PARAM_TagReportContentSelector();

        MSG_ADD_ROSPEC_RESPONSE rsp = reader.ADD_ROSPEC(msg, out msg_err, 2000);
Was it helpful?

Solution

I eventually discovered how to do it.

In the above example I just remove

msg.ROSpec.ROReportSpec.TagReportContentSelector =  new PARAM_TagReportContentSelector();

and replace it with

PARAM_TagReportContentSelector reportContent = new PARAM_TagReportContentSelector();
reportContent.EnableAntennaID = true;

msg.ROSpec.ROReportSpec.TagReportContentSelector = reportContent;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top