Qt Bluetooth Android + Windows Sockets Bluetooth API
-
wrote on 29 Sept 2014, 21:38 last edited by
I'm working on a software on PC (windows 7 and linux) that communicates with an android Qt app.
On windows I had to implement using Microsoft Sockets API (Bluetooth) http://msdn.microsoft.com/en-us/library/windows/desktop/aa362928(v=vs.85)).aspx
The windows test software is "the connection sample from Microsoft":http://code.msdn.microsoft.com/windowsdesktop/Bluetooth-Connection-e3263296 with some minor changes to avoid closing socket abruptly...
I tested 2 situations, one android was the server and in other the windows software was the server side.
-
When android is the server side, the windows app can connect successfully and start sending data. But QBluetoothSocket is only able to read the first byte, all the rest is lost :(
-
When the android app is the client, it can discover the service through UUID but the QBluetoothServiceInfo returned has wrong information about socket protocol, and then the socket cannot be created stating that the socket protocol type is not supported.
In all cases both sides are creating RFCOMM sockets.
Have anyone ever tried to make this work?
Best Regards.
-
1/1