I took my 2006 330i to BMW of Alexandria for this issue. My car was not starting. I had to do a routine of opening and closing the door, take the key out and put it back in a couple of times, and then it would start. The dealer said it's really common. There is a sensor (CAS?) that goes bad. To replace the sensor they have to take out the steering column. The cost was $1200. ~ $500 parts/ $700 labor. They also have to reprogram the computer's software, which was included in that cost. The newer software looks a little bit different. It has a silverish blue color, where my old software was in brown. They had to do this twice, because after the first reprogram, the voice command wouldn't work. They reinstalled a second time and everything works.
At any rate, the problem has gone away. It would have been covered under warranty, but my warranty ran out last year and I didn't buy extended coverage.