New tuners get 20% OFF first 5 orders — Register now!

BMW 540i G30/G31 B58

The BMW 540i belongs to the G30/G31 5 Series generation, built approximately 2017–2023. It uses the B58, a 3.0L turbocharged inline-six petrol engine. Covered body styles are Sedan and Touring. Depending on the variant, it was offered with rear-wheel drive or xDrive all-wheel drive, paired with the eight-speed Steptronic automatic. Engine management is by a BMW DME; identify the exact ECU hardware and software from the vehicle before ordering a file.

About the BMW 540i G30/G31

The BMW 540i is the six-cylinder petrol model of the G30 Sedan and G31 Touring 5 Series, available as the 540i and 540i xDrive. Throughout this generation it uses an eight-speed Steptronic transmission.

The key difference is the LCI update. Pre-LCI cars use the B58 without a mild-hybrid system, while LCI models add a 48V mild-hybrid system with a starter-generator. After the update, the Touring was offered as the 540i xDrive. Exact ECU hardware and software should be confirmed from the vehicle before a calibration file is prepared.

Please tell us whether your car is pre-LCI or LCI, along with its production date, body, drivetrain, current software and fuel. On LCI cars, any stored faults in the 48V system should be resolved first, and modifications or previous tuning should be listed.

Model & Generation Context

Engine family

B58

Exact revision is production-date and vehicle-specific

Displacement

3.0L

Production

c. 2017–2023

Approximate; confirm the build date from the vehicle

Fuel Type

Petrol

Supported Model Variants

BMW 540i

Also sold as 540i xDrive, 540i xDrive Touring

  • Pre-LCI 540i / 540i xDrive: From launch to the LCI update · No 48V mild-hybrid system
  • LCI G30 Sedan (540i, 540i xDrive): From the LCI update; 2021 model year in the US · 48V mild hybrid
  • LCI G31 Touring (540i xDrive): From the LCI update, where offered by market · 48V mild hybrid

Engine: B58

Production: c. 2017–2023

Chassis: G30, G31 · Sedan, Touring

Drivetrain: RWD, xDrive

Engine Platform

ECU & Transmission Context

BMW DME — identify from vehicle

Read the ECU hardware and software numbers from the vehicle before ordering a file.

Eight-speed Steptronic

Gearbox specification is vehicle-specific; confirm it from the vehicle order data.

Identification & Pre-Tuning Checks

  • Confirm the engine code on the vehicle matches the B58 before ordering a file.
  • The exact engine revision is production-date and vehicle-specific; it is not inferred from the model name.
  • Identify the BMW DME and its exact hardware and software version from the vehicle; it is not inferred from the model name.
  • Scan for stored fault codes and resolve existing issues before any calibration work.

Available Service Paths

Related Resources

BMW B58 File Service

Order a file for your BMW 540i

Prepare the original ECU file, vehicle details, fuel and hardware setup before opening a file request.

Open File Service Portal

Original ECU File

Read via OBD, Bench or Boot

Vehicle Details

Model, year and specification

Fuel Information

Fuel type and octane rating

ECU Identification

Hardware and software version