GetUSSDResponse

From IRON Test Suite
Jump to navigation Jump to search

DESCRIPTION

This command gets response from the existing USSD session on the specified GSM port. Command waits until USSD response is received or optional timeout (entered in seconds) expired or general timeout expired. Response text is displayed as GSM7 or UCS2 coded string. In the case of UCS2 coding each character is displayed as 2 hexadecimal digits.

COMMAND

Command Input arguments Returns
GetUSSDResponse Port index, [Timeout] USSD response string

OUTPUT

USSD response string in the following format:
"Action: %d\nData coding: %d\n(GSM7|HEX|UCS2):%s\n", action, data_coding, ussd_response

EXAMPLE

~# GetUSSDResponse 0 30
Action: 1
Data coding: 15
GSM7:Choose option:
1. Tariffs
2. Info

API

MessageCode: GRA_GET_USSD_RESPONSE_REQUEST

MESSAGE BODY
Field Name Length Description
PortIndex 4 GSM Port index
Timeout 4 Timeout (in seconds)

The format of Message Body can be coded as the following C-language structure:

typedef struct
{
   ULONG    PortIndex
   ULONG    Timeout;
} GRAM_GET_USSD_RESPONSE_REQUEST;

MessageCode: GRA_GET_USSD_RESPONSE_CONFIRM

MESSAGE BODY
Field Name Length Description
Status 4 Command status (0 if successful, otherwise see list of Error Codes Values)
UssdResponse 2048 USSD response string (zero-terminated)
CharSet 4 Character set used (set in AT+CSCS):

0- Unknown
1- GSM
2- HEX
3- UCS2

Action 4

0- no further user action required
1- further user action required
2- USSD terminated by network
3- other local client has responded
4- operation not supported
5- network timeout

DataCoding 4 Data Coding Scheme (ETSI GSM 03.38):
15- default (GSM7)
72- UCS2

The format of Message Body can be coded as the following C-language structure:

typedef struct 
{
   ULONG    Status;
   UCHAR    UssdResponse[2048];
   ULONG    CharSet;
   ULONG    Action;
   ULONG    DataCoding;
} GRAM_GET_USSD_RESPONSE_CONFIRM;