Peripheral instance.
This is same as obniz.ble.peripheral
It is uuid as string.
console.log(attr.uuid); // => '4C84'
advertisment object for BleAdvertisement.setAdvData
// Javascript Example
await obniz.ble.initWait();
var service = new obniz.ble.service({ uuid : "1234" });
var characteristic = new obniz.ble.characteristic({ uuid : "7777", data: [1, 2, 3]});
service.addCharacteristic(characteristic);
obniz.ble.peripheral.addService(service);
obniz.ble.advertisement.setAdvData(service.advData);
obniz.ble.advertisement.setScanRespData({
localName : "obniz BLE",
});
obniz.ble.advertisement.start();
Add new Characteristic
Terminate created service
// Javascript Example
await obniz.ble.initWait();
var service = new obniz.ble.service({ uuid : "1234" });
var characteristic = new obniz.ble.characteristic({ uuid : "7777", data: [1, 2, 3]});
service.addCharacteristic(characteristic);
obniz.ble.peripheral.addService(service);
service.end();
Get Characteristic
Generated using TypeDoc