You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.
I trying to develop own OBDII trouble codes scanner app for Android phones.
For connection and reading data i use this obd-java-api.
For testing i use software OBDsim on my laptop and ELM327 Mini(small blue dongle) on my car.
Connection and TroubleCodesCommand run wery well on OBDsim. But when i trying to connect to my car i got fail: after opening a BT socket, obd-api run at very-very-very slow speed and can execute ObdResetCommand 2-3 minutes. At that time app Torque Lite on same ELM and same car connect fast and read trouble codes successfully.
Hello. First of all: thank you for obd-java-api!
I trying to develop own OBDII trouble codes scanner app for Android phones.
For connection and reading data i use this obd-java-api.
For testing i use software OBDsim on my laptop and ELM327 Mini(small blue dongle) on my car.
Connection and TroubleCodesCommand run wery well on OBDsim. But when i trying to connect to my car i got fail: after opening a BT socket, obd-api run at very-very-very slow speed and can execute ObdResetCommand 2-3 minutes. At that time app Torque Lite on same ELM and same car connect fast and read trouble codes successfully.
My code
`import android.app.Application;
import android.app.ProgressDialog;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothSocket;
import android.content.Context;
import android.content.res.Resources;
import android.os.AsyncTask;
import android.os.Process;
import android.support.design.widget.Snackbar;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.github.pires.obd.commands.control.TroubleCodesCommand;
import com.github.pires.obd.commands.protocol.AdaptiveTimingCommand;
import com.github.pires.obd.commands.protocol.EchoOffCommand;
import com.github.pires.obd.commands.protocol.HeadersOffCommand;
import com.github.pires.obd.commands.protocol.LineFeedOffCommand;
import com.github.pires.obd.commands.protocol.ObdResetCommand;
import com.github.pires.obd.commands.protocol.SelectProtocolCommand;
import com.github.pires.obd.commands.protocol.SpacesOffCommand;
import com.github.pires.obd.commands.protocol.TimeoutCommand;
import com.github.pires.obd.enums.ObdProtocols;
import com.github.pires.obd.exceptions.NoDataException;
//import com.github.pires.obd.reader.io.BluetoothManager;
import java.io.IOException;
import java.net.Socket;
import java.util.UUID;
import static android.os.Process.THREAD_PRIORITY_BACKGROUND;
import static android.os.Process.THREAD_PRIORITY_MORE_FAVORABLE;
public class BTConnection {
UUID MY_UUID = UUID.fromString("00001101-0000-1000-8000-00805f9b34fb");
private static final String TAG = "Activity";
private BluetoothSocket mmSocket;
private BluetoothDevice mmDevice;
private Context context;
}
`
I call it from another class by execute
`BTConnection.ConnectThread elm = new BTConnection(this).new ConnectThread();
Log.d(TAG,"Create elm as child success");
elm.execute(device);
Log.d(TAG,"Run elm Async success");`
OBDsim software can record logs and i collect AT commands from Torque and obd-java-api. Difference in usage of space between AT and commands.
Torque log:
`ATZ
ELM327 v1.3a OBDGPSLogger
And log from my app with obd-java-api:
`AT Z
ELM327 v1.3a OBDGPSLogger
My issue: i can't send commands and receive result using ELM327 Mini and obd-java-api.
P.S.: sorry for my english.
The text was updated successfully, but these errors were encountered: