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. Qt bluetooth scanner and chat example.

Qt bluetooth scanner and chat example.

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 4 Posters 1.2k Views 2 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.
  • Frank84F Offline
    Frank84F Offline
    Frank84
    wrote on last edited by
    #1

    Hi guys,
    I have been trying hard the last days with the bluetooth examples, i have problems with bluetooth chat example, it doesn't find any devices, this doesnt happen with scanner example where it finds multiple devices.

    I can't figure it how to make it bluetooth chat example to work. Any help?

    Franco

    1 Reply Last reply
    0
    • Frank84F Offline
      Frank84F Offline
      Frank84
      wrote on last edited by
      #2

      Any one had this problem?, i don't know why scanner example detect devices and not chat example.

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

        Hi
        What platform are you on ? ( and Qt version)
        Windows 10 version 1507 is minimum and win 8 and win 7 does not work.

        Frank84F 1 Reply Last reply
        0
        • Frank84F Offline
          Frank84F Offline
          Frank84
          wrote on last edited by
          #4

          Hi mrjj, thanks for your reply.

          Windows 10 version 1903 running on wmware
          Qt creator 4.9.2
          Qt 5.12.4

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kuzulis
            Qt Champions 2020
            wrote on last edited by
            #5

            I can't figure it how to make it bluetooth chat example to work. Any help?
            Windows 10 version 1903 running on *wmware'

            Do you have an USB bluetooth dongle added (your BT device) to running VMWARE? Do you see it in a guest Windows?

            Frank84F 1 Reply Last reply
            2
            • K kuzulis

              I can't figure it how to make it bluetooth chat example to work. Any help?
              Windows 10 version 1903 running on *wmware'

              Do you have an USB bluetooth dongle added (your BT device) to running VMWARE? Do you see it in a guest Windows?

              Frank84F Offline
              Frank84F Offline
              Frank84
              wrote on last edited by
              #6

              @kuzulis said in Qt bluetooth scanner and chat example.:

              I can't figure it how to make it bluetooth chat example to work. Any help?
              Windows 10 version 1903 running on *wmware'

              Do you have an USB bluetooth dongle added (your BT device) to running VMWARE? Do you see it in a guest Windows?

              Yes, and also i tried to compile to android and run the program in a samsung tablet and i have same problem, only scanner detect devices and not chat example.

              1 Reply Last reply
              0
              • Frank84F Offline
                Frank84F Offline
                Frank84
                wrote on last edited by
                #7

                There is anyone that had this issue?. I have the same problem running on desktop windows 10 and in android device.

                1 Reply Last reply
                0
                • mrjjM mrjj

                  Hi
                  What platform are you on ? ( and Qt version)
                  Windows 10 version 1507 is minimum and win 8 and win 7 does not work.

                  Frank84F Offline
                  Frank84F Offline
                  Frank84
                  wrote on last edited by
                  #8

                  @mrjj said in Qt bluetooth scanner and chat example.:

                  Hi
                  What platform are you on ? ( and Qt version)
                  Windows 10 version 1507 is minimum and win 8 and win 7 does not work.

                  Hi mrjj, thanks for your reply.

                  Windows 10 version 1903 running on wmware
                  Qt creator 4.9.2
                  Qt 5.12.4

                  Gojir4G 1 Reply Last reply
                  0
                  • Frank84F Frank84

                    @mrjj said in Qt bluetooth scanner and chat example.:

                    Hi
                    What platform are you on ? ( and Qt version)
                    Windows 10 version 1507 is minimum and win 8 and win 7 does not work.

                    Hi mrjj, thanks for your reply.

                    Windows 10 version 1903 running on wmware
                    Qt creator 4.9.2
                    Qt 5.12.4

                    Gojir4G Offline
                    Gojir4G Offline
                    Gojir4
                    wrote on last edited by Gojir4
                    #9

                    @Frank84 Hi,

                    Bluetooth chat example is composed by a server and a client, the scan from the client is filtered on a specific service which is provided by the server.

                    So you can see only devices which are "compatible" with the chat, which means providing the specific UUID of the service.
                    You can see definition of the service UUID in the example's documentation:

                    Bluetooth uses UUIDs as unique identifiers. The chat service uses a randomly generated UUID.

                    static const QLatin1String serviceUuid("e8e10f95-1a70-4b27-9ccf-02010264e9c8");
                    serviceInfo.setServiceUuid(QBluetoothUuid(serviceUuid));
                    

                    You also need to check if your server is started correctly, there is a message printed on the console if it's not the case

                    Cannot bind chat server to "00:00:00:00:00:00"

                    In my case I have this message because I don't have qt.bluetooth. You may also have a different address than "00:00:...".

                    If you want to see all devices when scanning from the client, you can remove this line m_discoveryAgent->setUuidFilter(uuid); in RemoteSelector::startDiscovery() . But it does not really make sense in this context as you want to see only servers which are compatible with the chat protocol.

                    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