-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timeout Issue #41
Comments
I've had timeouts occur, but only rarely. Are you able to get any data at all with the example before getting timeouts? What happens if you edit the CPP file to follow this configuration? |
No data before timeouts. I'll try that and let you know. Edit: Sorry for the dumb question (I'm very new to this stuff), where in the file do I enter that configuration? Do I replace the commands in the initialize function like this:
|
You can use the macros from the header file, but I think you can do what you posted instead |
Tried it and still get the same issue |
You said you can get data using AT commands. Can you provide that list of AT commands and their responses? |
In that case, try getting rid of all AT commands in the |
Same result. Here is my current Arduino code: #include "ELMduino.h"
#define ELM_PORT Serial1
ELM327 myELM327;
uint32_t rpm = 0;
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
digitalWrite(LED_BUILTIN, HIGH);
Serial.begin(38400);
ELM_PORT.begin(38400);
Serial.println("Attempting to connect to ELM327...");
if (!myELM327.begin(ELM_PORT))
{
Serial.println("Couldn't connect to OBD scanner");
while (1);
}
Serial.println("Connected to ELM327");
}
void loop()
{
float tempRPM = myELM327.rpm();
if (myELM327.status == ELM_SUCCESS)
{
rpm = (uint32_t)tempRPM;
Serial.print("RPM: "); Serial.println(rpm);
}
else
{
Serial.print(F("\tERROR: "));
Serial.println(myELM327.status);
delay(100);
}
delay(1000);
} |
Hi, i also have the same problem. If looked into the elmduino code and i found something that i can't explain. Currently it is so: After successfull initialization, once you get a It's because in current code, the Line 508 in 342fc1e
This flag is only updated to true when you have received any success request (no timeout or unable to connect) -> Line 554 in 342fc1e
And the problem with this is, every call to Line 360 in 342fc1e
But this I've created a pull request, maybe this is helpful for someone and maybe this will be merged by the maintainer. |
Oh dang, good catch! I'll take a look at the PR. I've had trouble with many users (including myself, actually) having this timeout error issue, but could never figure it out - I hope this bug is the root of the issue. |
This should be resolved with release 2.3.2 |
Hello. I'm sorry to open another issue on this topic, I've been trying to figure this out for a few days now and can't. Probably my inexperience. Anyway my hardware is:
I'm able to connect and retrieve data using AT commands, but I get timeout errors after connecting using the example code. Any ideas?
The text was updated successfully, but these errors were encountered: