diff options
author | JF <jf@codingfield.com> | 2020-04-27 20:16:03 +0200 |
---|---|---|
committer | JF <jf@codingfield.com> | 2020-04-27 20:16:03 +0200 |
commit | 5291bcc7de582cfe3a83b94781ee80aa79765706 (patch) | |
tree | 5872cb29143a878a76b08adf89b528cbd8939263 /src/Components/Ble/NimbleController.cpp | |
parent | 746c164c593d2b9aa63a0f9a1c1ad032de9627a0 (diff) |
Nimble OTA : work in progress
Diffstat (limited to 'src/Components/Ble/NimbleController.cpp')
-rw-r--r-- | src/Components/Ble/NimbleController.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/Components/Ble/NimbleController.cpp b/src/Components/Ble/NimbleController.cpp index 02f99180..98246b7f 100644 --- a/src/Components/Ble/NimbleController.cpp +++ b/src/Components/Ble/NimbleController.cpp @@ -73,7 +73,8 @@ void NimbleController::Init() { ble_svc_gatt_init(); deviceInformationService.Init(); - currentTimeClient.Init(); +// currentTimeClient.Init(); + dfuService.Init(); int res; res = ble_hs_util_ensure_addr(0); res = ble_hs_id_infer_auto(0, &addrType); @@ -105,8 +106,9 @@ void NimbleController::StartAdvertising() { // fields.uuids128 = BLE_UUID128(BLE_UUID128_DECLARE( // 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, // 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff)); - fields.num_uuids128 = 0; - fields.uuids128_is_complete = 0;; + fields.uuids128 = &dfuServiceUuid; + fields.num_uuids128 = 1; + fields.uuids128_is_complete = 1; fields.tx_pwr_lvl = BLE_HS_ADV_TX_PWR_LVL_AUTO; rsp_fields.name = (uint8_t *)"Pinetime-JF"; @@ -155,7 +157,7 @@ int NimbleController::OnGAPEvent(ble_gap_event *event) { } else { bleController.Connect(); connectionHandle = event->connect.conn_handle; - ble_gattc_disc_all_svcs(connectionHandle, OnAllSvrDisco, this); +// ble_gattc_disc_all_svcs(connectionHandle, OnAllSvrDisco, this); } } break; |