9a66ff08-0800-9191-11e4-012d1540cb8e
or 0xFF08
battery_service
or 0x180F
blood_pressure
or 0x1810
weight_scale
or 0x181D
Unknown Service in most cases, although there are 35 standard ones.
battery_level
or 0x2A19
waist_circumference
or 0x2A97
sport_type_for_aerobic_and_anaerobic_thresholds
Unknown Characteristic in most cases, although there are 179 standard ones.
navigator.bluetooth.requestDevice({
filters: [{ name: 'Bulb' }],
optionalServices: [0xFF08]
}).then(device => {
return device.gatt.connect();
}).then(server)
.then(server => {
return server.getPrimaryService(0xFF08);
}).then(service => {
return service.getCharacteristic(0xFFFC);
}).then(characteristic)
<input type="text"
pattern="^#(?:[0-9a-fA-F]{3}){1,2}$"
required value="#FFF">
<script>
if (event.target.checkValidity()) {
// …
</script>
.then(characteristic => {
return characteristic.writeValue(
new Uint8Array([0, 255, 0, 0])
);
});
const LAMP_EFFECT = [ 0x00, // ?
0xFF, // Red
0xFF, // Green
0xFF, // Blue
0x03, // Type
0x00, // ?
0x06, 0x06 // Speed ];