parent
198f423f5a
commit
7bc7d2f2ff
19
docs/device/bluetooth/hf2.md
Normal file
19
docs/device/bluetooth/hf2.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Bluetooth HF2
|
||||||
|
|
||||||
|
The Bluetooth HF2 service implements a subset of [HF2](https://github.com/Microsoft/uf2/blob/master/hf2.md), namely the serial message logging.
|
||||||
|
|
||||||
|
## Service
|
||||||
|
|
||||||
|
### HF2 service
|
||||||
|
|
||||||
|
* UUID: ``b112f5e6-2679-30da-a26e-0273b6043849``
|
||||||
|
|
||||||
|
### TX Characteristic
|
||||||
|
|
||||||
|
* Optional
|
||||||
|
* UUDI: ``b112f5e6-2679-30da-a26e-0273b604384a``
|
||||||
|
* NOTIFY only
|
||||||
|
|
||||||
|
This characteristic mostly emits HF2 serial messages. The first byte contains the type of message and length in the lower 6 bits. The message contains up to 19 bytes.
|
||||||
|
|
||||||
|
This service is supported by the MakeCode editor to receive messages.
|
@ -7,7 +7,7 @@ BLEHF2Service::BLEHF2Service(BLEDevice &_ble) :
|
|||||||
ble(_ble)
|
ble(_ble)
|
||||||
{
|
{
|
||||||
GattCharacteristic txCharacteristic(BLEHF2TxCharacteristicUUID, (uint8_t *)&txCharacteristicMessage, 0,
|
GattCharacteristic txCharacteristic(BLEHF2TxCharacteristicUUID, (uint8_t *)&txCharacteristicMessage, 0,
|
||||||
sizeof(txCharacteristicMessage), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_READ | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);
|
sizeof(txCharacteristicMessage), GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY);
|
||||||
|
|
||||||
// Initialise our characteristic values.
|
// Initialise our characteristic values.
|
||||||
memset(&txCharacteristicMessage, 0, sizeof(txCharacteristicMessage));
|
memset(&txCharacteristicMessage, 0, sizeof(txCharacteristicMessage));
|
||||||
|
Loading…
Reference in New Issue
Block a user