I'm developing an embedded application with bluetooth LE function enabled using Qt 5.7. The device I'm developing are meant to act as peripheral role, it can broadcast advertising packets and let smartphones to connect to.
The target board are running with Ubuntu Linux 14.04, with bluez version 5.43 (the latest) Since Qt documentation says "In Qt 5.7, additional API supporting the peripheral role was added as a Technology Preview, with the backend only implemented for Linux/BlueZ." So, I think the Qt bluetooth API are exactly what I need.
But when I build and run the Qt bluetooth examples (BlueTooth Low Energy Heart Rate Server Example and Bluetooth Scanner Example), none of them are working. I can only get console output: "qt.bluetooth: Dummy backend running. Qt Bluetooth module is non-functional."
I googled that error message, it seems many developers get that error message because they are using Qt bluetooth API on windows platform, and qt bluetooth api does not support Windows. But I'm using Ubuntu Linux, so clearly something wrong but I don't know what exactly cause the issue.
What I'm trying:
- Enable QtBluetooth logging. But nothing more interesting message to show.
- Don't use any Qt bluetooth API, just use command line tool hciconfig and hcitool to manually set up an advertising action. And it actually works ! My iPhone can "see" the device, and I can connect to it !
Based on what I'm trying, I think my hardware are OK, the bluetooth chip can work, but I really need the QtBluetooth API to work correctly. Maybe I miss something important ? The bluez need some configuration ? Please help.