From a3aa441b0fbb94956cdafaebd92b15b5c93da59f Mon Sep 17 00:00:00 2001 From: Bartosz Cichocki Date: Thu, 6 May 2021 13:42:58 +0200 Subject: [PATCH] [EGD-6682] Fix BT name change bug To update the BT name there is a need to restart the BT stack. Sending proper command during working stack wasn't working --- module-services/service-bluetooth/ServiceBluetooth.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module-services/service-bluetooth/ServiceBluetooth.cpp b/module-services/service-bluetooth/ServiceBluetooth.cpp index bf0209709cb6662d4cb6d10d8099a4432493b53b..840974861cb5e09ee343c453c133d2c4de2d8cda 100644 --- a/module-services/service-bluetooth/ServiceBluetooth.cpp +++ b/module-services/service-bluetooth/ServiceBluetooth.cpp @@ -212,6 +212,8 @@ auto ServiceBluetooth::handle(message::bluetooth::SetDeviceName *msg) -> std::sh auto newName = msg->getName(); bluetooth::set_name(newName); settingsHolder->setValue(bluetooth::Settings::DeviceName, newName); + sendWorkerCommand(bluetooth::Command(bluetooth::Command::Type::PowerOff)); + sendWorkerCommand(bluetooth::Command(bluetooth::Command::Type::PowerOn)); return sys::MessageNone{}; }