I had an 06 Z4 3.0 non-M. If I remember correctly, once I set my cell phone to "discovery mode", I think but I cannot remember completely, but I think once my Z presented a code number in the radio display... I think that I then entered that number into the field that automatically appeared on my cell phone.
This is my toy. 1998 (2.8)