BLE

BLE Class Reference
BLE API Reference

BLE stands for Bluetooth Low Energy and is a type of Bluetooth.
Its features are as follows:

  • Relatively low power wireless.
  • A connection mode without pairing is available.
  • Basically use a profile of GATT, and the other party is used like a database.
  • Multiple slave devices can be connected to one master device.
  • Quite popular with smartphones, so can be used from most smartphones.

If the device supports BLE, you can use it from obniz.
This makes it possible to extract the value from lightning or smart watch that uses BLE, or connect them from a smartphone.

Central / Peripheral

The communication of BLE is one-to-many, and there is a master device. Master is called "central" and slave called "peripheral."

obniz work as either central or peripheral; switching after setting is possible. The signal strength and the number of devices that can be connected at the same time depends on the version of obnizOS.

Initialization

Call ble.initWait() once to initialize and start BLE. Some devices may consume more power due to the use of BLE than when it is not used.

// Javascript Example

obniz.ble.initWait();

Articles