5 The following shows ble module APIs available for each platform.
7 | | Linux<br/>(Ubuntu) | Raspbian<br/>(Raspberry Pi) | Nuttx<br/>(STM32F4-Discovery) |
8 | :---: | :---: | :---: | :---: |
9 | ble.startAdvertising | O | O | X |
10 | ble.stopAdvertising | O | O | X |
11 | ble.setServices | O | O | X |
16 * `callback: Function(state)`
18 * `state: String` - "unknown" | "resetting" | "unsupported" | "unauthorized" | "poweredOff" | "poweredOn"
20 Emitted when adapter state is changed.
25 #### ble.startAdvertising(name, serviceUuids[, callback(error)])
26 * `name: String` - maximum 26 bytes
27 * `serviceUuids: Array`
28 * 1 128-bit service UUID
29 * 1 128-bit service UUID + 2 16-bit service UUIDs
30 * 7 16-bit service UUID
31 * `callback: Function(error)`
35 ble.state must be poweredOn before advertising is started.
36 ble.on('stateChange', callback(state)); can be used register for state change events.
39 #### ble.stopAdvertising(callback)
40 * `callback: Function()`