Supporting multiple pids for service 01
jverkoey opened this issue · 0 comments
The SAE J1979 specification allows service 01 commands to include up to 6 PIDs, which can be a helpful way to improve throughput when querying many PIDs for vehicle telematics. It looks like the ELM327-emulator doesn't handle this ability yet though so I wanted to track this as a feature request.
An example command/response prompt:
> 0101030406070C3
7E8101241010007E500
7E82103010004000680
7E822077D0C00000000
Other requirements from the service 01 documents (section 7.1.1):
The purpose of this service is to allow access to current emission-related data values, including analogue inputs and outputs, digital inputs and outputs, and system status information. The request for information includes a parameter identification (PID) value that indicates to the on-board system the specific information requested.
The ECU(s) shall respond to this message by transmitting the requested data value last determined by the system. All data values returned for sensor readings shall be actual readings, not default or substitute values used by the system because of a fault with that sensor.
Not all PIDs are applicable or supported by all systems. PID $00 is a bit-encoded value that indicates for each ECU which PIDs are supported. PID $00 indicates support for PIDs from $01 to $20. PID $20 indicates support for PIDs $21 through $40, etc. This is the same concept for PIDs/OBD Monitor IDs/TIDs/InfoTypes support in Services $01, $02, $06, $08, $09. PID $00 is required for those ECUs that respond to a corresponding Service $01 request message.
IMPORTANT — All emissions-related OBD ECUs which at least support one of the services defined in this document shall support Service $01 and PID $00. Service $01 with PID $00 is defined as the universal “initialization/keep alive/ping” message for all emissions-related OBD ECUs
The request message may contain up to six (6) PIDs. An external test equipment is not allowed to request a combination of PIDs supported and PIDs, which report data values. The ECU shall support requests for up to six (6) PIDs. The request message may contain the same PID multiple times. The ECU shall treat each PID as a separate parameter and respond with data for each PID (data returned may be different for the same PID) as often as requested.
The order of the PIDs in the response message is not required to match the order in the request message.