From the Nanocom manual for the GEMS module:
Security learn mode: When the ignition is turned on, the BECM, providing it is in receipt
of a valid mobilization code and is therefore not in an alarmed or immobilised state, sends
a coded signal to the GEMS which the Gems then compares against a mobilization code it
has stored in it. If the two codes compare OK, the Gems will allow the engine to start. This
forms the basis of the immobiliser. If the GEMS ECU, the BECM, or the lockset & key fob
is replaced or other data in the BECM is changed, it may be required for the GEMS to
re-learn a new mobilization code. This is done by using this function to put the GEMS into
Security learn mode whereby the next coded signal it receives is not compared but is
instead stored as the master copy. When security learn mode has been entered the ignition
must be turned off and turned back on to trigger the BECM into sending the code. The
GEMS will check the incoming code and should accept it; however, if there is an error no
matter how slight in the codes makeup, the GEMS can reject it, in which case there will be
no valid code stored. This situation can be checked by looking at the security learn status
in Inputs - Engine and Other which denotes whether the system has a valid code stored or
not.