bt to mesh code is written

This commit is contained in:
geeksville
2020-02-01 16:14:34 -08:00
parent 490331f3cd
commit de03dc88f4
6 changed files with 185 additions and 153 deletions

View File

@@ -1,6 +1,5 @@
#include "BluetoothUtil.h"
#include "BluetoothSoftwareUpdate.h"
#include "MeshBluetoothService.h"
#include <esp_gatt_defs.h>
#include <BLE2902.h>
#include <Arduino.h>
@@ -122,14 +121,10 @@ BLEServer *initBLE(std::string deviceName) {
BLEService *pUpdate = createUpdateService(pServer); // We need to advertise this so our android ble scan operation can see it
pServer->getAdvertising()->addServiceUUID(pUpdate->getUUID());
BLEService *pMesh = createMeshBluetoothService(pServer); // We need to advertise this so our android ble scan operation can see it
pServer->getAdvertising()->addServiceUUID(pMesh->getUUID());
// start all our services (do this after creating all of them)
pDevInfo->start();
pBattery->start();
pUpdate->start();
pMesh->start();
// Start advertising
pServer->getAdvertising()->start();