mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-26 01:52:48 +00:00
don't start the BLE update service for now - the android side isn't ready
This commit is contained in:
parent
de37e1bbab
commit
a8d4b5479d
@ -223,11 +223,14 @@ void deinitBLE()
|
|||||||
|
|
||||||
pServer->getAdvertising()->stop();
|
pServer->getAdvertising()->stop();
|
||||||
|
|
||||||
|
if (pUpdate != NULL) {
|
||||||
destroyUpdateService();
|
destroyUpdateService();
|
||||||
|
|
||||||
pUpdate->stop();
|
pUpdate->stop();
|
||||||
pDevInfo->stop();
|
|
||||||
pUpdate->stop(); // we delete them below
|
pUpdate->stop(); // we delete them below
|
||||||
|
}
|
||||||
|
|
||||||
|
pDevInfo->stop();
|
||||||
|
|
||||||
// First shutdown bluetooth
|
// First shutdown bluetooth
|
||||||
BLEDevice::deinit(false);
|
BLEDevice::deinit(false);
|
||||||
@ -235,6 +238,7 @@ void deinitBLE()
|
|||||||
// do not delete this - it is dynamically allocated, but only once - statically in BLEDevice
|
// do not delete this - it is dynamically allocated, but only once - statically in BLEDevice
|
||||||
// delete pServer->getAdvertising();
|
// delete pServer->getAdvertising();
|
||||||
|
|
||||||
|
if (pUpdate != NULL)
|
||||||
delete pUpdate;
|
delete pUpdate;
|
||||||
delete pDevInfo;
|
delete pDevInfo;
|
||||||
delete pServer;
|
delete pServer;
|
||||||
@ -276,15 +280,18 @@ BLEServer *initBLE(StartBluetoothPinScreenCallback startBtPinScreen, StopBluetoo
|
|||||||
// We now let users create the battery service only if they really want (not all devices have a battery)
|
// We now let users create the battery service only if they really want (not all devices have a battery)
|
||||||
// BLEService *pBattery = createBatteryService(pServer);
|
// BLEService *pBattery = createBatteryService(pServer);
|
||||||
|
|
||||||
|
#ifdef BLE_SOFTWARE_UPDATE // Disable for now
|
||||||
pUpdate = createUpdateService(pServer, hwVendor, swVersion,
|
pUpdate = createUpdateService(pServer, hwVendor, swVersion,
|
||||||
hwVersion); // We need to advertise this so our android ble scan operation can see it
|
hwVersion); // We need to advertise this so our android ble scan operation can see it
|
||||||
|
|
||||||
|
pUpdate->start();
|
||||||
|
#endif
|
||||||
|
|
||||||
// It seems only one service can be advertised - so for now don't advertise our updater
|
// It seems only one service can be advertised - so for now don't advertise our updater
|
||||||
// pServer->getAdvertising()->addServiceUUID(pUpdate->getUUID());
|
// pServer->getAdvertising()->addServiceUUID(pUpdate->getUUID());
|
||||||
|
|
||||||
// start all our services (do this after creating all of them)
|
// start all our services (do this after creating all of them)
|
||||||
pDevInfo->start();
|
pDevInfo->start();
|
||||||
pUpdate->start();
|
|
||||||
|
|
||||||
// FIXME turn on this restriction only after the device is paired with a phone
|
// FIXME turn on this restriction only after the device is paired with a phone
|
||||||
// advert->setScanFilter(false, true); // We let anyone scan for us (FIXME, perhaps only allow that until we are paired with a
|
// advert->setScanFilter(false, true); // We let anyone scan for us (FIXME, perhaps only allow that until we are paired with a
|
||||||
|
Loading…
Reference in New Issue
Block a user