Skip to content

Commit aa149f2

Browse files
authored
Update BLE for version 2.0 (#42)
* Update BLE for version 2.0 * adjust * Update src/ble.md * Update src/ble.md
1 parent 76f7697 commit aa149f2

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

src/ble.md

+31-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@ If the gadget is unable to connect an error is returned. If the gadget required
2828

2929
The client is able to send an `identify` command to the Improv service if it is in the states "Require Authorization" and "Authorized". When received, and enabled, the gadget will identify itself, like playing a sound or flashing a light. It is up to the gadget to decide if and what interaction to pick.
3030

31-
## Bluetooth LE Service
31+
## Revision history
3232

33-
Service UUID: `00467768-6228-2272-4663-277478268000`
33+
- 1.0 - Initial release
34+
- 2.0 - Added Service Data `4677`
35+
36+
## GATT Services
3437

3538
### Characteristic: Capabilities
3639

@@ -145,3 +148,29 @@ This characteristic is where the client can read results from the RPC service if
145148
| X...Y | String 2 |
146149
| ... | etc |
147150
| last byte | Checksum - A simple sum checksum keeping only the LSB |
151+
152+
## Bluetooth LE Advertisement
153+
154+
The device MUST advertise the Service UUID.
155+
156+
Service UUID: `00467768-6228-2272-4663-277478268000`
157+
158+
With version 2.0 of the specification:
159+
160+
- The Service Data and Service UUID MUST be advertised periodically and when the state changes.
161+
- The Service Data and Service UUID MUST be in the same advertisement.
162+
- The Service Data and Service UUID MUST NOT be in the scan response or require active scans.
163+
- If the device cannot fit all of its advertising data in 31 bytes, it should cycle between advertising data.
164+
165+
### Service Data format
166+
167+
Service Data UUID: `4677` (`00004677-0000-1000-8000-00805f9b34fb`)
168+
169+
| Byte | Description |
170+
| --------- | ----------------------------------------------------- |
171+
| 1 | Current state |
172+
| 2 | Capabilities |
173+
| 3 | 0 (RESERVED) |
174+
| 4 | 0 (RESERVED) |
175+
| 5 | 0 (RESERVED) |
176+
| 6 | 0 (RESERVED) |

0 commit comments

Comments
 (0)