Skip to content

31: GSM Control ​

Controls the GSM modem, including flight mode and network search.

Documented Method (5) values SET, GET

Shared optional header · Message ID (1) can identify a request, response or publication. A response's own ID is separate from Response To (3). Message ID and reply rules apply unless an interaction states an exception.

Message fields

Fields specific to GSM Control. Operation sections below explain when each field is used.

FieldTypeDescription
Flight modeField 1bool
DurationField 2uint32
GSM ActiveField 3bool
Request ControlField 4bool

Note this will always be true when GETting state in flight mode (as control has been taken).

Start SearchField 5uint8

Trigger a network search. When present, takes priority over flight mode / duration fields.

  • 0 · Full: Full network scan.
  • 1 · Auto: Automatic search using the last known band.
SETMessage 31

Request

Omit Start Search (field 5), which takes priority over flight-mode controls when present. GSM Active and Request Control (fields 3 and 4) are ignored by SET.

Shared optional Message ID and reply rules

Request headers

MethodHeader 5

Value 1 · SET

Request a service to be perform an action

DurationHeader 7

To be used with the SUBSCRIBE method, or actions that can be timed. When used with a timed action: This defines how long the action should go on for. When used with the SUBSCRIBE method: This defines a duration to keep the subscription active for. A value of 0 means the subscription is indefinite until explicitly unsubscribed. A message with an EXPIRED status code will be sent if the subscription duration elapses without being renewed with a new subscription request.

Request data fields

Flight modeField 1

Enable or disable flight mode. Omission disables it.

DurationField 2

When enabling flight mode, provide 1 to 259200 minutes. If omitted, use header Duration in milliseconds divided by 60000 and rounded down. Disabling flight mode ignores the duration.

Expected response (MT5 - ACK)

Correlation, status and acknowledgment rules · MT5 packet format

GETMessage 31

Request

Shared optional Message ID and reply rules

Request headers

MethodHeader 5

Value 2 · GET

Request a service to be perform an action

Expected response (MT31)

Successful GET returns GSM state directly.

Correlation, status and acknowledgment rules

Response data fields

Flight modeField 1
GSM ActiveField 3
DurationField 2

Remaining external modem reservation time in minutes, returned with field 4.

Request ControlField 4

Present with value true when the modem is reserved for external use.

Message and field constants

Identifiers for this message type and its fields. See the operation sections above for rules and limits.