Read PointTutorial

RFID SDK for Android 2.0.2.82

Applicable Devices : FX7500 and FX9600.

Overview

This Tutorial provides a walk-through of the steps to perform get and enable read point 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 getting and enabling the read point.

Setting it up

The following are the steps to get and enable read point to the reader

  • Create Reader Management Object
  • Create a LoginInfo object and Login to the Reader.
  • Perform get and enable read point operation.

Creating a ReaderManagement object.


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

Creating a LoginInfo object and perform login operation.


//Creating a LoginInfo object and perform login operation.
    LoginInfo loginInfo = new LoginInfo("hostName", "userName", "password", SECURE_MODE.HTTP, false);
    try {
            readerManagement.login(loginInfo,READER_TYPE.FX);
        } catch (InvalidUsageException e) {
            e.printStackTrace();
        } catch (OperationFailureException e) {
           e.printStackTrace();
        }

Performing operation

Get Read Point Status.


// Get Read Point Status.
    try {
        READPOINT_STATUS rd= readerManagement.ReadPoint.getReadPointStatus((short) 2);
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }

Enable Read Point.


// Enable Read Point.
    try {
        READPOINT_STATUS rd= readerManagement.ReadPoint.getReadPointStatus((short) 2);
        readerManagement.ReadPoint.setReadPointStatus((short) 2,rd);
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }


Closer look

  • 2 : Antenna id of the reader.