Skip to content

Commit

Permalink
Update BLE for version 2.0 (#42)
Browse files Browse the repository at this point in the history
* Update BLE for version 2.0

* adjust

* Update src/ble.md

* Update src/ble.md
  • Loading branch information
bdraco authored Nov 3, 2023
1 parent 76f7697 commit aa149f2
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions src/ble.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ If the gadget is unable to connect an error is returned. If the gadget required

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.

## Bluetooth LE Service
## Revision history

Service UUID: `00467768-6228-2272-4663-277478268000`
- 1.0 - Initial release
- 2.0 - Added Service Data `4677`

## GATT Services

### Characteristic: Capabilities

Expand Down Expand Up @@ -145,3 +148,29 @@ This characteristic is where the client can read results from the RPC service if
| X...Y | String 2 |
| ... | etc |
| last byte | Checksum - A simple sum checksum keeping only the LSB |

## Bluetooth LE Advertisement

The device MUST advertise the Service UUID.

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

With version 2.0 of the specification:

- The Service Data and Service UUID MUST be advertised periodically and when the state changes.
- The Service Data and Service UUID MUST be in the same advertisement.
- The Service Data and Service UUID MUST NOT be in the scan response or require active scans.
- If the device cannot fit all of its advertising data in 31 bytes, it should cycle between advertising data.

### Service Data format

Service Data UUID: `4677` (`00004677-0000-1000-8000-00805f9b34fb`)

| Byte | Description |
| --------- | ----------------------------------------------------- |
| 1 | Current state |
| 2 | Capabilities |
| 3 | 0 (RESERVED) |
| 4 | 0 (RESERVED) |
| 5 | 0 (RESERVED) |
| 6 | 0 (RESERVED) |

0 comments on commit aa149f2

Please sign in to comment.