chipweinberger / flutter_blue_plus

Flutter plugin for connecting and communicationg with Bluetooth Low Energy devices, on Android, iOS, macOS
Other
791 stars 479 forks source link

[Help]: Is descriptorUuid equivalent of a Descriptor Type? #796

Closed Ben1980 closed 9 months ago

Ben1980 commented 9 months ago

Requirements

Have you checked this problem on the example app?

No

FlutterBluePlus Version

1.31.14

Flutter Version

3.16.9

What OS?

iOS

OS Version

iOS 17+

Bluetooth Module

Suunto EON Core

What is your problem?

I need the BluetoothDescriptor Type according to QBluetoothUuid::DescriptorType. In particular, I need to know if the descriptor is of type ClientCharacteristicConfiguration. I found that my device descriptor has the descriptorUuid of 2902 which would fit what I need. Am I right that the descriptorUuid is equivalent to the type or is it just a coincidence that it has the right value? If it's the right value, why is it of type Guid instead of a simple hex or int?

Logs

flutter: Preferred service found: 98ae7120-e62e-11e3-badd-0002a5d5c51b
flutter: Descriptor remoteId: E74CA49A-C525-CA79-99D3-6357C0791663
flutter: Descriptor serviceUuid: 98ae7120-e62e-11e3-badd-0002a5d5c51b
flutter: Descriptor characteristicUuid: d0fd6b80-e62e-11e3-a2e9-0002a5d5c51b
flutter: Descriptor descriptorUuid: 2902
chipweinberger commented 9 months ago

yes you're right.

when you learn more about ble it might make more sense to you.

it's full value is 00002902-0000-1000-8000-00805f9b34fb

2902 is the ble short uuid, which is equivalent to the long one.

the Guid class prefers to print the short uuid, if possible. but handles both.