From e2c75b1ecb52b60879c6316a8bea838c23d24b0f Mon Sep 17 00:00:00 2001 From: Fabian Bumberger Date: Mon, 30 Sep 2013 16:24:18 +0200 Subject: Don't throw an error when a low energy device is discovered Just ignore it Change-Id: I7d8139f8c10cee0df4e2ebdc13bb76ee6bb8dda3 Reviewed-by: Alex Blasche --- src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp b/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp index c271a47f..d5feb3eb 100644 --- a/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp +++ b/src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp @@ -50,6 +50,8 @@ #include +#include + #include QT_BEGIN_NAMESPACE @@ -75,10 +77,15 @@ void QBluetoothServiceDiscoveryAgentPrivate::start(const QBluetoothAddress &addr qBBBluetoothDebug() << "Starting Service discovery for" << address.toString(); const char *filePath = QByteArray("/pps/services/bluetooth/remote_devices/").append(address.toString().toUtf8().constData()).constData(); if ((m_rdfd = qt_safe_open(filePath, O_RDONLY)) == -1) { - qWarning() << "Failed to open " << filePath; - error = QBluetoothServiceDiscoveryAgent::InputOutputError; - errorString = QStringLiteral("Failed to open remote device file"); - q->error(error); + if (QFile::exists(QLatin1String(filePath) + QLatin1String("-00")) || + QFile::exists(QLatin1String(filePath) + QLatin1String("-01"))) { + qBBBluetoothDebug() << "LE device discovered...skipping"; + } else { + qWarning() << "Failed to open " << filePath; + error = QBluetoothServiceDiscoveryAgent::InputOutputError; + errorString = QStringLiteral("Failed to open remote device file"); + q->error(error); + } _q_serviceDiscoveryFinished(); return; } else { -- cgit v1.2.3