Firmware Tutorial

RFID SDK for Android 2.0.2.94

Applicable Devices : FX7500 and FX9600.

Overview

This Tutorial provides a walk-through of the steps to update firmware 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 updating firmware through url based or file based.

Setting it up

The following are the steps to update the firmware

  • Create Reader Management Object
  • Create a LoginInfo object and Login to the Reader.
  • Create SoftwareUpdateInfo object for adding th host name, username, password.
  • Perform update firmware operations.

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

Url based update.


// Url based update.
    SoftwareUpdateInfo sofupinfo = new SoftwareUpdateInfo();
    sofupinfo.setHostName("ftpurl");
    sofupinfo.setUserName("username");
    sofupinfo.setPassword("password");
    try {
        readerManagement.getSoftwareUpdate().Update(sofupinfo);
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }

File based update.


// File based update.
    SoftwareUpdateInfo sofupinfo = new SoftwareUpdateInfo();
    sofupinfo.setHostName("ftpurl");
    sofupinfo.setUserName("username");
    sofupinfo.setPassword("");
    try {
        readerManagement.getSoftwareUpdate().Update(sofupinfo);
    } catch (InvalidUsageException e) {
        e.printStackTrace();
    } catch (OperationFailureException e) {
        e.printStackTrace();
    }

Closer look

  • ftpurl : firmware ftp url.
  • username : ftp url user name.
  • password : ftp url password.