Most BMW vehicles come from the factory with a radio that has a antitheft radio code. The code is only required when the radio is taken out of the car or if the battery dies or is disconnected. Many times, BMW owners will forget their unlock code for the radio or will have never had it if buying the car used. A third party service can be used to retrieve the unlock code. Most services will require you to send the car stereo's serial number.
Insert your car key into the ignition, leaving it in the "off" position.
Depress and hold the "M" button on your radio.
Turn the car key to the "on" position and turn on the radio with the "M" button remaining depressed.
Write down the serial number that appears on your radio's display.
Send your BMW serial number to a third party that can retrieve unlock codes such as the BMW Express Code retrieval service (see Resources).