ELMduino: Response not detected
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.
Sending the following command/query: AT D
Received char: T
Received char: D
Received char: A
Received char: 8
Received char: 1
Received char: _
Received char: V
Received char: 0
Received char: .
Received char: 1
Received char: 2
Received char: \r
Received char: \n
Received char: O
Received char: K
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received: TDA81V0.12OK
Clearing input serial buffer
Sending the following command/query: AT Z
Received char: A
Received char: T
Received char: _
Received char: Z
Received char: \r
Received char: E
Received char: L
Received char: M
Received char: 3
Received char: 2
Received char: 7
Received char: _
Received char: v
Received char: 2
Received char: .
Received char: 1
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received: ATZELM327v2.1
Clearing input serial buffer
Sending the following command/query: AT E0
Received char: A
Received char: T
Received char: _
Received char: E
Received char: 0
Received char: \r
Received char: O
Received char: K
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received: ATE0OK
Clearing input serial buffer
Sending the following command/query: AT S0
Received char: O
Received char: K
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received: OK
Clearing input serial buffer
Sending the following command/query: AT AL
Received char: ?
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received:
Clearing input serial buffer
Sending the following command/query: AT ST 00
Received char: ?
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received:
Clearing input serial buffer
Sending the following command/query: AT SP A0
Received char: ?
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received:
Setting protocol via AT TP A%c did not work - trying via AT SP %c
Clearing input serial buffer
Sending the following command/query: AT SP 0
Received char: O
Received char: K
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received: OK
Setting protocol via AT SP %c did not work
Connected to ELM327
Service: 1
PID: 12
Normal length query detected
Query string: 010C1
Clearing input serial buffer
Sending the following command/query: 010C1
Received char: ?
Received char: \r
Received char: \n
Received char: >
Delimiter found.
All chars received:
Expected response header: 410C
Response not detected
WARNING: Number of payload chars is less than the number of expected response chars returned by ELM327 - returning 0
RPM: 0`
About this issue
- Original URL
- State: closed
- Created 3 months ago
- Comments: 28 (6 by maintainers)
Fixed in version 3.3.0
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:
I found the issue with the “<“ char and submitted a fix (#244). Please update your main branch and retest. Thx
I added a
specifyNumResponses
boolean flag to the main class. If you set it tofalse
and then run the queries, you should have success without having to edit the lib files.Can you test the main branch code and let me know if it fixes things for you?
You can use the ESP32 test sketch to input AT commands and PID queries manually for testing purposes like this.
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.
I would not call
initializeELM()
directly, but set all parameters inbegin()
instead.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. https://github.com/PowerBroker2/ELMduino/blob/e81f308098188baf2e51f1f32a94cd3783377c7f/src/ELMduino.cpp#L104-L138