Cable Loss Compensation Tutorial

RFID SDK for Android 2.0.4.192

Applicable Devices : FXR90.

Overview

This Tutorial provides a walk-through of the steps to perform get and set cable loss compensation operations 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

This tutorial will describe the apis for setting and getting the cable loss compensation.

Setting it up

The following are the steps to get and set cable loss compensation to the reader

  • Create Reader Management Object
  • Perform get and set cable loss compensationoperations.

// create and initialize the Reader Management object.
ReaderManagement readerManagement = new ReaderManagement(); 

                                               

Performing operation

Get Cable Loss Compensation.


// Get Cable Loss Compensation.
    try {
        CableLossCompensation cableLossCompensation = mReader.Config.getCableLossCompensation(1);
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }



Set Cable Loss Compensation.


// Set Cable Loss Compensation.
    try {
        CableLossCompensation cl = new CableLossCompensation();
        cl.setCableLossPer100Feet(10);
        cl.setCableLengthInFeet(20);
        cl.setAntennaID(1);
        mReader.Config.setCableLossCompensation(new CableLossCompensation[]{cl});
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }


Closer look

Antenna id of the reader