Bluetooth LE (BLE)



Since 3.0.0:

The BLEScanFilter object is used with BLE.scanWithFilter() to return a subset of the available BLE peripherals near you.

deviceName (BLEScanFilter)

BLEScanFilter::deviceName, deviceName, BLEScanFilter.deviceName, BLEScanFilter::deviceNames, deviceNames, BLEScanFilter.deviceNames

template<typename T>
BleScanFilter& deviceName(T name);
BleScanFilter& deviceNames(const Vector<String>& names);
const Vector<String>& deviceNames() const;

You can match on device names. You can call deviceName() more than once to add more than one device name to scan for. Or you can use deviceNames() to pass in a vector of multiple device names in a single call.

serviceUUID (BLEScanFilter)

BLEScanFilter::serviceUUID, serviceUUID, BLEScanFilter.serviceUUID, BLEScanFilter::serviceUUIDs, serviceUUIDs, BLEScanFilter.serviceUUIDs

template<typename T>
BleScanFilter& serviceUUID(T uuid);
BleScanFilter& serviceUUIDs(const Vector<BleUuid>& uuids);
const Vector<BleUuid>& serviceUUIDs() const;

You can match on service UUIDs. You can call serviceUUID() more than once to add more than one UUID to scan for. Or you can use serviceUUIDs() to pass in a vector of multiple UUIDs in a single call. You can match both well-known and private UUIDs.

address (BleScanFilter)

BLEScanFilter::address, address, BLEScanFilter.address, BLEScanFilter::addresses, addresses, BLEScanFilter.addresses

template<typename T>
BleScanFilter& address(T addr);
BleScanFilter& addresses(const Vector<BleAddress>& addrs);
const Vector<BleAddress>& addresses() const;

You can match on BLE addresses. You can call address() more than once to add more than one UUID to scan for. Or you can use addresses() to pass in a vector of multiple addresses in a single call.

appearance (BleScanFilter)

BLEScanFilter::appearance, appearance, BLEScanFilter.appearance, BLEScanFilter::apperances, apperances, BLEScanFilter.apperances

BleScanFilter& appearance(const ble_sig_appearance_t& appearance);
BleScanFilter& appearances(const Vector<ble_sig_appearance_t>&  appearances);
const Vector<ble_sig_appearance_t>& appearances() const;

You can match on BLE apperance codes. These are defined by the BLE special interest group for clases of devices with known characteristics, such as BLE_SIG_APPEARANCE_THERMOMETER_EAR or BLE_SIG_APPEARANCE_GENERIC_HEART_RATE_SENSOR.

You can call appearance() more than once to add more than one appearance scan for. Or you can use apperances() to pass in a vector of multiple apperances in a single call.

rssi (BleScanFilter)

BLEScanFilter::minRssi, minRssi, BLEScanFilter.minRssi, BLEScanFilter::maxRssi, maxRssi, BLEScanFilter.maxRssi

BleScanFilter& minRssi(int8_t minRssi);
BleScanFilter& maxRssi(int8_t maxRssi);
int8_t minRssi() const;
int maxRssi() const;

You can require a minimim of maximum RSSI to the peripipheral to be included in the scan list.

customData (BleScanFilter)

BLEScanFilter::customData, customData, BLEScanFilter.customData

BleScanFilter& customData(const uint8_t* const data, size_t len);
const uint8_t* const customData(size_t* len) const;

You can require custom advertising data to match the specified data.