BLESetupManager

public class BLESetupManager : NSObject

Manager used to setup a gateway via Bluetooth LE

  • Reference to the class that implemented the delegate protocol

    Declaration

    Swift

    public var delegate: BLESetupManagerDelegate?
  • Enum representing errors that occur while setting up the gateway

    Declaration

    Swift

    public enum SetupError : Error
  • Enum representing the state of gateway setup

    Declaration

    Swift

    public enum Status
  • Returns all the available networks nearby the gateway

    Declaration

    Swift

    public func getAvailableNetworks(completion: @escaping ([SPNetwork]?, Error?) -> Void)
    Parameters
    completion

    Completion handler that returns all the SPNetwors (if there are any) or an error

  • Connects the gateway to the provided SPNetwork

    Declaration

    Swift

    public func connect(to network: SPNetwork, password psk: String?)
    Parameters
    network

    The SPNetwork to which the gateway should be connected

    psk

    The WPA passkey of the network (if required)

  • Initiates the search for nearby gateways

    Declaration

    Swift

    public func getGateway(completion: @escaping (Error?) -> Void)
    Parameters
    completion

    Completion handler (returns an error, if there is one)