gsmGetCurrentProvider (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


This returns the GSM Public Land Mobile Network number (PLMN) of the current provider.

 

Input:

None.

 

Returns: DINT

The PLMN of the current provider.

This will return 0 (zero) if not connected to any provider.

 

Declaration:

FUNCTION gsmGetCurrentProvider : DINT;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// The next code will only be executed once after the program starts
gsmPower(power:=TRUE);
 
// Wait until GSM module registered on network
WHILE NOT gsmConnected() DO Sleep(delay:=1000); END_WHILE;
 
DebugFmt(message:="Current provider =\4", v4:=gsmGetCurrentProvider());
 
BEGIN
 
END;
 
END_PROGRAM;