All posts by Bain Loo

How to convert BMW DME crankshaft sensor MS42

BMW DME crankshaft sensor

This sensor needs replacement when you test the DME by a diagnostic scan tool like Autohex II BMW Software and you get from fault codes menu a fault telling that crankshaft sensor is malfunction.

Vehicles concerned:

E36/M52 US with DME MS 41.1 (without Z3)Production period: Series introduction up to December 1998

Z3/M52 US with DME MS 41.1Production period: Series introduction until September 1998

E36/S52 US with DME MS 41.2Production period: Series introduction up to December 1998

E39/M52 US with DME MS 41.1Production period: Series introduction until August 1998

E36/M52 ECE with DME MS 41.0 (without Z3)Production period: September 1998 to November 1999

You can buy a used Crankshaft sensor to be used.

Below graph is Installation location of the crankshaft sensor:Below the starter motor.

crankshaft sensor
crankshaft sensor

Now you must swich ignition off and remove crankshaft sensor like follow:

Crankshaft connector
Crankshaft connector
  1. Release screw
  2. Remove the crankshaft sensor

Then follow this graph:


Disconnect plug connection (2). The plug connections are shown here with the intake plenum removed.

Remove the cover of the fuel injector pipe. Pull the plug connection for the VANOS solenoid valve off.

Install the new crankshaft sensor for the DME MS42.

Installation note:
Check the sealing ring and replace as needed.

Install the adapter lead.


New on crankshaft sensor

On the engine wiring harness below the intake plenum(was the old connection for the crankshaft sensor on the engine wiring harness)

On VANOS solenoid valve, also refer to figure below

On the engine wiring harness (previously the VANOS solenoid connection on the engine wiring harness), refer also to the figure below.

Installation note:

Insert the adapter lead from the top (area of the oil filter) starting with the large corrugated pipe diameter.
After the installation, the plug connection for the VANOS solenoid valve/adapter lead (3) must be secured on the VANOS engine oil pipe with 2 cable ties (5). The line (6) from the VANOS solenoid valve must be free of tension so that the relative movements can be balanced out.

Reassemble the vehicle.

Read out the fault memory of DME control unit, check fault messages, then cancel fault memory.



After finishing from assembling the sensor, you must do some service functions, especially for resetting sensor learnt values.

ISTA-D can do the job for this task, you will need a diagnostic scan tool hardware to run ISTA-D.

Autohex II scan tool can be used to run ISTA-D as it is Pass-Thru device.

You can check Autohex II scan tool pricing and features from thier website.

Check Autohex II Price.

Automotive Gateways

Automotive Gateways


  • Gateways in current/future architectures
  • Main GW functions (Routing, Diagnostic, …)
  • Main principles of GW’s functionality (SW aspects, protocol aspects, AUTOSAR aspects)
  • LIN/CAN/FlexRay 2 Ethernet transport mechanisms (1722a)
    GW performance aspects
  • Ethernet GW/Switch in future EE architectures

Characteristics of different GW types

No. of interfaces No. of GWs per vehicle Diagnostic interface Comments
Central GW any no. of LIN/CAN/FR <= 1 possible Increasing no. of itfs.
Local GW 1 x domain bus itf.
n x subdomain bus itfs.
>= 0 not possible
Domain GW 1 x domain bus itf.
1-2 x backbone itf.
>= 0 possible
GW with integrated Switch any no. of LIN/CAN/FR/Eth >= 0 possible

Routing Features

  • Message Routing
  • Packet Routing
  • Signal Routing (eventually with signal processing)
  • Routing with High Priority
  • Different sorts of rate adaption between received and transmitted message, e.g.
  • Periodic & Immediate Transmit On Change (TOC)
  • Y Routing
  • Diagnostic Routing


Other Gateway Functions

  • Nominal-actual configuration comparison
  • Diagnostic tester: CAN BUS and Ethernet interface provided (in BMW F series for example)
  • Flash function
  • Message mirroring on diagnostic bus
  • Network management
  • OEM specific features

Gateway Protocol Stack Overview


Notes: IL = Interaction Layer according OSEK Comms 3.03 and AUTOSAR; adopts messages/signals to PDUs