Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface BleConnectSetting

connect setting

Hierarchy

  • BleConnectSetting

Index

Properties

Optional autoDiscovery

autoDiscovery: undefined | false | true

Auto discovery on connection established.

true : auto discover services/characteristics/descriptors on connection established. false : don't discover automatically. Please manually.

Default is true;

If set false, you should manually discover services/characteristics/descriptors;

// Javascript Example
await obniz.ble.initWait({});
obniz.ble.scan.onfind = function(peripheral){
  if(peripheral.localName == "my peripheral"){
     await peripheral.connectWait({autoDiscovery:false});
     console.log("success");
     await peripheral.discoverAllServicesWait(); //manually discover
     let service = peripheral.getService("1800");

  }
}
await obniz.ble.scan.startWait();

Optional forceConnect

forceConnect: undefined | false | true

Force Connect

If you want to try to connect even when the connected flag is true.

Default: true

Optional mtuRequest

mtuRequest: null | number

Request mtu value.

If you want to try exchange specific mtu value, set this value. If set null, skip mtu exchange sequence.

Default : 256

Optional pairingOption

pairingOption: BlePairingOptions

Pairing Option

keys: Key acquired when pairing previously. onPairedCallback: A function that contains keys called when pairing is successful.

Optional retry

retry: undefined | number

Optional usePyh1m

usePyh1m: undefined | false | true

PHY used for connection

It was May connect using that PHY

Default : true

Optional usePyh2m

usePyh2m: undefined | false | true

PHY used for connection

It was May connect using that PHY

Default : true

Optional usePyhCoded

usePyhCoded: undefined | false | true

PHY used for connection

It was May connect using that PHY

Default : true

Optional waitUntilPairing

waitUntilPairing: undefined | false | true

Generated using TypeDoc