gsmSetPIN (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


This sets the PIN code to use for accessing the GSM module next time the GSM module is powered on by using the gsmPower() function. An empty string will disable the use of PIN code.

Only a PIN code with 4 characters is supported.

 

The device must be reset for the new PIN code to take effect.

 

This function does the same as the Device-> Configuration -> GSM Parameters -> PIN code page.

 

Note: this function does not enable or disable the PIN code on the SIM card - to do this use the gsmSimSetPIN function.

 

Input:

pin : STRING

PIN code to use for accessing the SIM card.

 

Returns:

None.

 

Declaration:

FUNCTION gsmSetPIN;
VAR_INPUT
  pin : STRING;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Set the pin code to use
gsmSetPIN(pin :="1234"); // Needs only to be set once (The RTCU stores this information in non-volatile memory)
 
// Turn on power to the GSM module (it will now use "1234" as the pincode)
gsmPower(power := TRUE);
 
BEGIN
  ...
END;
 
END_PROGRAM;