gsmSetAntennaMode (Function)

Top  Previous  Next

Architecture:

X32 / NX32

Device support:

SX1, AX9i, AX9 turbo/encore

Firmware version:

2.70


This function switches between the on-board internal or an optional external GSM antenna.

The selection made by calling this function will remain in effect (persistent through reset/power down) until changed explicitly by a new call to gsmSetAntennaMode.

 

The gsmGetAntennaMode function can be used to determine which antenna is used.

 

 

Input:

mode : SINT

1

Switches to internal antenna.

2

Switches to external antenna.

3

AX9i/AX9 turbo/encore: Selected antenna is determined by DIP-switch 4 (on=internal,off=external. Please refer to technical manual for details).

 

Returns: INT

0

Successful.

1

Illegal mode.

 

 

Declaration:

FUNCTION gsmSetAntennaMode : INT;
VAR_INPUT
  mode : SINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
// Switch to external antenna. Only required to be set once.
gsmSetAntennaMode(mode := 2);
 
BEGIN
  ...
END;
 
END_PROGRAM;