블루투스 연결하려는데 service discovery failed 라고 뜹니다.

uuid가 잘 못된건지 제가 사용한 uuid 00001101-0000-1000-8000-00805F9B34FB  입니다.

갤럭시 s2 두대로 하는 테스트 하는 중입니다.

테스트를하면 아무 일도 일어나질 안습니다. ㅠ 그리고 logcat에서 보면 위에 discovery failed라고

나오네요. 무슨 문제인지.

 

소스를 올려봅니다.

 

private static final UUID uuid = 
UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
 
try {
       BluetoothDevice device = 
adapter.getRemoteDevice(new String("server 
uuid올림.");
      Log.e("TAG",device.getName());
      Log.e("TAG",device.getAddress());
       
      BluetoothSocket 
client= 
device.createInsecureRfcommSocketToServiceRecord(uuid);
      client.connect();
            
     } 
catch (IOException e) {
      // TODO: handle 
exception
       
Log.d("BLUTOOTH",e.getMessage()); 
     }