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

QBluetoothSocket never signals readyRead & readChannelFinished

XMLWordPrintable

      I set up a connection to an android device. The device transfers data using a RfcComm connection. The transfer succeeds (on Android), but usually, it fails on the Desktop (Bluez backend).

      The connection fails with this error:

      qt.bluetooth.bluez: void QBluetoothSocketPrivate::_q_readNotify() 19 error: -1 "Connection reset by peer"
      

      Manually connecting QBluetoothSocket::disconnected to QBluetoothSocket::readyRead and QBluetoothSocket::readChannelFinished fixes the issue. My (badly informed) guess would be that there's still some data to be read, but the "connection closed" gets processed without reading the remaining data.

        1. qtbug67672.apk
          1.48 MB
        2. qtbug-67672.cpp
          1 kB
        3. qtbug67672.tar.gz
          622 kB
        4. rfcomm-client.c
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            ablasche Alex Blasche
            mtijink Matthijs Tijink
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes