Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt6 QBluetoothSocket readyRead() signal but nothing to read in the socket

Qt6 QBluetoothSocket readyRead() signal but nothing to read in the socket

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 2 Posters 286 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sidthatsme
    wrote on last edited by
    #1

    I have used QBluetoothSocket in Qt 5.15.2 without issue. After setting up the QBluetoothSocket, I rely on the socket's readyRead() signal to tell me when to read from the socket with readAll(). No issues; able to reliably read from the socket every time.

    Now I am transitioning from Qt 5.15.2 to Qt 6.5.3.

    I set up the QBluetoothSocket in Qt 6.5.3 as I have done so in Qt 5.15.2.

    The readyRead() signal method to trigger the socket's readAll() fuction strategy works fine for a while in Qt 6.5.3. But after a while of working, the readyRead() signal comes in and I try to read from the socket but there is no data in the socket. (Confirmed with canReadLine() returning false & bytesAvailable() returning 0)

    Could this be a QBluetoothSocket bug in Qt 6.5.3 or am I missing something? I believe I have tried Qt 6.6 but still the same issue.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You should provide some more details about your setup:

      • OS you are running on
      • Bluetooth device you are connecting to

      You might want to take a look at the bug report system as well.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      S 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        You should provide some more details about your setup:

        • OS you are running on
        • Bluetooth device you are connecting to

        You might want to take a look at the bug report system as well.

        S Offline
        S Offline
        sidthatsme
        wrote on last edited by sidthatsme
        #3

        @SGaist Thank for the reply! Apologies in not specifying my build system:
        The Build Environment is as follows:
        Windows 11 Pro (Also the run environment)
        The App is built with Qt 6.5.3 (obtained from Qt Maintenance tool; which Qt has compiled with MSVC 2019)
        We are compiling with the App with MSVC 2022 compiler.

        The Bluetooth device we are connecting to is a custom device. It uses Serial Port Profile.
        The socket we open on the app side is opened with RfcommProtocol.

        We transmit about 11 bytes of data every 10ms from the Device to the app.

        S 1 Reply Last reply
        0
        • S sidthatsme

          @SGaist Thank for the reply! Apologies in not specifying my build system:
          The Build Environment is as follows:
          Windows 11 Pro (Also the run environment)
          The App is built with Qt 6.5.3 (obtained from Qt Maintenance tool; which Qt has compiled with MSVC 2019)
          We are compiling with the App with MSVC 2022 compiler.

          The Bluetooth device we are connecting to is a custom device. It uses Serial Port Profile.
          The socket we open on the app side is opened with RfcommProtocol.

          We transmit about 11 bytes of data every 10ms from the Device to the app.

          S Offline
          S Offline
          sidthatsme
          wrote on last edited by
          #4

          @SGaist Good News!

          So QBluetoothSocket still doesn't work. But QSerialPort does!
          QSerialPort has been able to read my Bluetooth port successfully every time after a readyRead()!

          So a temporary workaround for people until Qt figures out what is wrong with QBluetoothSocket.

          SGaistS 1 Reply Last reply
          0
          • S sidthatsme

            @SGaist Good News!

            So QBluetoothSocket still doesn't work. But QSerialPort does!
            QSerialPort has been able to read my Bluetooth port successfully every time after a readyRead()!

            So a temporary workaround for people until Qt figures out what is wrong with QBluetoothSocket.

            SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @sidthatsme Nice to read !

            Rather than just waiting for a fix, you should check if there's a bug report already available about your issue and if not, open one.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            S 1 Reply Last reply
            0
            • SGaistS SGaist

              @sidthatsme Nice to read !

              Rather than just waiting for a fix, you should check if there's a bug report already available about your issue and if not, open one.

              S Offline
              S Offline
              sidthatsme
              wrote on last edited by
              #6

              @SGaist Thanks for the advice!

              A bug report has been added: https://bugreports.qt.io/browse/QTBUG-123390

              Appreciate the help!

              1 Reply Last reply
              1

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved