[Interest] bluetooth again

maitai maitai at virtual-winds.org
Thu Aug 2 20:58:58 CEST 2018


Hello,

I am having 2 small other issues and before I report a bug I would like 
to have your opinion:

On MacOS QBluetoothServiceInfo::unregisterService() crashes immediately. 
The very same bluetooth server running on Android does not crash.

On Android (running as a server) when closing the server, the client 
(windows) never gets notified through disconnect() signal. That is not a 
big deal because I can send a disconnect message through write before 
that happens, but is it a known problem? I have these messages in the 
console (even with no client connected) :

W/libqtVlm.so( 9626): (null):0 ((null)): is registered? true
D/libqtVlm.so( 9626): (null):0 ((null)): qt.bluetooth.android: Closing 
server socket
D/BluetoothSocket( 9626): close() in, this: 
android.bluetooth.BluetoothSocket at 38fe4c0f, channel: 8, state: LISTENING
D/BluetoothSocket( 9626): close() this: 
android.bluetooth.BluetoothSocket at 38fe4c0f, channel: 8, mSocketIS: 
android.net.LocalSocketImpl$SocketInputStream at 16211027, mSocketOS: 
android.net.LocalSocketImpl$SocketOutputStream at 220d249cmSocket: 
android.net.LocalSocket at 2d684ea5 
impl:android.net.LocalSocketImpl at 15fdf27a fd:FileDescriptor[62]
D/BluetoothSocket( 9626): Closing mSocket: 
android.net.LocalSocket at 2d684ea5 
impl:android.net.LocalSocketImpl at 15fdf27a fd:FileDescriptor[62]
D/QtBluetooth( 9626): Server socket accept() failed:java.io.IOException: 
read failed, socket might closed or timeout, read ret: -1
W/System.err( 9626): java.io.IOException: read failed, socket might 
closed or timeout, read ret: -1
W/System.err( 9626): 	at 
android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:623)
W/System.err( 9626): 	at 
android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:600)
W/System.err( 9626): 	at 
android.bluetooth.BluetoothSocket.accept(BluetoothSocket.java:510)
W/System.err( 9626): 	at 
android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:130)
W/System.err( 9626): 	at 
android.bluetooth.BluetoothServerSocket.accept(BluetoothServerSocket.java:116)
W/System.err( 9626): 	at 
org.qtproject.qt5.android.bluetooth.QtBluetoothSocketServer.run(SourceFile:117)
D/libqtVlm.so( 9626): (null):0 ((null)): qt.bluetooth.android: 
JavaThread error: 2
D/QtBluetooth( 9626): Leaving server socket thread.
W/libqtVlm.so( 9626): (null):0 ((null)): is registered? false
W/libqtVlm.so( 9626): (null):0 ((null)): bluetooth server closed


My code is as follows:

     qWarning()<<"is registered?"<<info.isRegistered();
     info.unregisterService();
     qWarning()<<"is registered?"<<info.isRegistered();
     foreach(QBluetoothSocket *socket, clientConnections.keys()) {
         delete socket;
     }
     clientConnections.clear();
     delete m_serverInfo;
     this->deleteLater();
     qWarning()<<"bluetooth server closed";

Thanks for any hints

Philippe.



More information about the Interest mailing list