
Originally Posted by
chanderk
Hi,
I have similar requirement as Tedtrubo. I am trying to connect to a bluetooth device and send and receive data to it using bluetooth socket.
- In QML scanner example, my device is not found during scanning
- In Qt scanner example (bscanner), it finds my device, But when I try to connect the device using socket, the applcation crashes.
I use
QBluetoothSocket *socket = new QBluetoothSocket();
if (!socket){
qDebug()<< "SOCKET IS NULL";
return;
}
socket->connectToService(address, QBluetoothUuid::SerialPort, QIODevice::ReadOnly);
address is the one returned by device discovery. Seems to be valid in ab:cd:ef:gh:ij:kl format. Here the problem is, ConnectToService crash with "Thread has crashed: A data abort exception has occurred accessing 0x3c." message.
What am I doing wrong ??