Skip to content

Commit 6531f80

Browse files
yinzaraballoob
andauthored
Add Device Info to BLE specification (#56)
* Add Device Info to BLE specification * Update src/ble.md Change an to a Co-authored-by: Paulus Schoutsen <[email protected]> --------- Co-authored-by: Paulus Schoutsen <[email protected]>
1 parent 83a5540 commit 6531f80

File tree

1 file changed

+33
-5
lines changed

1 file changed

+33
-5
lines changed

src/ble.md

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,15 @@ If the gadget is unable to connect an error is returned. If the gadget required
2626

2727
![Improv State machine](/images/improv-states.svg)
2828

29-
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.
29+
The client is able to send an `identify` 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.
30+
31+
The client is able to send a `device info` to the Improv service if it is in the states "Require Authorization" and "Authorized". When received, and supported, the gadget will return the device information in the RPC response characteristic.
3032

3133
## Revision history
3234

3335
- 1.0 - Initial release
3436
- 2.0 - Added Service Data `4677`
37+
- 2.1 - Added Device Info RPC command
3538

3639
## GATT Services
3740

@@ -41,9 +44,12 @@ Characteristic UUID: `00467768-6228-2272-4663-277478268005`
4144

4245
This characteristic has binary encoded byte(s) of the device’s capabilities.
4346

44-
| Bit (LSB) | Capability |
45-
| --------- | ---------------------------------------------- |
46-
| `0` | 1 if the device supports the identify command. |
47+
| Bit (LSB) | Capability |
48+
|-----------|---------------------------------------------------|
49+
| `0` | 1 if the device supports the identify command. |
50+
| `1` | 1 if the device supports the device info command. |
51+
52+
So 0x01 means the device supports identify and 0x03 means the device supports identify and device info while 0x02 means the device supports identify only.
4753

4854
### Characteristic: Current State
4955

@@ -132,6 +138,28 @@ Should only be sent if the capability characteristic indicates that identify is
132138

133139
This command has no RPC result.
134140

141+
#### RPC Command: Device Info
142+
143+
Sends a request for the device to send information about itself.
144+
145+
Command ID: `0x03`
146+
147+
Does not require the Improv service to be authorized.
148+
149+
Should only be sent if the capability characteristic indicates that device info is supported.
150+
151+
| Byte | Description |
152+
|------| ---------------------- |
153+
| 03 | command |
154+
| 00 | 0 data bytes / no data |
155+
| CS | checksum |
156+
157+
This command will generate an RPC result. There will be at least 4 entries in the list response.
158+
159+
Order of strings: Firmware name, firmware version, hardware chip/variant, device name.
160+
161+
Example: `ESPHome`, `2021.11.0`, `ESP32-C3`, `Temperature Monitor`.
162+
135163
### Characteristic: RPC Result
136164

137165
Characteristic UUID: `00467768-6228-2272-4663-277478268004`
@@ -155,7 +183,7 @@ The device MUST advertise the Service UUID.
155183

156184
Service UUID: `00467768-6228-2272-4663-277478268000`
157185

158-
With version 2.0 of the specification:
186+
With version 2.1 of the specification:
159187

160188
- The Service Data and Service UUID MUST be advertised periodically and when the state changes.
161189
- The Service Data and Service UUID MUST be in the same advertisement.

0 commit comments

Comments
 (0)