BKDiscoverySettings

open class BKDiscoverySettings : NSObject

Property set of settings to configure the discovering process.

The DiscoverySettings properties are affecting the discovery process that is started by BKClient.initDiscovery() and the BKDiscoveryData contents of the result delegate.

You can access the DiscoverySettings by BKClient.discoverySettings

Every setting value is writeable and has a default value that is used if not changed by the developer.

RSSI

  • Maximum value for rssi threshold: -20

    Declaration

    Swift

    public let RSSI_MAX: Int
  • Minimum value for rssi threshold: -120

    Declaration

    Swift

    public let RSSI_MIN: Int
  • Default value for rssi threshold: -85

    Declaration

    Swift

    public let RSSI_DEFAULT: Int
  • Gets the rssi threshold for the discovery.

    BLE modules with a higher rssi value will be discovered only.

    Declaration

    Swift

    open func getRssiThreshold() -> Int

    Return Value

    rssi threshold value, default is RSSI_DEFAULT

  • Sets the rssi threshold for the discovery.

    BLE modules with a higher rssi value will be discovered only.

    The valid range for the rssi threshold is limited by RSSI_MIN and RSSI_MAX

    Declaration

    Swift

    open func setRssiThreshold(_ rssiThreshold: Int)
  • The state if discovery should calculate the average RSSI of all scanned frames.

    Otherwise the last found RSSI Value is returned on BKDiscoveryData.getRssi()

    Default value is true

    Declaration

    Swift

    open var calculatingRssiAverage: Bool

    Return Value

    true, if Rssi average is calculated

Scan Options

  • Scan duration of one discovery phase: 5000 milliseconds.

    Declaration

    Swift

    public let SCANDURATION_DEFAULT: Int
  • Value of the duration of one discovery phase in milliseconds. Default is SCANDURATION_DEFAULT

    After the scan duration has finished all scanned BLE data is saved into a list of BKOutputElement and returned by delegate BKClientDiscoveryDelegate.onDiscoveryResult(_:)

    Declaration

    Swift

    open var scanDuration: Int
  • Scan Wait duration between two discovery phase: 15000 milliseconds

    Declaration

    Swift

    public let SCANWAITDURATION_DEFAULT: Int
  • Value of the waiting time between two discovery phase in milliseconds. Default is SCANWAITDURATION_DEFAULT

    Declaration

    Swift

    open var scanWaitDuration: Int
  • Default Value for disableWaitTimeAtStartForTime

    Declaration

    Swift

    public let DISABLESCANWAITTIMEATSTARTFORTIME_DEFAULT: Int
  • Value of the Time in seconds, wich the scanWaitDuration will be disabled, at the start of a scan. Default is DISABLESCANWAITTIMEATSTARTFORTIME_DEFAULT

    Declaration

    Swift

    open var disableScanWaitTimeAtStartForTime: Int
  • Enables / Disables Background scanning.

    Background mode: If the app change to the background, the scan will not stop. Conditions:

    • capabilities -> Background Modes -> Location Update -> enable
    • capabilities -> Background Modes -> Use Bluetooth LE accessoires -> enable
    • info.plist: Enter a value for NSLocationAlwaysUsageDescription

    For power saving BLE scan is only in a iBeacon region active (Default-Region: 626c756b-6969-2e63-6f6d-6576656e7473) . If you want to scan an InfoBeacon in Background, you have to configure the blukii smartBeacon in Multimode, so that the blukii smartBeacon send iBeacon an infoBeacon protocol.

    Declaration

    Swift

    open var scanInBackground: Bool { get set }
  • State if the scan wait duration between two discovery phases is disabled on background. Default value is false

    Declaration

    Swift

    open var scanContinuouslyOnBackground: Bool
  • Sate if the scan wait duration between two discovery phases is disabled on foreground. Default value is true

    Declaration

    Swift

    open var scanContinuouslyOnForeground: Bool
  • Value, if discovery should scan for non blukii BLE modules.

    Note: The majority of BKDiscoveryData data is only supported for blukii modules: BKBeaconSensorData, BKInfoData and some value of BKDiscoveryData. BKEddystoneData and BKiBeaconData is also supported for non blukii modules.

    Default value is false

    Declaration

    Swift

    open var scanNonBlukiis: Bool
  • the state if discovery should scan for basic blukii data like firmware, advertising interval, etc.

    default is true

    Declaration

    Swift

    open var scanBlukiiData: Bool
  • Sets the stat if discovery should scan for sensor data of blukii beacons.

    If this flag is set BKDiscoveryData may contain a valid BKBeaconSensorData object.

    Note: This flag is only relevant for blukii beacons

    Default value is true

    Declaration

    Swift

    open var scanBeaconSensorData: Bool
  • Sets the state if discovery should scan for Eddystone data.

    If this flag is set BKDiscoveryData may contain a valid BKEddystoneData object.

    Default value is false

    Declaration

    Swift

    open var scanEddystoneData: Bool
  • Set the state if discovery should scan for iBeacon data.

    If this flag is set BKDiscoveryData may contain a valid BKiBeaconData object.

    Note: For scanning iBeacons in the info.plist it is reuqiered to enter a value for NSLocationAlwaysUsageDescription.

    Default value is false

    Declaration

    Swift

    open var scanIBeaconData: Bool
  • Default Value iBeacon UUID Regions

    Values:

    • 01234567-89AB-CDEF-0123-000000000001: old blukii Default
    • 626c756b-6969-2e63-6f6d-6576656e7473: new blukii Default

    Declaration

    Swift

    @available(*, deprecated, message: "Please use ibeaconRegionsDefault(﹚")
    public let IBEACONREGIONS_DEFAULT: [String]
  • Default Value iBeacon UUID Regions

    Values:

    Declaration

    Swift

    open func ibeaconRegionsDefault() -> [CLBeaconRegion]

    Return Value

    The default Values for blukii beacons

  • Set the for detection of secureBeacon UUID

    This UUID must also be set at setScanIBeaconRegions(regions:) for detection of the secureBeacon

    Declaration

    Swift

    open var securebeaconUUID: UUID
  • Set the Regions that will be scanned by the Discovery Service.

    Default Value is IBEACONREGIONS_DEFAULT

    Note: You can Use the setScanIBeaconRegions(regions: [CLBeaconRegion]) function or this function If both functions are set, the last one is taken.

    Declaration

    Swift

    @available(*, deprecated, message: "Please use setScanIBeaconRegions(regions: [CLBeaconRegion]﹚")
    open func setScanIBeaconRegions(regionStrings regions: [String])

    Parameters

    regions

    Array with Region IDs

  • Get the Regions that will be scanned by the Discovery Service.

    Declaration

    Swift

    open func getScanIBeaconRegions() -> [CLBeaconRegion]

    Return Value

    Array with the Region UUID as String

  • Set teh Regions that will be scanned by teh Discovery Service

    Default is ibeaconRegionsDefault()

    Note: You can Use this function or the function setScanIBeaconRegions(regionStrings:) If both functions are set, the last one is taken.

    Declaration

    Swift

    open func setScanIBeaconRegions(regions: [CLBeaconRegion])

    Parameters

    regions

    Array with Region IDs