我正在使用 OBD-Python 库,当我尝试从我的车辆中获取 VIN 号时,即使遵循自定义命令文档,我也会收到以下消息:
[obd.obd] 'b'0902':不支持 VIN NUMBER 日期:2018-07-09 14:48:30.428588 -- VIN NUMBER:无。
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)))
我做错了什么?