FXR90-Connect Tutorial

RFID SDK for Android 2.0.2.124

Applicable Devices : FXR90

Overview

This Tutorial provides a walk-through of the steps to perform Login 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

Login API allows the users to authenticate themselves before making changes on the reader. To change any settings on the reader, performing a login is mandatory. When a login is forced, it will logout any previously active session.

Setting it up

The following are the steps to login into the reader

  • Create RFIDReader Object with appropriate params
  • Set Reader password
  • Set secure connection type

Create RFIDReader Object


// create and initialize the Reader Management object.
    
	 mReader = new RFIDReader(hostName,ZIOTCport, timeoutMilliSeconds, "ZIOTC", "ZIOTC");
                                                                                                      
                                                

Performing operation

Simple Login with HTTP.



try {
mReader.setPassword(password);
mReader.secureConnection(false);  ( true if you want perform secure connection)
      	mReader.connect();

        } catch (InvalidUsageException e) {
            e.printStackTrace();
        } catch (OperationFailureException e) {
           e.printStackTrace();
        }

Closer look

  • hostname: Reader hostname or the IP address.
  • username: Reader admin username. This is “admin” by default.
  • Password: The password to be used to login as admin.
  • SecureMode Flag: This should be set to SECURE_MODE.HTTPS if the reader is in HTTPS mode and SECURE_MODE.HTTP otherwise.
  • `forceLogin: When set to true the login will succeed even if there is another active session. Else login will fail if there is another active session