I am trying to connect to an embedded device and the bluetooth pin is 1234, when I connect to to the embedded board it is asking me to enter 000000 on the embedded board and not asking me to enter the correct pin from my device. I am not sure what I am doing wrong.
public void connectBluetooth() throws IOException{
device = bluetoothAdapter.getRemoteDevice(MAC);
try {
mSocket = device.createRfcommSocketToServiceRecord(MY_UUID);
} catch (IOException e) {
Log.e(tag, "+++++Failed to create RFCOMM connection+++++");
}
try{
mSocket.connect();
Log.e(tag, "+++++connecting+++++");
manageBluetooth manageThread = new manageBluetooth();
manageThread.start();
threadCheck = true;
}catch(IOException e){
Log.e(tag, "+++++Failed to connect+++++");
}
Log.e(tag, "+++++After catch+++++");
}
}
I call in and out from the manageThread, I have stated the right MAC address as well. Surely it should be asking me to enter the pin on my phone and not on the embedded board it self.