TwclBluetoothLeBeaconWatcher.Start(TwclBluetoothRadio,TwclBluetoothLeScanningMode,Word,Word) Method

Starts monitoring for Bluetooth LE Beacons.

Namespace: wclBluetooth
public
 function Start(const Radio: TwclBluetoothRadio;
 const ScanningMode: TwclBluetoothLeScanningMode = smActive;
 const ScanInterval: Word = WCL_BLE_DEFAULT_SCAN_INTERVAL;
 const ScanWindow: Word = WCL_BLE_DEFAULT_SCAN_WINDOW): Integer;

Parameters

Radio
Type: TwclBluetoothRadio

The TwclBluetoothRadio object used to communicate with a remote Bluetooth device.

ScanningMode
Type: TwclBluetoothLeScanningMode

Specifies the Bluetooth LE scanning mode.

ScanInterval
Type: Word

Specifies the Bluetooth LE scan in 0.625 ms units. The value must be in range between WCL_BLE_MIN_SCAN_INTERVAL and WCL_BLE_MAX_SCAN_INTERVAL. The default value is WCL_BLE_DEFAULT_SCAN_INTERVAL.

ScanWindow
Type: Word

Specifies the Bluetooth LE scan window in 0.625 ms units. The value must be in range between WCL_BLE_MIN_SCAN_WINDOW and WCL_BLE_MAX_SCAN_WINDOW. The default value is WCL_BLE_DEFAULT_SCAN_WINDOW. The scan window must be less or equal to ScanInterval.

Return Value

Type: Integer

If the function succeed the return value is wclErrors.WCL_E_SUCCESS. Otherwise the method returns one of the WCL error codes.

This feature is supported on Windows 10 with the Microsoft Bluetooth drivers only. If the method returns error try to call this method with default scan parameters.