react-native-easybluetooth-classic
react-native-easybluetooth-classic copied to clipboard
Error When Writing: bt socket closed, read return: -1
I am getting this error when I writeLn to a connected device.
EasyBluetooth.writeln("Test 123")
.then(() => {
console.log("Writing " + "Test 123")
})
.catch((ex) => {
console.warn(ex);
})
In the log, it says I am connected, I just see this error when writing string using the EasyBluetooth.writeln method.
2018-12-26 22:18:10.635 23150-23266/com.bluetoothtest E/BluetoothClassicService: disconnected
java.io.IOException: bt socket closed, read return: -1
at android.bluetooth.BluetoothSocket.read(BluetoothSocket.java:740)
at android.bluetooth.BluetoothInputStream.read(BluetoothInputStream.java:60)
at com.github.douglasjunior.bluetoothclassiclibrary.BluetoothClassicService$ConnectedThread.run(BluetoothClassicService.java:326)