Battery-Emulator icon indicating copy to clipboard operation
Battery-Emulator copied to clipboard

[BUG] BMW I3 battery_energy_content_maximum_Wh - disagree

Open havrla opened this issue 10 months ago • 0 comments

Heloo next report .....

If the battery is connected to the vehicle, it provides correct data about the usable capacity in the CAN message. However, if the battery is connected to an emulator, the data from the battery is not accurate.

One video is better than describing the problem ten times. https://github.com/user-attachments/assets/4d03e17b-b757-48ba-a16c-79e408cb7166

It looks like what the emulator reads is some kind of default startup value, which is later refined after a query from the vehicle. 60Ah -> 22040Wh 94Ah -> 27780Wh 120Ah -> 41780Wh

The first step is to modify the battery detection. if (battery_energy_content_maximum_Wh > 33000) { detectedBattery = BATTERY_120AH; } else if (battery_energy_content_maximum_Wh > 23000) { detectedBattery = BATTERY_94AH; } else { detectedBattery = BATTERY_60AH; }

The second step, which is beyond my capabilities, is to identify the initialization of the value in the BMS. CAN sniff from CAN gateway 2.port is battery, scenario same as video. init-max.log diff-ini.log

and other sniff
60Ah:

auto-60.log emuklator-60.log

94Ah:

emulator-94.log auto-94.log

120Ah:

auto-120.log emulator-120.log

Thanks thanks

havrla avatar Mar 01 '25 14:03 havrla