My moneys on a coilpack.
When you read the codes, note down which coilpack has the error. Turn the car off, swap that coilpack to a different cylinder, re-read the error, the code should now say it's a different cylinders coilpack is at fault
That way you isolate it easily and know which one to replace
Just fit a good OEM second hand one, don't buy junk from China. The last thing you want to sacrafise quality on is anything engine/sensor related
If you can't find the problem in your cheap code reader, you'll want to become friends with someone with the proper BMW INPA/ISTA software, as a lot of these cheap code readers won't go deep enough, and some wrongly will report the incorrect fault depending on how deep the problem is, for example when a ecu module is faulty, often the cheap code readers will just blame it on a sensor versus the ecu module itself that controls that sensor.
Also be aware, with anything E9X/E6X onwards, reading the codes/programming without a proper trickle charging power supply (that is what's used at BMW etc etc) majorly runs the risk of flattening your battery, depending on what it is you're doing, and frying the ecu modules...
For this you're probably fine to quickly look and disconnect it, as a cheap reader won't go as deep, but for example using the proper software suite, rinses the battery.
I have seen many people fry ecu modules via incorrect sustained voltages when programming without a power supply system attached - and no a jump start kit will not do the job in this case.