i got the following code from the internet
try {
BluetoothDevice device = btAdapter.getRemoteDevice(bdDevice.toString());
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
socket = device.createInsecureRfcommSocketToServiceRecord(uuid);
socket.connect();
Toast.makeText(MainActivity.this,"socket bonded", Toast.LENGTH_LONG).show();
} catch(Exception e) {
tv.setText(e.toString());
}
of course the uuid is a random code just for example, so how do i get the desired uuid ? should it be the uuid of my ELM327 device or another uuid? excuse me i am new to the uuid thing and android development.