gsmSetProvider (Function) |
Top Previous Next |
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: 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; ACT : INT; END_VAR;
Example: INCLUDE rtcu.inc |