Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-89723

Bluetooth Low Energy Notifications not working in newer Qt Versions

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.0
    • None
    • Raspberry Pi 4 with Raspbian Buster, MX Linux 19.3, Windows 10
    • Linux/X11

    Description

      With gatttool I am able to receive notifications from my BLE device on Linux.

      gatttool -b FF:FF:55:03:9F:52 --char-write-req --handle=0x000e --value=0100 --listen

      In Qt the corresponding service + characteristic can be found and its UUID is matching with the gatttool output. However there is no QBluetoothUuid::ClientCharacteristicConfiguration descriptor - actually no descriptor at all. So it's not possible to enable notifications.

      In order for a characteristic to support such notifications it must have the QLowEnergyCharacteristic::Notify or QLowEnergyCharacteristic::Indicate property and a descriptor of type QBluetoothUuid::ClientCharacteristicConfiguration.

      The notify flag is set, but there's no descriptor to write to.

      However when I switch from my newer version of Qt (tested with Qt 5.11.3 on Linux and Qt 5.15.2 on windows) to an older Qt 5.7.1 as mentioned in this question on the Qt forums, everything works fine (notifications are received) - even without writing to any descriptor at all.

      Review my pseudocode here.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ablasche Alex Blasche
            chrizbee Christian Bauer
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes