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. QTBluetooth not discovering services
Qt 6.11 is out! See what's new in the release blog

QTBluetooth not discovering services

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 6 Posters 4.1k Views 3 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.
  • A Offline
    A Offline
    Avtansh Sharma
    wrote on last edited by
    #1

    Hi,

    I tried to create a service by using Python on Linux device.

    Problem :- I cannot detect service from QTBluetooth. However I am able to detect the service from Python client

    QTBluetooth Chat example is also not working @Moderators Please check.

    jsulmJ K 2 Replies Last reply
    0
    • A Avtansh Sharma

      Hi,

      I tried to create a service by using Python on Linux device.

      Problem :- I cannot detect service from QTBluetooth. However I am able to detect the service from Python client

      QTBluetooth Chat example is also not working @Moderators Please check.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by jsulm
      #2

      @Avtansh-Sharma said in QTBluetooth not discovering services:

      Please check

      Check what? You did not provide your code or anything else. Are there any warnings in the terminal if you execute your application?
      And why do you address moderators?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Avtansh Sharma

        Hi,

        I tried to create a service by using Python on Linux device.

        Problem :- I cannot detect service from QTBluetooth. However I am able to detect the service from Python client

        QTBluetooth Chat example is also not working @Moderators Please check.

        K Offline
        K Offline
        koahnig
        wrote on last edited by
        #3

        @Avtansh-Sharma

        Moderators are simple users as anybody trying to get help in this forum.

        They are not responsible and not paid for anything to check. If you think that there is a problem with one of the examples, check with JIRA and eventually file a bug report.

        Vote the answer(s) that helped you to solve your issue(s)

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Avtansh Sharma
          wrote on last edited by
          #4

          Sorry for inconvenience. I will raise issue in JIRA
          @jsulm If you want you can check the btchat example given in qt examples. For me the scanning goes on without finding the service created by qt Bluetooth Server code.

          Only error code available is qt.bluetooth.bluez: SDP scan failure QProcess::ExitStatus(NormalExit) 3

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

            Hi,

            That's not enough information for any of us to help, you also have to provide the exact version of Qt you are using, the OS you are running and since it's Bluetooth related, the hardware you are using.

            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
            • mrjjM Offline
              mrjjM Offline
              mrjj
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @Avtansh-Sharma said in QTBluetooth not discovering services:

              SDP scan failure

              Hi
              Might be related to this
              https://bugreports.qt.io/browse/QTBUG-53041
              if using python with Qt version < 5.6.2

              A 1 Reply Last reply
              1
              • mrjjM mrjj

                @Avtansh-Sharma said in QTBluetooth not discovering services:

                SDP scan failure

                Hi
                Might be related to this
                https://bugreports.qt.io/browse/QTBUG-53041
                if using python with Qt version < 5.6.2

                A Offline
                A Offline
                Avtansh Sharma
                wrote on last edited by
                #7

                @mrjj thanks for replying
                It seems that Bluetooth module of qt is not stable. There are many bugs
                https://bugreports.qt.io/browse/QTBUG-54594
                This one is the real one because of which I am facing problem.
                i don't think this might be problem in commercial edition of qt

                mrjjM 1 Reply Last reply
                0
                • A Avtansh Sharma

                  @mrjj thanks for replying
                  It seems that Bluetooth module of qt is not stable. There are many bugs
                  https://bugreports.qt.io/browse/QTBUG-54594
                  This one is the real one because of which I am facing problem.
                  i don't think this might be problem in commercial edition of qt

                  mrjjM Offline
                  mrjjM Offline
                  mrjj
                  Lifetime Qt Champion
                  wrote on last edited by mrjj
                  #8

                  @Avtansh-Sharma
                  Hi
                  Its fixed in later version of Qt.
                  alt text
                  The commercial version is the same as the open source (for QWidgets)
                  but has extra classes/tools and commercial direct support.

                  However, the Bluetooth module is the same.

                  what version of Qt are you using ?

                  1 Reply Last reply
                  2
                  • A Offline
                    A Offline
                    Avtansh Sharma
                    wrote on last edited by
                    #9

                    I am using QT 5.4. I am using a embedded linux device which has hardware limitations. I have to recompile it on hardware.
                    It has arm architecture which takes a lot of time.

                    mrjjM 1 Reply Last reply
                    0
                    • A Avtansh Sharma

                      I am using QT 5.4. I am using a embedded linux device which has hardware limitations. I have to recompile it on hardware.
                      It has arm architecture which takes a lot of time.

                      mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by
                      #10

                      @Avtansh-Sharma
                      Ok, the 5.6 series is long term support so Im afraid using 5.4 is not an option in your case.
                      Recompiling qt 5.6 on small arm device must be painful/ very time consuming.

                      So if you cant use a newer Qt, maybe just a pure python solution is faster to archive.

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

                        Just in case, there's a new LTS. It is 5.9.

                        On a side note, if you have access to more than one device, you should consider setting up a build farm with your boards.

                        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
                        2
                        • B Offline
                          B Offline
                          Barun.chen
                          wrote on last edited by Barun.chen
                          #12

                          Hi All,
                          ...
                          ...
                          ...
                          Renew: About this example(Bluetooth Chat Example), you need add a line.
                          edit chat.cpp:

                          Chat::Chat(QWidget *parent)
                          : QDialog(parent), ui(new Ui_Chat)
                          {
                          ...
                          ...
                          ...
                          QBluetoothLocalDevice().setHostMode(QBluetoothLocalDevice::HostDiscoverable); //add this
                          }

                          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