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

Bluetooth socket writes may get coalesced (bluez)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.5.1
    • None

    Description

      In the bluez implementation of Qt Bluetooth Low Energy, a socket is used to send messages to the remote device. The socket is created without the Unbuffered flag, so multiple subsequent writes can get coalesced into one message (stream behaviour). This behaviour causes problems when the remote device implements a message-based protocol (like GATT).

      An attempt to write two BTLE characteristics subsequently will reproduce the problem.

      Forcing the socket to Unbuffered mode solves the issue (like in this, seemingly unrelated Android patch: https://codereview.qt-project.org/#/c/96779/3/src/bluetooth/qbluetoothsocket_android.cpp)

      Attachments

        Issue Links

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

          Activity

            People

              ablasche Alex Blasche
              anszom Andrzej Szombierski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes