Android Question Bluetooth SPP cannot connect (Android 13)

yo3ggx

Active Member
Licensed User
Longtime User
Hello,

I want to use the updated Bluetooth Chat example guide made by Erel to update the Bluetooth part of my application.
Trying to run the example, I can discover all Bluetooth devices, but when I try to connect to a Bluetooth Serial device (SPP profile), I'm getting the error:
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
If the device was not previously paired, I'm not asked to pair it.
If I manually pair the device, I'm getting the same error when I try to connect.
I'm running Android 13.

Any hints?

Thank you.
 

yo3ggx

Active Member
Licensed User
Longtime User
The error appeared when connecting, so data transfer was not involved. It looks like the issue was solved after restarting the device.
 
Upvote 0

yo3ggx

Active Member
Licensed User
Longtime User
What I observed is that with devices that require a pin confirmation on the host, If I pair from the application (Bluetooth chat), the pairing completes apparently successfully, but without asking for PIN confirmation on the host. After that, on both client and server devices appear as paired, but connection is not possible. If I pair through the Android Bluetooth settings, everything is working as expected. Somehow the pairing mechanism used when trying to connect to a not paired device, does not work as expected.
 
Upvote 0
Top