IPWorks BLE 2020 Delphi Edition

Questions / Feedback?

ActiveScanning Property

Whether to use active scanning.

Syntax

property ActiveScanning: Boolean read get_ActiveScanning write set_ActiveScanning;

Default Value

false

Remarks

When enabled, the component will instruct the system to use active scanning rather than passive scanning, at the cost of higher power consumption.

Active scanning causes the system's BLE API to request a scan response packet for each advertisement received, which in turn means that you will be able to get more information from devices without connecting to them.

The tradeoff is that enabling this feature increases power consumption for both the client and server, but if your use-case doesn't call for ever actually connecting to the devices (which itself can be a power-intensive operation), then that tradeoff might be mitigated.

Note that you cannot change the value of the ActiveScanning property if the component is already scanning.

Active Scanning

// Enable active scanning.
bleclient1.ActiveScanning = true;
bleclient1.StartScanning("");
// ...
bleclient1.StopScanning();

This property is not available at design time.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks BLE 2020 Delphi Edition - Version 20.0 [Build 8158]