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

Bluetooth socket writes may get coalesced (bluez)

XMLWordPrintable

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

      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)

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes