Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16536

```Exception: JVM exception occurred: read failed, socket might closed or timeout, read ret: -1 java.io.IOException```

$
0
0

Good day,

I am encountering the error below when connecting my Kivy application to Bluetooth.

Exception: JVM exception occurred: read failed, socket might closed or timeout, read ret: -1 java.io.IOException

I am using Pyjnius. Can anyone help me? Thank you.

Here's what I initiate it.

                    # Create a Bluetooth socket                    socket = device_to_connect.createRfcommSocketToServiceRecord(                UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"))                    # Connect to the device                    socket.connect()                    self.update_label('Connected to the paired device successfully.')                    # Close the socket when done                    #socket.close()                except Exception as e:                    print(e)                    self.update_label(f"Error connecting to the paired device: {str(e)}")

I have already tried other ways but there's nothing that works so far.


Viewing all articles
Browse latest Browse all 16536

Trending Articles