Add single fw requests for hyundai ECUs not supporting multi requests

This commit is contained in:
openpilot laptop 2020-05-20 14:07:04 -07:00
parent 3f8afe593f
commit b8cc31f888
2 changed files with 23 additions and 6 deletions

View file

@ -39,12 +39,18 @@ UDS_VERSION_RESPONSE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER + 0x40])
p16(uds.DATA_IDENTIFIER_TYPE.APPLICATION_SOFTWARE_IDENTIFICATION)
HYUNDAI_VERSION_REQUEST = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
HYUNDAI_VERSION_REQUEST_SHORT = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(0xf1a0) # 4 Byte version number
HYUNDAI_VERSION_REQUEST_LONG = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(0xf100) # 4 Byte version number
HYUNDAI_VERSION_REQUEST_MULTI = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER]) + \
p16(uds.DATA_IDENTIFIER_TYPE.VEHICLE_MANUFACTURER_SPARE_PART_NUMBER) + \
p16(uds.DATA_IDENTIFIER_TYPE.APPLICATION_SOFTWARE_IDENTIFICATION) + \
p16(0xf100) + \
p16(0xf1a0) # 4 Byte version number
HYUNDAI_VERSION_RESPONSE = bytes([uds.SERVICE_TYPE.READ_DATA_BY_IDENTIFIER + 0x40])
TOYOTA_VERSION_REQUEST = b'\x1a\x88\x01'
TOYOTA_VERSION_RESPONSE = b'\x5a\x88\x01'
@ -57,7 +63,17 @@ REQUESTS = [
# Hundai
(
"hyundai",
[HYUNDAI_VERSION_REQUEST],
[HYUNDAI_VERSION_REQUEST_SHORT],
[HYUNDAI_VERSION_RESPONSE],
),
(
"hyundai",
[HYUNDAI_VERSION_REQUEST_LONG],
[HYUNDAI_VERSION_RESPONSE],
),
(
"hyundai",
[HYUNDAI_VERSION_REQUEST_MULTI],
[HYUNDAI_VERSION_RESPONSE],
),
# Honda

View file

@ -137,11 +137,12 @@ ECU_FINGERPRINT = {
FW_VERSIONS = {
CAR.SONATA: {
(Ecu.esp, 0x7d1, None): [b'\xf1\x8758910-L0100\xf1\xa01.04'],
(Ecu.fwdRadar, 0x7d0, None): [b'\xf1\x00DN8_ SCC FHCUP 1.00 1.00 99110-L0000 '],
(Ecu.esp, 0x7d1, None): [b'\xf1\x8758910-L0100\xf1\x00DN ESC \x06 104\x19\x08\x01 58910-L0100\xf1\xa01.04'],
(Ecu.engine, 0x7e0, None): [b'\xf1\x87391162M003\xf1\xa0000F'],
(Ecu.eps, 0x7d4, None): [b'\xf1\x8756310L0010\x00\xf1\xa01.01'],
(Ecu.fwdRadar, 0x7d0, None): [b'\xf1\x8799110L0000\xf1\xa01.00'],
(Ecu.transmission, 0x7e1, None): [b'\xf1\x87SALFBA4195874GJ2EVugvf\x86hgwvwww\x87wgw\x86wc_\xfb\xff\x98\x88\x8f\xff\xe23\xf1\x81U903\x00\x00\x00\x00\x00\x00'],
(Ecu.eps, 0x7d4, None): [b'\xf1\x8756310L0010\x00\xf1\x00DN8 MDPS C 1.00 1.01 56310L0010\x00 4DNAC101\xf1\xa01.01'],
(Ecu.fwdCamera, 0x7c4, None): [b'\xf1\x00DN8 MFC AT USA LHD 1.00 1.01 99211-L0000 191016'],
(Ecu.transmission, 0x7e1, None): [b'\xf1\x00bcsh8p54 U903\x00\x00\x00\x00\x00\x00SDN8T16NB0z{\xd4v'],
}
}