added discovery by service uuids

This commit is contained in:
Boernsman 2019-10-18 16:44:24 +02:00 committed by Boernsman
parent b4197e8f23
commit e3658865a1
3 changed files with 9 additions and 3 deletions

View File

@ -58,7 +58,7 @@ void DevicePluginLukeRoberts::discoverDevices(DeviceDiscoveryInfo *info)
}
foreach (const QBluetoothDeviceInfo &deviceInfo, reply->discoveredDevices()) {
if (deviceInfo.name().contains("LRF")) {
if (deviceInfo.serviceUuids().contains(customControlServiceUuid)) {
DeviceDescriptor descriptor(modelFDeviceClassId, "Model F", deviceInfo.name() + " (" + deviceInfo.address().toString() + ")");
ParamList params;
@ -221,6 +221,12 @@ void DevicePluginLukeRoberts::executeBrowserItemAction(BrowserItemActionInfo *in
}
}
void DevicePluginLukeRoberts::onPluginConfigurationChanged(const ParamTypeId &paramTypeId, const QVariant &value)
{
Q_UNUSED(paramTypeId)
Q_UNUSED(value)
}
void DevicePluginLukeRoberts::onReconnectTimeout()
{

View File

@ -26,8 +26,6 @@
#include <QBitArray>
#include <QtEndian>
static QBluetoothUuid customControlServiceUuid = QBluetoothUuid(QUuid("44092840-0567-11E6-B862-0002A5D5C51B"));
static QBluetoothUuid externalApiEndpointCharacteristicUuid = QBluetoothUuid(QUuid("44092842-0567-11E6-B862-0002A5D5C51B"));
LukeRoberts::LukeRoberts(BluetoothLowEnergyDevice *bluetoothDevice, QObject *parent) :

View File

@ -31,6 +31,8 @@
#include "typeutils.h"
#include "hardware/bluetoothlowenergy/bluetoothlowenergydevice.h"
static QBluetoothUuid customControlServiceUuid = QBluetoothUuid(QUuid("44092840-0567-11E6-B862-0002^"));
static QBluetoothUuid externalApiEndpointCharacteristicUuid = QBluetoothUuid(QUuid("44092842-0567-11E6-B862-0002A5D5C51B"));
inline QByteArray &operator<<(QByteArray &l, quint8 r)
{