What you're basicly doing is opening a socket and send the Adapter Commands (very TCPish) onto which it responds. It goes like this (Codesnippet taken from the guide)
// create the socket
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
BluetoothDevice device = btAdapter.getRemoteDevice(deviceAddress);
UUID uuid = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB");
BluetoothSocket socket = device.createInsecureRfcommSocketToServiceRecord(uuid);
socket.connect();
//send commands & process response
new EchoOffObdCommand().run(socket.getInputStream(), socket.getOutputStream());
new LineFeedOffObdCommand().run(socket.getInputStream(), socket.getOutputStream());
new TimeoutObdCommand().run(socket.getInputStream(), socket.getOutputStream());
new SelectProtocolObdCommand(ObdProtocols.AUTO).run(socket.getInputStream(), socket.getOutputStream());
I can't find a method like createRfcommSocket (disregarding the insecure) in the library.
How would you solve this task with this library?
Summary
This is more a question than an issue. Im trying to communicate with an Bluetooth OBD Adapter. Im following this guide: https://blog.lemberg.co.uk/how-guide-obdii-reader-app-development.
What you're basicly doing is opening a socket and send the Adapter Commands (very TCPish) onto which it responds. It goes like this (Codesnippet taken from the guide)
I can't find a method like
createRfcommSocket
(disregarding the insecure) in the library. How would you solve this task with this library?Library version
1.5.0-SNAPSHOT