Old vehicle-specific OBD-II decoding

I’m trying to get data from an old (1996) Chevrolet Suburban 6.5TD, and after a bit of a hiccup, it started to work. However, I’m having trouble decoding the GM-specific mode 22h data. For example, I found CSVs online that describe the fuel rate measurement as mode 22h, PID 1222h, with the fuel rate being A*0.3125 mm3.

With this goal in mind, I tried sending this command through the console:

obd.send 221222 expect_response=True

This produced the output values:

  • 48 6B 10 7F 22 12 22 12 45

I’m not quite sure how to decode that, but to me the 7Fh seems like the error response described on the OBD-II PIDs Wikipedia page, and the result data doesn’t change with different throttle inputs so it quite obviously isn’t correct.

Should I use some other header except the default 7DFh? If so, how would I determine which one to use?

Based on https://www.fastfieros.com/tech/vpw_communication_protocol.htm I should have a header of 6C10F1h (so the whole query would be 6C 10 F1 22 12 22 01 – I don’t know what that trailing 01 is, either), but the Header field only allows 3 characters.

The Understanding CANBUS/OBD Value Output thread includes a link to the ELM327 documentation, which states that the ELM327 does support AT SH xx yy zz to output three-byte headers. So is this a limitation in the AutoPi Cloud UI (looking at elm327.py, it looks like it doesn’t care about the length of the header), and can it be worked around somehow?

I tried running

obd.send 22122201 auto_format=true expect_response=true raw_response=true echo=true output=dict header=6C10F1

and that did result in a meaningful response which varied based on throttle input. So, I ran

obd.query FuelRate3 mode=2212 pid=2201 force=true header=6C10F1 formula='bytes_to_int(message.data[3:])*0.3125'

and this resulted in the correct result. To my surprise, that also worked without the header, so I was able to update my library command to:

  • Name: FUEL_RATE_ENH
  • Description: Fuel Rate (GM)
  • Mode: 2212
  • Code: 2201
  • Header: 7DF
  • Bytes: empty
  • Formula: bytes_to_int(message.data[3:])*0.3125
  • Unit: mm3

Now, when AutoPi manages to sync my update, I should have some proper values being logged. (It’s been a bit sluggish getting synced for some reason.)

Bugger, my logger always logs zeroes out. I wonder what is wrong with that library command?

When I ran the query manually yesterday, it output:

obd.query FuelRate3 mode=2212 pid=2201 force=true header=6C10F1 formula='bytes_to_int(message.data[3:])'
_stamp: '2020-10-28T19:07:23.813731'
_type: fuelrate3
value: 24

I’m pretty sure I ran it without the header too, but apparently didn’t copy and paste that result into my log.

(I know the query I ran yesterday doesn’t have the 0.3125 factor in it.)

This topic was automatically closed 33 days after the last reply. New replies are no longer allowed.