Qt World Summit: Register Today!

Android QBluetoothSocket::SocketError( 8 )

  • That is the error i get... for the last 2 weeks.

    I am trying to comunicate two devices to try the new characteristic... but i cant make it work.

    I register one as a server
    rfcommServer = new QBluetoothServer(QBluetoothServiceInfo::RfcommProtocol, this);
    connect(rfcommServer, SIGNAL(newConnection()), this, SLOT(clientConnected()));


    The other lookup for services... and is discovering it... and i try to connect using:
    QBluetoothSocket* socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
    but connection fails, throwing the error : QBluetoothSocket::SocketError( 8 )

    Any idea?


  • Lifetime Qt Champion


    Are you using Qt 5.3 ? If not, you will need to, the bluetooth module for android has been ported for this version of Qt

  • yes, i am trying the 5.3.0 beta version.
    But as it is my first time using the bluetooth module, i dont really know if i am doing something wrong or there are limitations in the android version.

    Someone got the examples working?

  • Ok, i am going to self respond, as finally i got it working.


    Seems that call to connecToService with the serviceInfo that you got during discovering is not working. I think it must be a bug (we talk about 5.3.0beta) so i am going to leave it report. :)

    Thx anyway :)

  • Lifetime Qt Champion

    Might be, since you are going to create a report don't forget to post a link here so other user may easily find it :)

Log in to reply