razem-io / openpilot

openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 85 supported car makes and models.
https://comma.ai/
MIT License
0 stars 0 forks source link

Nissan X-TRAIL - Firmware scan only finds 1 instead of 3 #5

Open razem-io opened 2 years ago

razem-io commented 2 years ago

Output of fw script with --scan option:

Found FW versions
{
  (Ecu.unknown, 0x71f, None): [b'\xf1\xa0A']
  (Ecu.unknown, 0x728, None): [b'\xf1\xa0\x02']
  (Ecu.unknown, 0x725, None): [b'\xf1\xa0s']
  (Ecu.unknown, 0x742, None): [b'6FP2A\x99A\x05\x02N123F\x18\x02\x00\x00\x00\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x713, None): [b'4CE0C\x082L1\x0cP81\x00\xc0Q-N\x18\x015  \x83']
  (Ecu.unknown, 0x75d, None): [b'6FR1A)A\x06\x04\x00\x00\x00\x00\x01\x93U\x0ec\x00\x05\x00\x00\x00\x80']
  (Ecu.unknown, 0x766, None): [b'\xf1\xa0 ']
  (Ecu.unknown, 0x76a, None): [b'\xf1\xa0 ']
  (Ecu.unknown, 0x73d, None): [b'6FL0A\x061L9\xa2\xc7Vp \x05\x02\x05\x00\x01\x012  \x83']
  (Ecu.unknown, 0x740, None): [b'6FU1BD\x11\x02\x00\x02e\x95e\x80iX#\x01\x00\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x748, None): [b'4CL1B\x05A\x02\x02\x00\x01\xd8RA d\x00\x00\x00\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x74d, None): [b'5NA0A!D\x08\x0700000\xdbB&\x00\xb0\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x743, None): [b'6FR2A\x18B\x05\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x744, None): [b'4BA0D@4AP%\x01 \x12#\x16H\x00\x00\x00\x005  \x83']
  (Ecu.unknown, 0x755, None): [b'6FL0A3B\x04\x18\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x73e, None): [b'6FU1BD\x11\x02\x00\x02e\x95e\x80iX#\x01\x00\x00\x00\x00\x00\x80']
  (Ecu.unknown, 0x7c1, None): [b'\xf1\xa0B']
  (Ecu.unknown, 0x18dad0f1, None): [b'284U26FR0E']
  (Ecu.unknown, 0x7d4, None): [b'6FL0A\x061L9\xa2\xc7Vp@\x05\x02\x05\x00\x01\x012  \x83']
  (Ecu.unknown, 0x7b7, None): [b'6FM1A\tA\x04\x03\x00\x07@\x00\x11\x13\x14\x00\x04\x00\x03\x00\x02\x00\x80']
  (Ecu.unknown, 0x7e0, None): [b'6FU9B\xa0A\x06\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80']
}

FW Script without --scan option:

Found FW versions
{
  (Ecu.eps, 0x742, None): [b'6FP2A\x99A\x05\x02N123F\x18\x02\x00\x00\x00\x00\x00\x00\x00\x80']
}
avolmensky commented 2 years ago

Wrote a quick python script to match up these ID's with the spreadsheet. This is what I found:


73d - BSM
74d - IPDM E/R
744 - HVAC
755 - PARKING BRAKE
7d4 - BSM
7b7- SONAR?```
robin-reckmann commented 2 years ago

@avolmensky This fits to my list also. 7B7 is listed as AVM (around view monitor).

Furthermore I have this ECUs: 740 - ESP / ABS (its actually the abs ecu handling nissans vdc)

robin-reckmann commented 2 years ago

For fpv2, I would go with the following ECUs for the leaf:

0x707 - Ecu.fwdCamera 0x740 - Ecu.esp 0x742 - Ecu.eps 0x79d - Ecu.transmission

And with these for the X-Trail:

0x740 - Ecu.esp 0x742 - Ecu.eps 0x743 - Ecu.combinationMeter 0x7e0 - Ecu.engine

And it seems that all of these have a 0x20 offset, so we dont have to blow up the fw_query script with the 5 different nissan offsets :-)

robin-reckmann commented 2 years ago

If all Nissans have IPDM E/R, bsm, hvac or parking brake, we could add them to the car.capnp later on.