Skip to content

Sample code fails to connect #14

@chrymsft

Description

@chrymsft

The sample code provided doesn't seem to work. I am attempting a BT connection between a Android 5.0 and a 4.2 using the sample code provided; however, I am constantly thrown the following error trace:

W/BT: Fallback failed. Cancelling.
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
                                                                          at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:581)
                                                                          at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:558)
                                                                          at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:374)
                                                                          at com.ramimartin.multibluetooth.library.bluetooth.client.BluetoothConnector$FallbackBluetoothSocket.connect(BluetoothConnector.java:203)
                                                                          at com.ramimartin.multibluetooth.library.bluetooth.client.BluetoothConnector.connect(BluetoothConnector.java:59)
                                                                          at com.ramimartin.multibluetooth.library.bluetooth.client.BluetoothClient.run(BluetoothClient.java:54)
                                                                          at java.lang.Thread.run(Thread.java:841)
                                                                      
                                                                      
                                                                      [ 08-12 07:29:56.063 23435:23860 E/         ]
                                                                      ===> mSocket IOException
                                                                      java.io.IOException: ===> Could not connect to device: 10:D3:8A:47:0E:DC
                                                                          at com.ramimartin.multibluetooth.library.bluetooth.client.BluetoothConnector.connect(BluetoothConnector.java:74)
                                                                          at com.ramimartin.multibluetooth.library.bluetooth.client.BluetoothClient.run(BluetoothClient.java:54)
                                                                          at java.lang.Thread.run(Thread.java:841)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions