Antenna Configurations Tutorial

RFID SDK for Android 2.0.2.82

Applicable Devices : ALL

Overview

This Tutorial provides a walk-through of the steps to perform Antenna configuration using RFID3 API

Create The Project

  • Start by creating a new project in Android Studio. For help, see the Android Studio tutorial.
  • Refer Hello RFID to prepare basic setup to work with RFID Reader and then follow this guide

Details

The config class contains the Antennas object. The AntennaProperties is used to set the antenna configuration to individual antenna or all the antennas. The antenna configuration (SetAntennaConfig function) is comprised of Antenna ID, Transmit Power Index. These indexes are refers to the Transmit Power table, Tari Frequency Hop table, or Fixed Frequency table respectively. These tables are available in Reader capabilities.getAntennaConfig function gets the antenna configuration for the given antenna ID.

Setting it up

Declarations and API calls to setup configuration

  • RF Configuration
  • The function setAntennaRfConfig is added to configure antenna RF configuration to individual antenna. This function is similar to setAntennaConfig but includes additional parameters specific pertaining to antenna. The configuration includes, Transmit Power Index, tari and RF Mode Table Index. These indexes are refers to the Transmit Power table, Tari and RF Mode table respectively. These tables are available in Reader capabilities. The function getAntennaRfConfig gets the antenna RF configuration for the given antenna ID.


try {
    // get the configuration                                                
    Antennas.AntennaRfConfig antennaRfConfig = reader.Config.Antennas.getAntennaRfConfig(1); 
    antennaRfConfig.setrfModeTableIndex(0); 
    antennaRfConfig.setTari(0); 
    antennaRfConfig.setTransmitPowerIndex(270); 
    // set the configuration
    reader.Config.Antennas.setAntennaRfConfig(1,antennaRfConfig);
} catch (OperationFailureException ex) {
    Log.d(TAG, (" Antenna configuration failed " + ex.getVendorMessage()));
}

Closer look

  • Get the reader supported power levels for particular regulatory using reader.ReaderCapabilities.getTransmitPowerLevelValues()
  • setrfModeTableIndex sets particular link profile as provided by Reader.ReaderCapabilities.RFModes.getRFModeTableInfo(0) and supported for specific regulatory. In general default link profile is always referred to index 0

What's Next

  • Change setTransmitPowerIndex values to move between different power levels
  • Use setrfModeTableIndex to use different link profiles suited for use case.