Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.8
-
None
-
Windows/MacOS/Android
Description
Hi,
Using btchat example I am able to connect from Windows to Android, or Android to Windows, or Android to Android.
MacOS cannot connect to anything (Android or Windows) as a client, the scan finds nothing. As a server Windows does not find it, and Android finds it but then there is an error when connecting to it. If I enable loggingCategorie for bluetooth* I can see the following messages in the console when running the Android build as a client trying to connect on MacOS
D libbtchat_arm64-v8a.so: Connecting to service 2 "Serial Port Profile" on "Philippe’s Mac mini" D libbtchat_arm64-v8a.so: Going to create client D libbtchat_arm64-v8a.so: Connecting... D libbtchat_arm64-v8a.so: Start client D libbtchat_arm64-v8a.so: Create socket D libbtchat_arm64-v8a.so: qt.bluetooth.android: connectToServiceHelper() "14:98:77:39:61:7E" "{e8e10f95-1a70-4b27-9ccf-02010264e9c8}" D libbtchat_arm64-v8a.so: qt.bluetooth.android: Connnecting via secure rfcomm D libbtchat_arm64-v8a.so: ConnectToService done D libbtchat_arm64-v8a.so: qt.bluetooth.android: Connecting socket D BluetoothUtils: isSocketAllowedBySecurityPolicy start : device null I BluetoothSocket: connect() for device 149877 called by pid: 16458 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback I ViewRootImpl@745f7dd[QtActivity]: ViewPostIme pointer 1 W System.err: java.io.IOException: read failed, socket might closed or timeout, read ret: -1 W System.err: at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:970) W System.err: at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:923) W System.err: at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:541) W libbtchat_arm64-v8a.so: qt.bluetooth.android: Falling back to reverse uuid workaround. D libbtchat_arm64-v8a.so: qt.bluetooth.android: Connnecting via secure rfcomm D libbtchat_arm64-v8a.so: qt.bluetooth.android: Connecting socket D BluetoothUtils: isSocketAllowedBySecurityPolicy start : device null I BluetoothSocket: connect() for device 149877 called by pid: 16458 W BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback W System.err: java.io.IOException: read failed, socket might closed or timeout, read ret: -1 W System.err: at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:970) W System.err: at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:984) W System.err: at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:536) W libbtchat_arm64-v8a.so: qt.bluetooth.android: Socket connect via workaround failed.
Note that if MacOS btchat is running, Windows cannot anymore find btchat on Android, i.e. I have to quit btchat on the Mac for Windows to be able to find Android btchat.
Also note that the error above also appears from time to time when connecting Android to Android in my own app which is very similar to btchat concerning bluetooth. When this occurs I just relaunch the discovery after a 5 secs pause and after 2 ou 3 trials it works.
All devices are paired together. MacOS Bluetooth settings windows is shown to be sure it is discoverable.
Thanks
Philippe Lelong
Attachments
Issue Links
- relates to
-
QTBUG-117042 bluetooth app does not connect using windows and mac
- Closed