gsmSetProvider (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


This function will try to register the device with a specific network provider. Use the gsmGetProviderList() function block to get a list of currently available providers. It should be noted that only providers with State=1 or State=2 (from gsmGetProviderList()), can be used in this function as the provider.

 

Please note that after calling this function, the gsmConnected() function will signal when (and if) successful registration is accomplished.

If the selected operator is not available, the device will be disconnected until a new operator is selected.

 

When using the RTCU DX4i pro LTE it is recommended to use the 'ACT' parameter for a successful connection to Cat M1/NB1.

 

Input:

Provider : DINT

The Public Land Mobile Network number (PLMN) of the network provider. If set to 0, the provider will be selected automatically by the device.

The first 5 digits of the IMSI number contain the PLMN number of the home network (see gsmGetIMSI).

 

ACT : INT (only supported from on X32/NX32 firmware V4.70)

The Access Technology selected:  
0 = Default, 1 = GSM, 3=UMTS, 8=LTE, 9=LTE Cat M1, 10=LTE Cat NB1
 

Please notice that only access technologies supported by the specific product in use can be successfully selected.
 

Returns: INT

0 - function was successful.

1 - no success or parameter not supported.

 

Declaration:

FUNCTION gsmSetProvider : INT;
VAR_INPUT
  Provider : DINT;

  ACT : INT;  

END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Turn on power to the GSM module
gsmPower(power := TRUE);
 
BEGIN
  ...
  // Register at new provider:
  gsmSetProvider(Provider := 23802);
  ...
END;
 
END_PROGRAM;