How to create bluetooth server in QT c++
-
I wanted to create Bluetooth connection between my laptop and the mobile phone.
the laptop has QT application and mobile has React-Native application. (laptop needs to act like a smart TV)
I need to host a Bluetooth server on the laptop and pair it using my mobile. How can I handle this? anybody who can help me, please?
-
Hi @Harshana-Srimal and welcome
take a look at the examples:
https://doc.qt.io/qt-5/qtbluetooth-pingpong-example.html -
Thank you so much for the reference. I tried it and failed to host the discoverable BT server. any simple guidelines, please?
-
@Harshana-Srimal said in How to create bluetooth server in QT c++:
any simple guidelines, please?
No. That's as basic as the documentation offers (for a bluetooth server).
To the best of my knowledge -
@Harshana-Srimal
I'm going a hunch here, because you don't give us much information.You're on windows and using mingw ?
That doesn't work, that Bluetooth backend is a dummy oneqt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional.
you will have to use MSVC
-
ok, I don't have much experience with raspberry pi, so someone else will have to jump in.
But you're still not giving us much to go on here.
Some more questions, that will be of important either way.
- How did you install Qt on your pi? Compiled it yourself, cross compile, download precompiled...
- What Qt version exactly
- What pi model exactly
- Is your bluetooth on the pi correctly set up?
-
- Can you communicate with any Bluetooth device outside of Qt already ?
-
@J.Hilk Excuse for the delay. here is the details
- I work on my Kali Linux System and planned to cross compile on raspberry
- Its QT creator 5.12.1
- Raspberry Pi3 B+
- yes
- yes I can
And also yesterday I tried to run some Qt Examples in my Kali box and Ubuntu box also. But I failed.
Thanks