Qt 5.3.0 and simple bluetooth examples?



  • is there any simple bluetooth examples?
    i just need simple source how to connect android to spp bluetooth to send and receive terminal commands.

    i have tried every sources and none of them have worked, i just cant connect to HC-06 (or any else) device.

    i have been forking chat example for few days and latest problem is:
    @D/Qt (11199): ../bluetooth_kokeilu/chatclient.cpp:77 (void ChatClient::startClient(const QBluetoothServiceInfo&)): ConnectToService done
    W/Qt (11199): kernel/qobject.cpp:2247 (void err_method_notfound(const QObject*, const char*, const char*)): QObject::connect: No such signal QBluetoothSocket::unconnected() in ../bluetooth_kokeilu/chatclient.cpp:82
    W/Qt (11199): qbluetoothsocket_android.cpp:358 (qint64 QBluetoothSocketPrivate::readData(char*, qint64)): qt.bluetooth.android: Socket::readData: QBluetoothSocket::UnconnectedState QObject(0x0)
    W/Qt (11199): qbluetoothsocket_android.cpp:358 (qint64 QBluetoothSocketPrivate::readData(char*, qint64)): qt.bluetooth.android: Socket::readData: QBluetoothSocket::UnconnectedState QObject(0x0)
    @


  • Moderators

    Hi,

    Where did you get that example from? The "official version":http://qt-project.org/doc/qt-5/qtbluetooth-btchat-example.html does not have QBluetoothSocket::unconnected() (2nd line in your error message).

    When you install Qt 5.3.0, it should automatically install the source code for the examples in your computer at <Qt>/Examples/Qt-5.3/bluetooth/. You don't need to fork it yourself.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.