안녕하세요.
JDY-10이라는 블루투스 4.0칩과 안드로이드 sdk 7.0 핸드폰과 통신을 구현하고 있습니다.
이유는 모르겠지만 안드로이드 기본 세팅의 블루투스 pairing이 되지 않아서 insecure로 연결하려고 합니다.
스토어의 다른 ble 채팅 예제를 돌려봤을때는 통신이 됐는데 제가 돌린 코드에서는 계속 오류가 뜨네요..
밑은 코드를 돌렸을때의 에러 로그입니다.
W/BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
E/BT: Fallback failed. Cancelling.
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:907)
at android.bluetooth.BluetoothSocket.waitSocketSignal(BluetoothSocket.java:866)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:540)
at com.ramimartin.multibluetooth.bluetooth.client.BluetoothConnector$FallbackBluetoothSocket.connect(BluetoothConnector.java:220)
at com.ramimartin.multibluetooth.bluetooth.client.BluetoothConnector.connect(BluetoothConnector.java:60)
at com.ramimartin.multibluetooth.bluetooth.client.BluetoothClient.waitForConnection(BluetoothClient.java:47)
at com.ramimartin.multibluetooth.bluetooth.BluetoothRunnable.run(BluetoothRunnable.java:60)
at java.lang.Thread.run(Thread.java:762)
[ 11-25 15:29:27.225 21514:22163 E/ ]
===> mSocket IOException : ===> Could not connect to device: A4:C1:38:77:27:E5