mirror of
https://github.com/nymea/nymea-plugins.git
synced 2026-08-05 03:33:51 +02:00
added discovery by service uuids
This commit is contained in:
parent
b4197e8f23
commit
e3658865a1
@ -58,7 +58,7 @@ void DevicePluginLukeRoberts::discoverDevices(DeviceDiscoveryInfo *info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach (const QBluetoothDeviceInfo &deviceInfo, reply->discoveredDevices()) {
|
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() + ")");
|
DeviceDescriptor descriptor(modelFDeviceClassId, "Model F", deviceInfo.name() + " (" + deviceInfo.address().toString() + ")");
|
||||||
ParamList params;
|
ParamList params;
|
||||||
|
|
||||||
@ -221,6 +221,12 @@ void DevicePluginLukeRoberts::executeBrowserItemAction(BrowserItemActionInfo *in
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DevicePluginLukeRoberts::onPluginConfigurationChanged(const ParamTypeId ¶mTypeId, const QVariant &value)
|
||||||
|
{
|
||||||
|
Q_UNUSED(paramTypeId)
|
||||||
|
Q_UNUSED(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DevicePluginLukeRoberts::onReconnectTimeout()
|
void DevicePluginLukeRoberts::onReconnectTimeout()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,8 +26,6 @@
|
|||||||
#include <QBitArray>
|
#include <QBitArray>
|
||||||
#include <QtEndian>
|
#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) :
|
LukeRoberts::LukeRoberts(BluetoothLowEnergyDevice *bluetoothDevice, QObject *parent) :
|
||||||
|
|||||||
@ -31,6 +31,8 @@
|
|||||||
#include "typeutils.h"
|
#include "typeutils.h"
|
||||||
#include "hardware/bluetoothlowenergy/bluetoothlowenergydevice.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)
|
inline QByteArray &operator<<(QByteArray &l, quint8 r)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user