gsmPower (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


This function controls the power to the on-board cellular engine. This function must be called before any functions depending on an active cellular connection is used - for example gprsOpen().

 

Note: when the devices faults (see fault log), the cellular engine will automatically be turned on, so that a remote connection can be established.

The device will automatically (if configured) connect to the RTCU Communication Hub in this situation.

 

 

Input:

power : BOOL

TRUE:

Turns on the power.

FALSE:

Turns off the power.

 

hs : BOOL

TRUE:

Use the high-speed link.

FALSE:

Use the standard speed link (default)

Note: This parameter is only supported on the RTCU NX-900 series. Please refer to the technical manual for details.

 

Returns: INT

0

Ok.

1

Modem is busy with: CSD session, mobile network session, or an active voice  (power off not allowed in this case).

2

Modem is blocked because of network/modem problems. Recovery of the lock-up situation is already initiated.

8

System speed is not supported.

9

Modem is already operating in LP mode.

10

Modem is operating in dedicated modem mode using gsmModemMode.

11

Non-recoverable error in communication with the GSM module.

14

Cannot switch high speed mode when powered on.

15

High speed connection is not accessible.

 

Declaration:

FUNCTION gsmPower : INT;
VAR_INPUT
  power : BOOL;
  hs   : BOOL;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Turn on power to the GSM module
gsmPower(power := TRUE);
 
BEGIN
  ...
END;
 
END_PROGRAM;