I am trying to connect my tablet to a BT05 Bluetooth serial adapter. The Android version is 5.1, but I also tested a newer device with the same result. I used “Serial Bluetooth Terminal” to connect to the same adapter and it works fine there, so I guess the hardware should be ok.
I have tried several examples I found online, one using ketai and two working with android directly, the behaviour is always the same:
I can scan for devices, I see paired and discovered devices and mac addresses. When I try to connect,
the device gets a connection, the serial side of the adapter says “Connected”, but no data is going through the link in either direction. About 12 seconds later, the connection breaks, the console gives me
“java.io.IOException: read failed, socket might closed or timeout, read ret: -1”.
I have added every permission that has Bluetooth in it, but it makes no difference.
Does anyone have a hint what could be the reason for this or what I could try?
I did some more research in the last days and found that my devices (BT05) are actually Bluetooth Low Energy devices and need a completely different method to connect to them. It is described in detail here, and ketai does not seem to support it at the moment.