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

Bluetooth Low Energy Notifications not working in newer Qt Versions

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.11.0
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Raspberry Pi 4 with Raspbian Buster, MX Linux 19.3, Windows 10
    • Platform/s:
      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

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

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes