i write an simple application to access the PBAP of my smartphone from my pc (Linux, Debian).
I see all services of my smartphone, i can also connect (the smartphone gets a pairing request). But after a few seconds i get the following error:
qt.bluetooth.bluez: void QBluetoothSocketPrivate::_q_readNotify() 14 error: -1 "Die Ressource ist zur Zeit nicht verfügbar"
Has anybody an idea how to fix it?
This is the function i call:
void ServiceDiscoveryDialog::startClient(const QBluetoothServiceInfo &remoteService)
{
// Connect to service
socket = new QBluetoothSocket(QBluetoothServiceInfo::RfcommProtocol);
qDebug() << "Create socket";
socket->connectToService(remoteAddress, 1);
qDebug() << "ConnectToServiceTry done";
connect(socket, SIGNAL(readyRead()), this, SLOT(readSocket()));
connect(socket, SIGNAL(connected()), this, SLOT(connected()));
connect(socket, SIGNAL(disconnected()), this, SLOT(disconnected()));
}
Thank you.