I am using the library OBD-Python and when I tried to get a VIN number from my vehicle even following the Custom Commands documentation, I received this message:
[obd.obd] 'b'0902': VIN NUMBER' is not supported Date: 2018-07-09 14:48:30.428588 -- VIN NUMBER: None.
def vin(messages):
""" decoder for RPM messages """
d = messages[0].data # only operate on a single message
d = d[2:] # chop off mode and PID bytes
v = bytes_to_int(d) / 4.0 # helper function for converting byte arrays to ints
return v * Unit.VIN # construct a Pint Quantity
c = OBDCommand("VIN", # name
"VIN NUMBER", # description
b"0902", # command
17, # number of return bytes to expect
vin, # decoding function
ECU.ENGINE, # (optional) ECU filter
True) # (optional) allow a "01" to be added for speed
o = obd.OBD()
o.supported_commands.add(c)
o.query(c)
print('Data: ' + str(datetime.datetime.now()) + ' -- VIN NUMBER: '+str(connection.query(c)))
What I am doing wrong?