[ENG] 14.6. [DKSF 52/202.10 IU] Controlling GSM Modem

Requesting a Balance of a SIM Card

http://192.168.0.100/ussdstart.cgi?requestcode

where:

requestcode – is a100x, which means *100#. In the code of the USSD request, «*» is replaced by «a», «#» is replaced by «x» (Latin characters).

Returned Values

Successful execution of a command:

ussdsend_result('ok');

Getting a Response to Requesting the Balance of a SIM Card

http://192.168.0.100/ussdread.cgi

Evoke 20 seconds after requesting a balance of a SIM card.

Returned Values

Successful Execution of a Command:

ussdsend_result("response_from_gsm_operator");

Authorization

To add a login and password to the structure of a URL-encoded command, it is possible to use the next scheme:

  • http://<username>:<password>@<host>:<port>/<URL‐path>?<parameters>

where:

<username>:<password> – are credentials for authorization in a device web interface;

<host>  is an IP address of a device;

<port>  is a port of an HTTP server;

<URL‐path>?<parameters>  is a URL-encoded command