Hi all, newbie to BMW car and bimmerforums here.

I just got drivetrain malfunction 3 days ago. Bought the car 3 weeks ago and I haven't got my plate yet and the car already breaks down, please help.

Basically in the morning, it started fine, used it to go to office like usual 25miles one way.
In the afternoon, planned to go home, the car started fine. Suddenly in the highway, DTMF message came up. Car started to shudder, lost power, I had to park on the side of the highway, then the car died. I tried to start it, no luck. It still cranks though.

I checked the battery, was 12V, so I replaced it, but didn't solve the issue, car still cannot start.
I looked up the history of carfax, it had 1 service for cleaning the spark plugs, so I thought the plugs might be bad, so I changed all 4, and still no start.

I checked all the fuses in the trunk, right rear side, every fuse is good; the relay for CAS is also good.

My guess is
1. fuel pump control module (EKPS)? I do not hear any whirring sound from the electric fuel pump
2. ignition coil? but I never experienced any lost power or shuddering before
3. fuel injector?
4. fuel pump?

OBD Error codes:
P0366
Camshaft position Sensor B - Circuit Range/ Performance (Bank 1)

P0341
Camshaft position Sensor A (Bank 1) - Circuit Range/ Performance

P1338
Camshaft position Sensor, Bank 1 Open Circuit/ Short to B+



My car is 2013 X3 28i, Please help somebody, thanks.