Bluetooth LE (BLE)


The BleScanParams structure specifies the settings for scanning on a central device.

uint16_t version;
uint16_t size;
uint16_t interval;
uint16_t window;
uint16_t timeout; uint8_t active;
uint8_t filter_policy;

BleScanParams scanParams;
scanParams.version = BLE_API_VERSION;
scanParams.size = sizeof(BleScanParams);
int res = BLE.getScanParameters(&scanParams);
  • version Always set to BLE_API_VERSION.
  • size Always set to sizeof(BleScanParams).
  • interval Advertising interval in 0.625 ms units. Default is 160.
  • window Scanning window in 0.625 ms units. Default is 80.
  • timeout Scan timeout in 10 ms units. Default value is 500.
  • active Boolean value, typically 1.
  • filter_policy Default is 0.