지금 블루투스 채팅 예제로는 문제없이 연결이 잘되는데

 

제가 직접 바로 다이렉트로 바로 리스트 안나오고 게시판에서 찾아서 바로 직접연결하는 소스로 연결하려니 안됩니다.

 

그때당시도 질문글로 올라올때 소스라 문제가 있나 다시봐도 없는듯하여 썻는데 그 때 질문자와 다르게 Atmega여서 그런지

 

아예 연결로 안되는것 같습니다. 방법이 따로 없을까요??

 

그냥 어플키면 블루투스 켜져있는지 확인하고 안켜져 있으면 켜지고(이부분을 했음)

 

그다음에 바로 검색 없이 Atmega에 페어링하는것이 지금 목표입니다. 블루투스 소자는 FB155BC 사용하고 있어요

 

아래 소스입니다.

 

 package com.Ryuji.android.BluetoothChat;
import java.io.IOException; 
import java.util.UUID;
import android.app.Activity; 
import android.bluetooth.BluetoothAdapter; 
import android.bluetooth.BluetoothDevice; 
import android.bluetooth.BluetoothSocket; 
import android.os.Bundle; 
import android.util.Log; 
import android.widget.Toast;
 
public class pair extends Activity { 
BluetoothAdapter mBTAdapter = BluetoothAdapter.getDefaultAdapter(); 
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
 
@Override 
public void onCreate(Bundle savedInstanceState) { 
super.onCreate(savedInstanceState); 
setContentView(R.layout.main); 
try{
BluetoothDevice device = mBluetoothAdapter.getRemoteDevice("00:18:9A:23:BC:EE");      
BluetoothSocket clientSocket = device.createRfcommSocketToServiceRecord(uuid);  
clientSocket.connect();
Toast.makeText(this, "connect", Toast.LENGTH_LONG).show(); 
} catch(IOException e){Log.d("BLUTOOTH",e.getMessage());
}