No Data Response to 0100\r
Posted: Sun Jan 19, 2025 11:57 am
Good evening,
I am trying to communicate with the ECU at request address 7E7.
My vehicle has 2 ECUs. The first one is at address 7E1 and the second at 7E7. However, when I set the header to 7E7, I receive "NO DATA" back from the STM on the UART bus.
However, if i get out my trusty cell phone running the app Torque, I can set the header to 7E7 and query 0x00 in mode 1 and I receive a response from the ECU at that address.
Does anyone have any thoughts or ideas on why the OBD2UART is unable to communicate with the ECU at 7E7, but it can communicate with the other ECU at 7E1? I have verified that the readPID() function is getting a response from the ECU at 7E1 and not the one at 7E7.
In the COBD::receive function, i modified it to print each character. Below is the output and test code. When using the Torque app, the output of 0x00 with mode 1 and header 7E7 is 7ef064100be3eb813.
I'm looking for any guidance from the forum here on possible issues, solutions, tests, etc. I'm banging my head against the wall because with my Torque app, I can communicate with both modules.
<<<ATI
>>>
<<<ATI
Char: O (ASCII: 79)
Char: B (ASCII: 66)
Char: D (ASCII: 68)
Char: 2 (ASCII: 50)
Char: U (ASCII: 85)
Char: S (ASCII: 83)
Char: A (ASCII: 65)
Char: R (ASCII: 82)
Char: T (ASCII: 84)
Char: (ASCII: 32)
Char: V (ASCII: 86)
Char: 1 (ASCII: 49)
Char: . (ASCII: 46)
Char: 1 (ASCII: 49)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OBD2USART V1.1
OneGauge OBD-II Adapter detected
OBD firmware version 1.1
<<<ATZ
Char: E (ASCII: 69)
Char: L (ASCII: 76)
Char: M (ASCII: 77)
Char: 3 (ASCII: 51)
Char: 2 (ASCII: 50)
Char: 7 (ASCII: 55)
Char: (ASCII: 32)
Char: v (ASCII: 118)
Char: 1 (ASCII: 49)
Char: . (ASCII: 46)
Char: 5 (ASCII: 53)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>ELM327 v1.5
<<<ATH1
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<ATSP0
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<ATH0
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<010C
Char: S (ASCII: 83)
Char: E (ASCII: 69)
Char: A (ASCII: 65)
Char: R (ASCII: 82)
Char: C (ASCII: 67)
Char: H (ASCII: 72)
Char: I (ASCII: 73)
Char: N (ASCII: 78)
Char: G (ASCII: 71)
Char: . (ASCII: 46)
Char: . (ASCII: 46)
Char: . (ASCII: 46)
(ASCII: 13)
Char: 4 (ASCII: 52)
Char: 1 (ASCII: 49)
Char: (ASCII: 32)
Char: 0 (ASCII: 48)
Char: C (ASCII: 67)
Char: (ASCII: 32)
Char: 0 (ASCII: 48)
Char: C (ASCII: 67)
Char: (ASCII: 32)
Char: 1 (ASCII: 49)
Char: D (ASCII: 68)
Char: (ASCII: 32)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>41 0C 0C 1D
<<<ATH1
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
PID: 12
A: 60
B: 49
C: 208
D: 0
<<<ATSH 7E7
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<0100
Char: N (ASCII: 78)
Char: O (ASCII: 79)
Char: (ASCII: 32)
Char: D (ASCII: 68)
Char: A (ASCII: 65)
Char: T (ASCII: 84)
Char: A (ASCII: 65)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>NO DATA
I am trying to communicate with the ECU at request address 7E7.
My vehicle has 2 ECUs. The first one is at address 7E1 and the second at 7E7. However, when I set the header to 7E7, I receive "NO DATA" back from the STM on the UART bus.
However, if i get out my trusty cell phone running the app Torque, I can set the header to 7E7 and query 0x00 in mode 1 and I receive a response from the ECU at that address.
Does anyone have any thoughts or ideas on why the OBD2UART is unable to communicate with the ECU at 7E7, but it can communicate with the other ECU at 7E1? I have verified that the readPID() function is getting a response from the ECU at 7E1 and not the one at 7E7.
In the COBD::receive function, i modified it to print each character. Below is the output and test code. When using the Torque app, the output of 0x00 with mode 1 and header 7E7 is 7ef064100be3eb813.
I'm looking for any guidance from the forum here on possible issues, solutions, tests, etc. I'm banging my head against the wall because with my Torque app, I can communicate with both modules.
Code: Select all
#include <Wire.h>
#include "OBD2UART.h"
#include <chrono>
#include <thread>
bool headerEnabled = false;
std::map<uint16_t, std::vector<uint8_t>> pidMaps; // PID maps for each ECU
std::vector<uint16_t> ecuIDs;
COBD obd;
void setup()
{
esp_sleep_enable_timer_wakeup(10 * 1000000);
Serial.begin(115200);
delay(100);
for (int x = 0; x < 11; x++)
{
byte version = obd.begin();
Serial.print("OneGauge OBD-II Adapter ");
if (version > 0)
{
Serial.println("detected");
Serial.print("OBD firmware version ");
Serial.print(version / 10);
Serial.print('.');
Serial.println(version % 10);
break;
}
else
{
Serial.println("not detected");
delay(100);
}
if (x == 10)
{
Serial.println("Too many errors. Going to deep sleep");
x = 0;
esp_deep_sleep_start();
}
}
char buf[64];
// reset the STM32 module
obd.sendCommand("ATZ\r", buf, sizeof(buf));
obd.sendCommand("ATH1\r", buf, sizeof(buf));
headerEnabled = true;
obd.sendCommand("ATSP0\r", buf, sizeof(buf));
int value;
obd.readPID(0x0C, value); //
obd.setHeaderID(0x7E7);
obd.sendCommand("0100\r", buf, sizeof(buf));
}
void loop()
{
}
>>>
<<<ATI
Char: O (ASCII: 79)
Char: B (ASCII: 66)
Char: D (ASCII: 68)
Char: 2 (ASCII: 50)
Char: U (ASCII: 85)
Char: S (ASCII: 83)
Char: A (ASCII: 65)
Char: R (ASCII: 82)
Char: T (ASCII: 84)
Char: (ASCII: 32)
Char: V (ASCII: 86)
Char: 1 (ASCII: 49)
Char: . (ASCII: 46)
Char: 1 (ASCII: 49)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OBD2USART V1.1
OneGauge OBD-II Adapter detected
OBD firmware version 1.1
<<<ATZ
Char: E (ASCII: 69)
Char: L (ASCII: 76)
Char: M (ASCII: 77)
Char: 3 (ASCII: 51)
Char: 2 (ASCII: 50)
Char: 7 (ASCII: 55)
Char: (ASCII: 32)
Char: v (ASCII: 118)
Char: 1 (ASCII: 49)
Char: . (ASCII: 46)
Char: 5 (ASCII: 53)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>ELM327 v1.5
<<<ATH1
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<ATSP0
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<ATH0
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<010C
Char: S (ASCII: 83)
Char: E (ASCII: 69)
Char: A (ASCII: 65)
Char: R (ASCII: 82)
Char: C (ASCII: 67)
Char: H (ASCII: 72)
Char: I (ASCII: 73)
Char: N (ASCII: 78)
Char: G (ASCII: 71)
Char: . (ASCII: 46)
Char: . (ASCII: 46)
Char: . (ASCII: 46)
(ASCII: 13)
Char: 4 (ASCII: 52)
Char: 1 (ASCII: 49)
Char: (ASCII: 32)
Char: 0 (ASCII: 48)
Char: C (ASCII: 67)
Char: (ASCII: 32)
Char: 0 (ASCII: 48)
Char: C (ASCII: 67)
Char: (ASCII: 32)
Char: 1 (ASCII: 49)
Char: D (ASCII: 68)
Char: (ASCII: 32)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>41 0C 0C 1D
<<<ATH1
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
PID: 12
A: 60
B: 49
C: 208
D: 0
<<<ATSH 7E7
Char: O (ASCII: 79)
Char: K (ASCII: 75)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>OK
<<<0100
Char: N (ASCII: 78)
Char: O (ASCII: 79)
Char: (ASCII: 32)
Char: D (ASCII: 68)
Char: A (ASCII: 65)
Char: T (ASCII: 84)
Char: A (ASCII: 65)
(ASCII: 13)
(ASCII: 13)
Char: > (ASCII: 62)
>>>NO DATA