-
Notifications
You must be signed in to change notification settings - Fork 126
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
Response not detected #241
Comments
Note that any time you get a "?" response it means the ELM327 did not understand the command sent. This can happen even with documented AT commands as some clones don't implement the full command set. When setting protocol to Auto, the ELM327 does not do the protocol search immediately, rather it does so on the first PID query to the ECU. The protocol search can take some time, so you need to account for that or it will time out. If you're using myELM327.begin(), this will be done for you, otherwise you can copy the code into your own program. Lines 104 to 138 in e81f308
|
Thanks for the reply, so I assume I would add this to the 'void setup()'? |
Yes, that should work. If you specify the protocol in initializeELM()) then the protocol search is not needed. |
For some reason if I add that it seems that the ESP gets stuck in basically a bootloop. I'm not sure if it is just the placement of the initialize function. I suspect it should maybe move between the ELM port connect and before the myELM327.begin. I'm using the ESP_Bluetooth_Serial example to start with so the setup looks as follows:
|
I would not call |
Sadly I'm still a bit stuck. Seem to just get this response after the initial AT items. I tried setting the protocol in 3 ways. Leaving it as auto and then tried these: It could be that I'm changing that in the wrong place. If I am assuming correctly it looks like I can talk to the adapter but not to the vehicle. It does work in torque so I'm guessing it's just a setting or something
|
"NO DATA" means your ELM can't talk to the car for that particular PID. "?", however, means the ELM doesn't recognize the PID request. Not sure why it wouldn't recognize 010C1, considering it's an often used and standard PID... |
Thank you. I may mess around in Torque to see if I can find out what request it is using for RPM for example. I did not set up anything special in the app so I assumed it was using fairly standard PIDs. Sorry that the testing and responses take so long, I suspect we are in rather different time zones and I only have an hour or so in the evenings to experiment |
@reflexsa It's easier to help if you can post as much data as possible. The full sketch and the serial debug output. |
Is the serial debug output basically what is in the serial monitor when the debug option is 'true' in the . begin function? |
Below is the sketch which is the "ESP32_Bluetooth_Serial" example using the pincode. For the protocol I have tried changing:
The output in the serial monitor is the below (once it begins asking for PID12 it will just keep repeating the same section that I posted above).
|
Looks like it's still trying to set Auto protocol search and then times out on the next call ("010C1"). If the specific protocol is being set properly in your begin() method, then we should see:
|
Ideally I should use protocol ID 6. With the above I just left the default code which I assumed would try the auto search. I'm not sure why it would not send SP A0 and is for some reason sending SP 0. I'm not sure if I am getting closer or further away at this point using '6' for the protocol:
|
Thanks to @jimwhitelaw this should be fixed in #242. Can you retest with the main branch? |
Thank you both. I will hopefully retest in an hour or so |
This is the new output:
|
I also wanted to ask. I see the query for RPM is being sent as '010C1'. What is the 1 at the end for? |
The 1 at the end is telling the ELM327 that we expect only one response for this query. This can speed up some queries because the ELM doesn’t have to wait for possible additional responses. |
Is it easily possible to remove this 1 from the query? I would just like to test if that is what is causing my issue. I have been browsing through the cpp file but I'm not exactly sure where is the best place to change this. |
You can use the ESP32 test sketch to input AT commands and PID queries manually for testing purposes like this. |
Ok I think I have some progress to report. I tried out the ESP32 test sketch and had the following responses. I have noticed that my adapter is not the 'PIC' kind so maybe doesn't support all the functions. I have ordered what I hope is a PIC based version but will see when it arrives. In the meantime please see the 'serial output' below. It looks like if I query with '010C' I get a response but when using '010C1' it does not (just included from where I set the protocl):
|
Yes, it looks like some progress and I agree that what you're seeing is probably related to the specific adapter you're using. It seems a bit unusual that some queries return a single response and most return two responses. In any case, as you've discovered, appending the 1 is not understood by the adapter. If you wanted to permanently stop sending the suffix 1 for your queries, you'd want to modify this code in the formatQuery() method to set query[6-8] all to '\0', although I think a different adapter is a better option: Lines 230 to 245 in 464ecaa
|
Thank you both for the help so far. I'm hoping the other adapter will also happen to work on auto protocol as well just to make things more convenient. Will report back in the next day or two |
I added a Can you test the main branch code and let me know if it fixes things for you? |
Ok I have bad news and bad news. This resulted in the below output. Strangely, the "C" in the query has become a "<". I'm not sure if that is because of the way I set the flag. The second unfortunate thing was the new adapter I ordered turned out to have the exact same hardware even though it was advertised otherwise. I will order a different one and hope for the best...
|
I found the issue with the “<“ char and submitted a fix (#244). Please update your main branch and retest. Thx |
Thank you! It looks like we have had success! For reference the adapter that was giving the hassles shows up as a version v2.1 in Torque with some notes of it being a cheap clone. I still plan to get a better adapter but glad this one can work especially for initial prototyping. Please see the output below, rpm looks correct:
|
Fixed in version 3.3.0 |
Thanks again for the library.
I seem to have some connectivity between my ELM327 and my Wemos D1 R32. However on the rpm example I receive "Response not detected", followed by 'WARNING: Number of payload chars is less than the number of expected response chars returned by ELM327 - returning 0"
It looks like some of the AT queries function but I'm not sure if I am missing something for the rpm.
I'm not sure if the lack of response is due to not selecting a specific protocol.
Apologies for the formatting of the below, looks fine in editing but seems to have no spacing when previewed for some reason.
Thank you for any assistance.
The text was updated successfully, but these errors were encountered: