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. Connect ot bluetooth device
Forum Updated to NodeBB v4.3 + New Features

Connect ot bluetooth device

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 513 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Mihaill
    wrote on last edited by
    #1

    Hi!
    I have

    QBluetoothSocket *m_bluetoothSocket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
    

    I wont connected to bluetooth device. I do this:

    m_bluetoothSocket->connectToService(device.m_address, device.m_uuid);
    

    But I get error: QBluetoothSocket::SocketError::ServiceNotFoundError
    How I can connected ot bluetooth device? How connected to device with password?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Mihaill
      wrote on last edited by
      #2

      I check uuid, I get nulls. Why?

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

        Hi,

        Which version of Qt are you using ?
        On which platform ?
        To what kind of device are you trying to connect ?
        Does it support that service ?
        Etc.

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

        M 1 Reply Last reply
        0
        • M Offline
          M Offline
          Mihaill
          wrote on last edited by Mihaill
          #4

          I use Qt 5.15.2, Android 10. All bluetooth devices from QBluetoothDeviceInfo had null uuid. I dont know where target device. Same devices had name equal "".

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Which version of Qt are you using ?
            On which platform ?
            To what kind of device are you trying to connect ?
            Does it support that service ?
            Etc.

            M Offline
            M Offline
            Mihaill
            wrote on last edited by
            #5

            @SGaist You dont know how fix this?

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

              Currently no, sorry.

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

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Mihaill
                wrote on last edited by
                #7

                It is work

                m_bluetoothSocket->connectToService(info.device().address(), info.serviceClassUuids()[0]);
                
                1 Reply Last reply
                0

                • Login

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