From c2e561aa735cb4a431ea2c2cfeee999e63a27077 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Mon, 29 Aug 2022 22:51:50 -0700 Subject: [PATCH] VIN: query physical addresses (#25122) * Try engine and VMCU addrs for VIN * Add address for Honda * Update selfdrive/car/vin.py * Update selfdrive/car/vin.py * Update selfdrive/car/vin.py old-commit-hash: 0697ca223974f2361ca655506ceab7d18917b9de --- selfdrive/car/vin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/selfdrive/car/vin.py b/selfdrive/car/vin.py index 5ace68649b..ae3aa675c7 100755 --- a/selfdrive/car/vin.py +++ b/selfdrive/car/vin.py @@ -5,7 +5,6 @@ import traceback import cereal.messaging as messaging import panda.python.uds as uds -from panda.python.uds import FUNCTIONAL_ADDRS from selfdrive.car.isotp_parallel_query import IsoTpParallelQuery from system.swaglog import cloudlog @@ -24,10 +23,11 @@ def is_valid_vin(vin: str): def get_vin(logcan, sendcan, bus, timeout=0.1, retry=5, debug=False): + addrs = [0x7e0, 0x7e2, 0x18da10f1, 0x18da0ef1] # engine, VMCU, 29-bit engine, PGM-FI for i in range(retry): for request, response in ((UDS_VIN_REQUEST, UDS_VIN_RESPONSE), (OBD_VIN_REQUEST, OBD_VIN_RESPONSE)): try: - query = IsoTpParallelQuery(sendcan, logcan, bus, FUNCTIONAL_ADDRS, [request, ], [response, ], functional_addr=True, debug=debug) + query = IsoTpParallelQuery(sendcan, logcan, bus, addrs, [request, ], [response, ], debug=debug) for (addr, rx_addr), vin in query.get_data(timeout).items(): # Honda Bosch response starts with a length, trim to correct length