Enable Automatic Communication Session Reestablishment

Applicable Devices : RFD40, RFD90, RFD8500

Overview

Enables the SDK to automatically re-establish the communication session with the last active RFID reader that disappeared unexpectedly, using srfidEnableAutomaticSessionReestablishment.

Details

The SDK supports “Automatic communication session reestablishment” option. When the option is enabled the SDK will automatically establish a logical communication session with the last active RFID reader that had unexpectedly disappeared once the RFID reader will be recognized as available. If “Available readers detection” option is enabled the RFID reader will be recognized as available automatically when it becomes connected via Bluetooth. Otherwise the SDK will add the RFID reader to the list of available RFID readers only during discovery procedure requested by the application via srfidGetAvailableReadersList API. The option has no effect if the application has intentionally terminate a communication session with the active RFID reader via srfidTerminateCommunicationSession API function. The “Automatic communication session reestablishment” option is configured via srfidEnableAutomaticSessionReestablishment API function


-(void)enableAutomaticSessionReestablishment {
    SRFID_RESULT result = [apiInstance srfidEnableAutomaticSessionReestablishment:YES];

    if (SRFID_RESULT_SUCCESS == result) {
        NSLog(@"Automatic session reestablishment enabled");
    } else {
        NSLog(@"Failed to enable automatic session reestablishment: %d", result);
    }
}