OpenBluetoothToolbox / SimpleBLE

SimpleBLE - the all-in-one Bluetooth library for MacOS, iOS, Windows, Linux and Android.
https://www.simpleble.org
Other
655 stars 110 forks source link

SimpleBlueZ: Characteristics are sometimes missing #253

Open r-bt opened 1 year ago

r-bt commented 1 year ago

I've built and installed this library on a Raspberry Pi. I'm trying out the pair.cpp example and have found that the returned characteristics are inconsistent for the same BLE device

On one occasion I'll get

Service: 00001801-0000-1000-8000-00805f9b34fb
  Characteristic: 00002a05-0000-1000-8000-00805f9b34fb
    Descriptor: 00002902-0000-1000-8000-00805f9b34fb
Service: 00020001-574f-4f20-5370-6865726f2121
  Characteristic: 00020003-574f-4f20-5370-6865726f2121
  Characteristic: 00020002-574f-4f20-5370-6865726f2121
    Descriptor: 00002902-0000-1000-8000-00805f9b34fb
  Characteristic: 00020004-574f-4f20-5370-6865726f2121
  Characteristic: 00020005-574f-4f20-5370-6865726f2121
Service: 00010001-574f-4f20-5370-6865726f2121
  Characteristic: 00010002-574f-4f20-5370-6865726f2121
    Descriptor: 00002902-0000-1000-8000-00805f9b34fb
  Characteristic: 00010003-574f-4f20-5370-6865726f2121
    Descriptor: 00002902-0000-1000-8000-00805f9b34fb

and then on another I'll get

Service: 00001801-0000-1000-8000-00805f9b34fb
  Characteristic: 00002a05-0000-1000-8000-00805f9b34fb
    Descriptor: 00002902-0000-1000-8000-00805f9b34fb
Service: 00020001-574f-4f20-5370-6865726f2121

I've built SimpleBluez in both DEBUG and RELEASE mode but found the issue in both