We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83922fb commit 4fddf93Copy full SHA for 4fddf93
4 files changed
src/components/ble/DfuService.h
@@ -77,6 +77,10 @@ namespace Pinetime {
77
uint16_t ComputeCrc(uint8_t const* p_data, uint32_t size, uint16_t const* p_crc);
78
};
79
80
+ static constexpr ble_uuid128_t serviceUuid {
81
+ .u {.type = BLE_UUID_TYPE_128},
82
+ .value = {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x30, 0x15, 0x00, 0x00}};
83
+
84
private:
85
Pinetime::System::SystemTask& systemTask;
86
Pinetime::Controllers::Ble& bleController;
@@ -90,10 +94,6 @@ namespace Pinetime {
90
94
91
95
uint16_t revision {0x0008};
92
96
93
- static constexpr ble_uuid128_t serviceUuid {
- .u {.type = BLE_UUID_TYPE_128},
- .value = {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x30, 0x15, 0x00, 0x00}};
-
97
static constexpr ble_uuid128_t packetCharacteristicUuid {
98
.u {.type = BLE_UUID_TYPE_128},
99
.value = {0x23, 0xD1, 0xBC, 0xEA, 0x5F, 0x78, 0x23, 0x15, 0xDE, 0xEF, 0x12, 0x12, 0x32, 0x15, 0x00, 0x00}};
src/components/ble/HeartRateService.h
@@ -21,14 +21,14 @@ namespace Pinetime {
21
void SubscribeNotification(uint16_t attributeHandle);
22
void UnsubscribeNotification(uint16_t attributeHandle);
23
24
+ static constexpr uint16_t heartRateServiceId {0x180D};
25
+ static constexpr ble_uuid16_t heartRateServiceUuid {.u {.type = BLE_UUID_TYPE_16}, .value = heartRateServiceId};
26
27
28
NimbleController& nimble;
29
Controllers::HeartRateController& heartRateController;
- static constexpr uint16_t heartRateServiceId {0x180D};
30
static constexpr uint16_t heartRateMeasurementId {0x2A37};
31
- static constexpr ble_uuid16_t heartRateServiceUuid {.u {.type = BLE_UUID_TYPE_16}, .value = heartRateServiceId};
32
static constexpr ble_uuid16_t heartRateMeasurementUuid {.u {.type = BLE_UUID_TYPE_16}, .value = heartRateMeasurementId};
33
34
struct ble_gatt_chr_def characteristicDefinition[2];
src/components/ble/NimbleController.cpp
@@ -158,7 +158,10 @@ void NimbleController::StartAdvertising() {
158
}
159
160
fields.flags = BLE_HS_ADV_F_DISC_GEN | BLE_HS_ADV_F_BREDR_UNSUP;
161
- fields.uuids128 = &dfuServiceUuid;
+ fields.uuids16 = &HeartRateService::heartRateServiceUuid;
162
+ fields.num_uuids16 = 1;
163
+ fields.uuids16_is_complete = 1;
164
+ fields.uuids128 = &DfuService::serviceUuid;
165
fields.num_uuids128 = 1;
166
fields.uuids128_is_complete = 1;
167
fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO;
src/components/ble/NimbleController.h
@@ -112,10 +112,6 @@ namespace Pinetime {
112
uint16_t connectionHandle = BLE_HS_CONN_HANDLE_NONE;
113
uint8_t fastAdvCount = 0;
114
uint8_t bondId[16] = {0};
115
116
- ble_uuid128_t dfuServiceUuid {
117
118
119
120
121
static NimbleController* nptr;
0 commit comments