From c2a253b3a2c4b62507c20b9a8d74a21692dab6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Thu, 5 Jul 2018 14:07:29 +0200 Subject: [PATCH] Change bluetooth server to discoverable mode --- libnymea-core/bluetoothserver.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libnymea-core/bluetoothserver.cpp b/libnymea-core/bluetoothserver.cpp index 63febacb..8c634fc9 100644 --- a/libnymea-core/bluetoothserver.cpp +++ b/libnymea-core/bluetoothserver.cpp @@ -87,8 +87,7 @@ void BluetoothServer::onHostModeChanged(const QBluetoothLocalDevice::HostMode &m return; if (mode != QBluetoothLocalDevice::HostDiscoverable || mode != QBluetoothLocalDevice::HostDiscoverableLimitedInquiry) { - m_localDevice->powerOn(); - m_localDevice->setHostMode(QBluetoothLocalDevice::HostDiscoverableLimitedInquiry); + m_localDevice->setHostMode(QBluetoothLocalDevice::HostDiscoverable); } } @@ -162,7 +161,7 @@ bool BluetoothServer::startServer() // Init adapter qCDebug(dcConnection()) << "BluetoothServer: Using adapter" << m_localDevice->name() << m_localDevice->address().toString(); m_localDevice->powerOn(); - m_localDevice->setHostMode(QBluetoothLocalDevice::HostDiscoverableLimitedInquiry); + m_localDevice->setHostMode(QBluetoothLocalDevice::HostDiscoverable); connect(m_localDevice, &QBluetoothLocalDevice::hostModeStateChanged, this, &BluetoothServer::onHostModeChanged); // Init bluetooth server