Currently, service_discovery expects only when the ECU response is Negative Response.
If a Positive Response is returned, the value of msg.data [2] will be the value of Response Data or Padding.
"Toyota Prius C" responds to TesterPresents as follows (output of candump):
Currently, service_discovery expects only when the ECU response is Negative Response.
If a Positive Response is returned, the value of msg.data [2] will be the value of Response Data or Padding.
"Toyota Prius C" responds to TesterPresents as follows (output of candump):
At this time, the value of msg.data [2] is 00, and service_id cannot be acquired normally.
This commit fix the problem.
When Response ID is other than 0x7F (Negative Response), it is always Positive Response, so you can get service_id by subtracting 0x40.