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.
Hi Pires, thanks for providing the obd api it's helped me tons!
I hope this is right way of going about asking for help, if not please redirect me and I will do so. I have had the issue for a while and am out of ideas which is why I turned to you in hopes of figuring out a solution to my problem.
So the first time I connect to OBD I have no issues and read the data just fine. If I however disconnect and try to reconnect, it fails and throws the following error: W/System.err: com.github.pires.obd.exceptions.UnableToConnectException: Error running 01 46, response: ...UNABLETOCONNECT
After that failed attempt, if I try to reconnect again it works.
After every connection I make sure to close it with the Close Command as such:
CloseCommand closeCommand = new CloseCommand();
closeCommand.run(this.mmSocket.getInputStream(), this.mmSocket.getOutputStream());
Is there something I am not doing correctly? Possibly closing the streams? If so how would I go about doing that?
The text was updated successfully, but these errors were encountered:
Perhaps I'm not doing it properly, but upon every reconnect I initialize with the following commands:
new EchoOffCommand().run(this.mmSocket.getInputStream(), this.mmSocket.getOutputStream());
new LineFeedOffCommand().run(this.mmSocket.getInputStream(), this.mmSocket.getOutputStream());
new TimeoutCommand(125).run(this.mmSocket.getInputStream(), this.mmSocket.getOutputStream());
new SelectProtocolCommand(ObdProtocols.AUTO).run(this.mmSocket.getInputStream(), this.mmSocket.getOutputStream());
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Pires, thanks for providing the obd api it's helped me tons!
I hope this is right way of going about asking for help, if not please redirect me and I will do so. I have had the issue for a while and am out of ideas which is why I turned to you in hopes of figuring out a solution to my problem.
So the first time I connect to OBD I have no issues and read the data just fine. If I however disconnect and try to reconnect, it fails and throws the following error:
W/System.err: com.github.pires.obd.exceptions.UnableToConnectException: Error running 01 46, response: ...UNABLETOCONNECT
After that failed attempt, if I try to reconnect again it works.
After every connection I make sure to close it with the Close Command as such:
Is there something I am not doing correctly? Possibly closing the streams? If so how would I go about doing that?
The text was updated successfully, but these errors were encountered: