AmazonFreeRTOSDevice

public class AmazonFreeRTOSDevice : NSObject

FreeRTOS device.

  • CBPeripheral.

    Declaration

    Swift

    public var peripheral: CBPeripheral
  • advertisementData.

    Declaration

    Swift

    public var advertisementData: [String : Any]?
  • rssi.

    Declaration

    Swift

    public var RSSI: NSNumber?
  • FreeRTOS device should auto reconnect on non-explicit disconnect.

    Declaration

    Swift

    public var reconnect: Bool
  • Declaration

    Swift

    public var certificateId: String?
  • The credentialsProvider used to connect like AWSMobileClient for Cognito.

    Declaration

    Swift

    public var credentialsProvider: AWSCredentialsProvider?
  • Afr Version of the device.

    Declaration

    Swift

    public var afrVersion: String?
  • The brokerEndpoint on the device.

    Declaration

    Swift

    public var brokerEndpoint: String?
  • mtu

    The MTU of the device.

    Declaration

    Swift

    public var mtu: Int?
  • Afr Platform of the device.

    Declaration

    Swift

    public var afrPlatform: String?
  • Afr device id.

    Declaration

    Swift

    public var afrDevId: String?
  • The saved networks.

    Declaration

    Swift

    public var savedNetworks: [ListNetworkResp]
  • The scaned networks.

    Declaration

    Swift

    public var scanedNetworks: [ListNetworkResp]
  • Initializes a new FreeRTOS device.

    Declaration

    Swift

    public init(peripheral: CBPeripheral)

    Parameters

    peripheral

    The CBPeripheral.

    Return Value

    A new FreeRTOS device.

  • Connect to the FreeRTOS device.

    Precondition

    central is ready and device must be disconnected, otherwise it will be ignored.

    Declaration

    Swift

    public func connect(reconnect: Bool, certificateId: String? = nil, credentialsProvider: AWSCredentialsProvider? = nil)

    Parameters

    reconnect

    FreeRTOS device should auto reconnect on non-explicit disconnect.

    certificateId
    credentialsProvider

    The credentialsProvider used to connect like AWSMobileClient for Cognito.

  • Disconnect from the FreeRTOS device.

    Precondition

    central is ready and device must be connected, otherwise it will be ignored.

    Declaration

    Swift

    public func disconnect()
  • Get afrVersion of the FreeRTOS device.

    Declaration

    Swift

    public func getAfrVersion()
  • Get mqtt broker endpoint of the FreeRTOS device.

    Declaration

    Swift

    public func getBrokerEndpoint()
  • Get BLE mtu of the FreeRTOS device.

    Declaration

    Swift

    public func getMtu()
  • Get afrPlatform of the FreeRTOS device.

    Declaration

    Swift

    public func getAfrPlatform()
  • Get afrDevId of the FreeRTOS device.

    Declaration

    Swift

    public func getAfrDevId()
  • List saved and scanned wifi networks of device. Wifi networks are returned one by one, saved wifi ordered by priority and scanned wifi ordered by signal strength (rssi).

    Declaration

    Swift

    public func listNetwork(_ listNetworkReq: ListNetworkReq)

    Parameters

    listNetworkReq

    The list network request.

  • Save wifi network to device.

    Declaration

    Swift

    public func saveNetwork(_ saveNetworkReq: SaveNetworkReq)

    Parameters

    saveNetworkReq

    The save network request.

  • Edit wifi network of device. Currently only support priority change.

    Declaration

    Swift

    public func editNetwork(_ editNetworkReq: EditNetworkReq)

    Parameters

    editNetworkReq

    The edit network request.

  • Delete saved wifi network from device.

    Declaration

    Swift

    public func deleteNetwork(_ deleteNetworkReq: DeleteNetworkReq)

    Parameters

    deleteNetworkReq

    The delete network request.