(obnizOS 3 or later only)
Specifying onfind will be called or not when an advertisement received from already known peripheral. Default is false : never called again.
Timeout seconds of scanning. Default is 30 seconds.
If set null, scan don't stop automatically.
(obnizOS >= 3.2.0 only)
filters are apply on obniz device
True: filter on device and JavaScript.
False : filter on JavaScript only.
Default is false : filter on JavaScript only.
// Javascript Example
var target = {
localName: "obniz-BLE", //scan only has localName "obniz-BLE"
};
var setting = {
duration : 10, //scan duration time in seconds. default is 30 sec.
filterOnDevice: true
}
await obniz.ble.initWait();
await obniz.ble.scan.startWait(target, setting);
(ESP32 C3 or ESP32 S3)
True: Scan phy
False : Do not scan phy
Default is true : Scan phy
// Javascript Example
var target = {
localName: "obniz-BLE", //scan only has localName "obniz-BLE"
};
var setting = {
usePhy1m : false,
usePhyCoded: true
}
await obniz.ble.initWait();
await obniz.ble.scan.startWait(target, setting);
If only one of advertisement and scanResponse is coming, wait until both come.
True : wait for other data come until 10 seconds False : don't wait and notify immediately. some parameters will be null.
default : true
Generated using TypeDoc
(obnizOS 3 or later only)
Active scan or Passive Scan
Default is true : activeScan.