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. Bluetooth Low Energy example doesn't work

Bluetooth Low Energy example doesn't work

Scheduled Pinned Locked Moved Unsolved General and Desktop
bluetoothlow energyblewindows 10qt 5.10.0
19 Posts 6 Posters 8.0k 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.
  • A Offline
    A Offline
    Ashi
    wrote on last edited by
    #5

    Thanks @SGaist ,

    I tried to do the following:
    git clone git://code.qt.io/qt/qtconnectivity.git
    cd qtconnectivity
    git checkout wip/win

    But still the same problem. The devices list is empty.
    Did I do something wrong? or miss something?
    Thank you very much!

    mrjjM 1 Reply Last reply
    0
    • A Ashi

      Thanks @SGaist ,

      I tried to do the following:
      git clone git://code.qt.io/qt/qtconnectivity.git
      cd qtconnectivity
      git checkout wip/win

      But still the same problem. The devices list is empty.
      Did I do something wrong? or miss something?
      Thank you very much!

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

      @Ashi
      Hi and you did also build it ?

      A 1 Reply Last reply
      2
      • mrjjM mrjj

        @Ashi
        Hi and you did also build it ?

        A Offline
        A Offline
        Ashi
        wrote on last edited by
        #7

        @mrjj yes I did.

        mrjjM 1 Reply Last reply
        1
        • A Ashi

          @mrjj yes I did.

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

          @Ashi
          and make install ?
          so its installed into Qt ?

          1 Reply Last reply
          3
          • A Ashi

            Hello,
            I'm new in Qt, and I want to develop a program with BLE connection. I started to run "Bluetooth Low Energy Scanner" example and some other examples from the examples list. But it doesn't work correctly. The list of devices always empty.
            I am using windows 10 and Qt 5.10.0
            Can anyone help me please?

            A Offline
            A Offline
            Ashi
            wrote on last edited by
            #9

            @Ashi How can I make install?? Could you please explain?
            Thanks in advance!

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

              nmake install in the build folder if you are using Visual Studio and mingw32-make install if you are using MinGW

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

              A 2 Replies Last reply
              3
              • SGaistS SGaist

                nmake install in the build folder if you are using Visual Studio and mingw32-make install if you are using MinGW

                A Offline
                A Offline
                Ashi
                wrote on last edited by
                #11
                This post is deleted!
                1 Reply Last reply
                0
                • SGaistS SGaist

                  nmake install in the build folder if you are using Visual Studio and mingw32-make install if you are using MinGW

                  A Offline
                  A Offline
                  Ashi
                  wrote on last edited by Ashi
                  #12

                  @SGaist After made make install I got the following:

                  C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity>nmake install
                  
                  Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                  Copyright (C) Microsoft Corporation.  All rights reserved.
                  
                          cd src\ && ( if not exist Makefile C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity\src\src.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                  
                  Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                  Copyright (C) Microsoft Corporation.  All rights reserved.
                  
                          cd bluetooth\ && ( if not exist Makefile C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity\src\bluetooth\bluetooth.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                  Project MESSAGE: perl -w C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\syncqt.pl -module QtBluetooth -version 5.10.1 -outdir C:/Qt/Qt5.10.0/Examples/Qt-5.10.0/qtconnectivity C:/Qt/Qt5.10.0/Examples/Qt-5.10.0/qtconnectivity
                  'perl' is not recognized as an internal or external command,
                  operable program or batch file.
                  Project ERROR: Failed to run: perl -w C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\syncqt.pl -module QtBluetooth -version 5.10.1 -outdir C:/Qt/Qt5.10.0/Examples/Qt-5.10.0/qtconnectivity C:/Qt/Qt5.10.0/Examples/Qt-5.10.0/qtconnectivity
                  NMAKE : fatal error U1077: 'cd' : return code '0x3'
                  Stop.
                  NMAKE : fatal error U1077: 'cd' : return code '0x2'
                  Stop.
                  
                  

                  And still after running the example again, the devices list is empty.

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

                    As the error suggests: you are missing Perl. Install it.

                    It’s normal noting changed, the module wasn’t even built.

                    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
                    3
                    • A Offline
                      A Offline
                      Ashi
                      wrote on last edited by Ashi
                      #14

                      @SGaist During installation process of QT this problem occurred:

                      0_1514874723242_Qt-perl.png
                      So I clicked 'Ignore'.
                      Then I tried to install "C:\Qt\Qt5.10.0\Tools\Perl52213_32\strawberry-perl-5.22.1.3-32bit.msi
                      but nothing changed.
                      I tried to reinstall it and disabled Antivirus and the same error appeared.
                      Is there anyway to overcome this problem?

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

                        Did it install successfully ?
                        If so did you try to call perl from a new command prompt ?

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

                        A 1 Reply Last reply
                        0
                        • SGaistS SGaist

                          Did it install successfully ?
                          If so did you try to call perl from a new command prompt ?

                          A Offline
                          A Offline
                          Ashi
                          wrote on last edited by
                          #16

                          @SGaist I restarted the Qt command line and the error that related to Perl disappeared and I got the following:

                          
                          C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity>nmake install
                          
                          Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                          Copyright (C) Microsoft Corporation.  All rights reserved.
                          
                                  cd src\ && ( if not exist Makefile C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity\src\src.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                          
                          Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                          Copyright (C) Microsoft Corporation.  All rights reserved.
                          
                                  cd bluetooth\ && ( if not exist Makefile C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity\src\bluetooth\bluetooth.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                          
                          Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                          Copyright (C) Microsoft Corporation.  All rights reserved.
                          
                                  "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release install
                          
                          Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                          Copyright (C) Microsoft Corporation.  All rights reserved.
                          
                                  link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.10 /MANIFEST:embed /OUT:..\..\lib\Qt5Bluetooth.dll @C:\Users\kacst\AppData\Local\Temp\nm98A.tmp
                          Qt5Core.lib(Qt5Core.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
                          NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x458'
                          Stop.
                          NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
                          Stop.
                          NMAKE : fatal error U1077: 'cd' : return code '0x2'
                          Stop.
                          NMAKE : fatal error U1077: 'cd' : return code '0x2'
                          Stop.
                          
                          
                          C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity>
                          

                          Thanks for your response!

                          jsulmJ 1 Reply Last reply
                          0
                          • A Ashi

                            @SGaist I restarted the Qt command line and the error that related to Perl disappeared and I got the following:

                            
                            C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity>nmake install
                            
                            Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                            Copyright (C) Microsoft Corporation.  All rights reserved.
                            
                                    cd src\ && ( if not exist Makefile C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity\src\src.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                            
                            Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                            Copyright (C) Microsoft Corporation.  All rights reserved.
                            
                                    cd bluetooth\ && ( if not exist Makefile C:\Qt\Qt5.10.0\5.10.0\msvc2015_64\bin\qmake.exe -o Makefile C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity\src\bluetooth\bluetooth.pro ) && "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile install
                            
                            Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                            Copyright (C) Microsoft Corporation.  All rights reserved.
                            
                                    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" -f Makefile.Release install
                            
                            Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
                            Copyright (C) Microsoft Corporation.  All rights reserved.
                            
                                    link /NOLOGO /DYNAMICBASE /NXCOMPAT /DEBUG /OPT:REF /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /VERSION:5.10 /MANIFEST:embed /OUT:..\..\lib\Qt5Bluetooth.dll @C:\Users\kacst\AppData\Local\Temp\nm98A.tmp
                            Qt5Core.lib(Qt5Core.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
                            NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\link.EXE"' : return code '0x458'
                            Stop.
                            NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe"' : return code '0x2'
                            Stop.
                            NMAKE : fatal error U1077: 'cd' : return code '0x2'
                            Stop.
                            NMAKE : fatal error U1077: 'cd' : return code '0x2'
                            Stop.
                            
                            
                            C:\Qt\Qt5.10.0\Examples\Qt-5.10.0\qtconnectivity>
                            

                            Thanks for your response!

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

                            @Ashi Shouldn't you "nmake install" what you cloned from the repository before?

                            git clone git://code.qt.io/qt/qtconnectivity.git
                            cd qtconnectivity
                            git checkout wip/win
                            ...
                            nmake
                            nmake install
                            

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

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

                              You should also use the correct command line prompt for building especially if you start with the one provided by Visual Studio.

                              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
                              • A Ashi

                                Hello,
                                I'm new in Qt, and I want to develop a program with BLE connection. I started to run "Bluetooth Low Energy Scanner" example and some other examples from the examples list. But it doesn't work correctly. The list of devices always empty.
                                I am using windows 10 and Qt 5.10.0
                                Can anyone help me please?

                                A Offline
                                A Offline
                                Abdurahman_Gulamkadirov
                                wrote on last edited by
                                #19

                                @Ashi Sorry, I'm too late to answer this post. I think you should try with msvc compiler, not mingw

                                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