Search code examples
c#motorola-emdk

Adjusting Antenna Range using Motorola Emdks


using the following code;I am trying to adjust the range for my antennas;

Antennas.Config config = new Antennas.Config();
config.TransmitPowerIndex = (ushort)myreader.TransmitPowerIndex;
config.TransmitFrequencyIndex = (ushort)myreader.TransmitFrequencyIndex;
config.ReceiveSensitivityIndex = (ushort)myreader.ReceiveSensitivityIndex;
myreader.ReaderAPI.Config.Antennas.SetConfig(config);

The problem is, it wont let me change TransmitPowerIndex or ReceiveSensitivityIndex apart from 0, the exception I get is "config value of out range"

If I run the antennas at default settings (without using the code above), they run at full power.

If I use the following settings:

Antennas.Config config = new Antennas.Config();
config.TransmitPowerIndex = 10;
config.TransmitFrequencyIndex = 1;
config.ReceiveSensitivityIndex = 0;
myreader.ReaderAPI.Config.Antennas.SetConfig(config);

Antennas run at a significantly low power,but this is too low for mysetting,If I want to change the powerindex to 20 for example,nothing changes.If I change the transmitfrequencyindex or the receivesensitivityindex to anything other than the values above,i get "config value out of range error".

How can I adjust the range of my antennas, based on some values on a linear basis? EMDK help files have no certain data on that unfortunately...


Solution

  • a little late, but better than never.

    Motorola uses a table to assign the power of the antennas. This table is located in this property:

    Symbol.RFID3.Reader MyReader;
    
    int[] table = MyReader.ReaderCapabilities.TransmitPowerLevelValues;
    

    Now, table is an array of int, the values are the power levels available for the antenna.

    For example, let's assume table contains 50 items.

    If you want the antenna at 50%:

    config.TransmitPowerIndex = 24;
    

    If you want the antenna at ~75%:

    config.TransmitPowerIndex = 36;
    

    If you want the antenna at 100%:

    config.TransmitPowerIndex = 49;
    

    Remember, you have to assign the INDEX of the value you want.

    Hope this helps somebody. Regards.