aboutsummaryrefslogtreecommitdiff
path: root/ble/LinuxBluetooth.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ble/LinuxBluetooth.cpp')
-rw-r--r--ble/LinuxBluetooth.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/ble/LinuxBluetooth.cpp b/ble/LinuxBluetooth.cpp
index d3fe80b..444e3a2 100644
--- a/ble/LinuxBluetooth.cpp
+++ b/ble/LinuxBluetooth.cpp
@@ -1,4 +1,5 @@
#include "BluetoothImpl.h"
+#include "ble/misc.h"
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
@@ -22,8 +23,9 @@ namespace trygvis {
namespace bluetooth {
namespace linux {
-using namespace uuids;
+//using namespace uuids;
using namespace std::chrono_literals;
+using namespace std;
using std::to_string;
class LinuxBluetoothGatt;
@@ -55,7 +57,7 @@ public:
void runScan(std::function<void(const shared_ptr<BluetoothDevice> &device)>) override;
- shared_ptr <BluetoothDevice> getDevice(Mac &mac) override;
+ shared_ptr<BluetoothDevice> getDevice(Mac &mac) override;
private:
void startScan() override;
@@ -105,6 +107,8 @@ public:
ByteBuffer readValue(const BluetoothGattCharacteristicPtr &c, ByteBuffer& response) override;
+ void setCharacteristicNotification(const BluetoothGattDescriptorPtr &c, bool enable) override;
+
private:
void connect();
@@ -302,6 +306,9 @@ ByteBuffer LinuxBluetoothGatt::readValue(const BluetoothGattCharacteristicPtr &c
return view;
}
+void LinuxBluetoothGatt::setCharacteristicNotification(const BluetoothGattDescriptorPtr &c, bool enable) {
+}
+
void LinuxBluetoothGatt::discoverServices() {
uint16_t startHandle = 0x0001;