P0161 is heater malfunction, bank 2, sensor 2. That's the O2 sensor downstream from the catalytic converter on the rear three cylinders (4,5 and 6). Annoying as heck to get to. It may be a broken wire, but most likely it's the heater in the sensor that has gone south. I don't know exactly how to test one (I'm sure there's a way, but I've always just replaced the sensor) You'll need a 22mm open end wrench, or better yet, an O2 sensor cut-away socket. You may want to replace the Bank 1, sensor 2 at the same time.
A forum community dedicated to BMW owners and enthusiasts. Come join the discussion about Bimmerfest events, production numbers, programming, performance, modifications, classifieds, troubleshooting, maintenance, and more! Bringing the BMW community together.