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. Scanning BLE beacons
Qt 6.11 is out! See what's new in the release blog

Scanning BLE beacons

Scheduled Pinned Locked Moved Solved General and Desktop
42 Posts 4 Posters 21.5k 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.
  • J jenya7

    @J-Hilk said in Scanning BLE beacons:

    @sierdzio said in Scanning BLE beacons:

    Or you want to read the data that the device is sending? To do that, you need to connect to it first. https://doc.qt.io/qt-5/qtbluetooth-lowenergyscanner-example.html#connecting-to-services

    not with beacon, beacons are not connectable. And the Qt Api gives no way to identify that.

    what the op is looking for should be in
    https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

    No. It has to get a payload. Every beacon has a payload (20 bytes) of my own data. App. I wrote on my phone (Android) gets all beacons and I see my payload too.
    Wat's the point to get a beacon? To see it's name, rssi, and other fields ? I need the data it sends.

    J.HilkJ Offline
    J.HilkJ Offline
    J.Hilk
    Moderators
    wrote on last edited by
    #22

    @jenya7 I'm not sure to what you're replying ?

    I said, your payload can be accessed via https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

    I do it too.


    Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


    Q: What's that?
    A: It's blue light.
    Q: What does it do?
    A: It turns blue.

    J 1 Reply Last reply
    0
    • J.HilkJ J.Hilk

      @jenya7 I'm not sure to what you're replying ?

      I said, your payload can be accessed via https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

      I do it too.

      J Offline
      J Offline
      jenya7
      wrote on last edited by jenya7
      #23

      @J-Hilk said in Scanning BLE beacons:

      @jenya7 I'm not sure to what you're replying ?

      I said, your payload can be accessed via https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

      I do it too.

      I see. But info has no such field.

      void BT_DEVICE::AddDevice(const QBluetoothDeviceInfo &info)
      {
         info. //no manufacturerData
      }
      
      J.HilkJ 1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #24

        This function was introduced in Qt 5.12.

        Maybe you are using older Qt version?

        (Z(:^

        1 Reply Last reply
        1
        • J jenya7

          @J-Hilk said in Scanning BLE beacons:

          @jenya7 I'm not sure to what you're replying ?

          I said, your payload can be accessed via https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

          I do it too.

          I see. But info has no such field.

          void BT_DEVICE::AddDevice(const QBluetoothDeviceInfo &info)
          {
             info. //no manufacturerData
          }
          
          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by J.Hilk
          #25

          @jenya7 said in Scanning BLE beacons:

          @J-Hilk said in Scanning BLE beacons:

          @jenya7 I'm not sure to what you're replying ?

          I said, your payload can be accessed via https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

          I do it too.

          I see. But info has no such field.

          no, it does not, and here you come in and either
          - expand DeviceInfo class that comes with the BTLE example and you're using

          or
          - create your own interface class that wraps around QBlueToothDeviceInfo

          written before the edit of

          void BT_DEVICE::AddDevice(const QBluetoothDeviceInfo &info)
          {
          info. //no manufacturerData
          }

          @sierdzio is probably right, what version are you using?


          Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


          Q: What's that?
          A: It's blue light.
          Q: What does it do?
          A: It turns blue.

          J 1 Reply Last reply
          0
          • J.HilkJ J.Hilk

            @jenya7 said in Scanning BLE beacons:

            @J-Hilk said in Scanning BLE beacons:

            @jenya7 I'm not sure to what you're replying ?

            I said, your payload can be accessed via https://doc.qt.io/qt-5/qbluetoothdeviceinfo.html#manufacturerData-1

            I do it too.

            I see. But info has no such field.

            no, it does not, and here you come in and either
            - expand DeviceInfo class that comes with the BTLE example and you're using

            or
            - create your own interface class that wraps around QBlueToothDeviceInfo

            written before the edit of

            void BT_DEVICE::AddDevice(const QBluetoothDeviceInfo &info)
            {
            info. //no manufacturerData
            }

            @sierdzio is probably right, what version are you using?

            J Offline
            J Offline
            jenya7
            wrote on last edited by
            #26

            @J-Hilk said in Scanning BLE beacons:

            @sierdzio is probably right, what version are you using?

            It is 5.11.3

            jsulmJ 1 Reply Last reply
            0
            • J jenya7

              @J-Hilk said in Scanning BLE beacons:

              @sierdzio is probably right, what version are you using?

              It is 5.11.3

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

              @jenya7 If you follow the link from @J-Hilk you will see that you need Qt >= 5.12 for that method.

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

              J 1 Reply Last reply
              0
              • jsulmJ jsulm

                @jenya7 If you follow the link from @J-Hilk you will see that you need Qt >= 5.12 for that method.

                J Offline
                J Offline
                jenya7
                wrote on last edited by
                #28

                @jsulm said in Scanning BLE beacons:

                @jenya7 If you follow the link from @J-Hilk you will see that you need Qt >= 5.12 for that method.

                Wow. On Linux the latest available from repository is 5.11.3.

                jsulmJ 1 Reply Last reply
                0
                • J jenya7

                  @jsulm said in Scanning BLE beacons:

                  @jenya7 If you follow the link from @J-Hilk you will see that you need Qt >= 5.12 for that method.

                  Wow. On Linux the latest available from repository is 5.11.3.

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

                  @jenya7 said in Scanning BLE beacons:

                  On Linux the latest available from repository is 5.11.3

                  You can install newer versions using Qt Online Installer...

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

                  J 1 Reply Last reply
                  0
                  • jsulmJ jsulm

                    @jenya7 said in Scanning BLE beacons:

                    On Linux the latest available from repository is 5.11.3

                    You can install newer versions using Qt Online Installer...

                    J Offline
                    J Offline
                    jenya7
                    wrote on last edited by
                    #30

                    @jsulm said in Scanning BLE beacons:

                    @jenya7 said in Scanning BLE beacons:

                    On Linux the latest available from repository is 5.11.3

                    You can install newer versions using Qt Online Installer...

                    I see no options for Linux there.

                    jsulmJ 1 Reply Last reply
                    0
                    • J jenya7

                      @jsulm said in Scanning BLE beacons:

                      @jenya7 said in Scanning BLE beacons:

                      On Linux the latest available from repository is 5.11.3

                      You can install newer versions using Qt Online Installer...

                      I see no options for Linux there.

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

                      @jenya7 And what is this: https://www.qt.io/download-thank-you?os=linux ?

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

                      J 1 Reply Last reply
                      0
                      • jsulmJ jsulm

                        @jenya7 And what is this: https://www.qt.io/download-thank-you?os=linux ?

                        J Offline
                        J Offline
                        jenya7
                        wrote on last edited by
                        #32

                        @jsulm said in Scanning BLE beacons:

                        @jenya7 And what is this: https://www.qt.io/download-thank-you?os=linux ?

                        sorry, may be stupid question - how do I run it?
                        tied this way

                        sudo /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                        /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: nC@�!@8: not found
                        /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: ELF: not found
                        /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 2: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: @#: not found
                        /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 3: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: Syntax error: "(" unexpected
                        
                        
                        jsulmJ 1 Reply Last reply
                        0
                        • sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on last edited by
                          #33
                          chmod +x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                          /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                          

                          Do not install as root.

                          (Z(:^

                          1 Reply Last reply
                          1
                          • J jenya7

                            @jsulm said in Scanning BLE beacons:

                            @jenya7 And what is this: https://www.qt.io/download-thank-you?os=linux ?

                            sorry, may be stupid question - how do I run it?
                            tied this way

                            sudo /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                            /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: nC@�!@8: not found
                            /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: ELF: not found
                            /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 2: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: @#: not found
                            /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 3: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: Syntax error: "(" unexpected
                            
                            
                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #34

                            @jenya7 No need for sudo.

                            # First make it executable
                            chmod u+x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                            # Run
                            /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                            

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

                            J 1 Reply Last reply
                            1
                            • jsulmJ jsulm

                              @jenya7 No need for sudo.

                              # First make it executable
                              chmod u+x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                              # Run
                              /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                              
                              J Offline
                              J Offline
                              jenya7
                              wrote on last edited by jenya7
                              #35

                              @jsulm said in Scanning BLE beacons:

                              @jenya7 No need for sudo.

                              # First make it executable
                              chmod u+x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                              # Run
                              /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                              

                              chmod u+x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                              sudo /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                              /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: nC@�!@8: not found
                              /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: ELF: not found
                              /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 2: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: @#: not found
                              /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 3: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: Syntax error: "(" unexpected

                              I tried also Properties-> Execute : Anyone
                              Then Double click -> Execute in terminal

                              It's linux-x64. I'm not sure Raspbian is 64 it's 32 as far as I know.

                              jsulmJ 1 Reply Last reply
                              0
                              • sierdzioS Offline
                                sierdzioS Offline
                                sierdzio
                                Moderators
                                wrote on last edited by
                                #36

                                Raspbian is ARM, so it won't work anyway.

                                (Z(:^

                                1 Reply Last reply
                                0
                                • J jenya7

                                  @jsulm said in Scanning BLE beacons:

                                  @jenya7 No need for sudo.

                                  # First make it executable
                                  chmod u+x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                                  # Run
                                  /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                                  

                                  chmod u+x /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                                  sudo /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run
                                  /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: nC@�!@8: not found
                                  /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 1: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: ELF: not found
                                  /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 2: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: @#: not found
                                  /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: 3: /home/pi/Downloads/qt-unified-linux-x64-4.2.0-online.run: Syntax error: "(" unexpected

                                  I tried also Properties-> Execute : Anyone
                                  Then Double click -> Execute in terminal

                                  It's linux-x64. I'm not sure Raspbian is 64 it's 32 as far as I know.

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

                                  @jenya7 @sierdzio Ah, it's on ARM. In this case you will need to build Qt by yourself if you require a newer version.

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

                                  J 1 Reply Last reply
                                  0
                                  • jsulmJ jsulm

                                    @jenya7 @sierdzio Ah, it's on ARM. In this case you will need to build Qt by yourself if you require a newer version.

                                    J Offline
                                    J Offline
                                    jenya7
                                    wrote on last edited by
                                    #38

                                    @jsulm said in Scanning BLE beacons:

                                    @jenya7 @sierdzio Ah, it's on ARM. In this case you will need to build Qt by yourself if you require a newer version.

                                    Actually it's Debian fitted for Raspberry. I think 32-bit version will run but I see only 64-bit version available.

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • J jenya7

                                      @jsulm said in Scanning BLE beacons:

                                      @jenya7 @sierdzio Ah, it's on ARM. In this case you will need to build Qt by yourself if you require a newer version.

                                      Actually it's Debian fitted for Raspberry. I think 32-bit version will run but I see only 64-bit version available.

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

                                      @jenya7 said in Scanning BLE beacons:

                                      I think 32-bit version will run

                                      No it will not. RaspberryPi is ARM, not x86...

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

                                      J 1 Reply Last reply
                                      0
                                      • jsulmJ jsulm

                                        @jenya7 said in Scanning BLE beacons:

                                        I think 32-bit version will run

                                        No it will not. RaspberryPi is ARM, not x86...

                                        J Offline
                                        J Offline
                                        jenya7
                                        wrote on last edited by
                                        #40

                                        @jsulm said in Scanning BLE beacons:

                                        @jenya7 said in Scanning BLE beacons:

                                        I think 32-bit version will run

                                        No it will not. RaspberryPi is ARM, not x86...

                                        I see. Any forecast when a newer version will be available for RaspberryPi ?

                                        jsulmJ 1 Reply Last reply
                                        0
                                        • J jenya7

                                          @jsulm said in Scanning BLE beacons:

                                          @jenya7 said in Scanning BLE beacons:

                                          I think 32-bit version will run

                                          No it will not. RaspberryPi is ARM, not x86...

                                          I see. Any forecast when a newer version will be available for RaspberryPi ?

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

                                          @jenya7 This is something you have to ask Debian.

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

                                          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