...
The following values of the querytype field are used for management:
...
getgsm - get the parameters of the GSM modem
...
:
- id - identifier of the GSM modem element;
- period - optional, if available, issues a list of SMS for the specified period, possible values are:
- '100seconds' - the last 100 seconds;
- '100minutes' - the last 100 minutes;
- '100hours' - the last 100 hours;
- '100days' - the last 100 days;
k - user session ID.
Code Block | ||||
---|---|---|---|---|
|
...
<gsm |
...
pin=" |
...
1111" |
...
creg=" |
...
1" |
...
csq=" |
...
12" |
...
cops=" |
...
Aqua3" allowed="+ |
...
65214567788 +32154897744" smsc="59537322611" > |
...
<sms_list> <sms id=" |
...
2545109407" |
...
to=" |
...
+65214567788" |
...
text=" |
...
test message 1" status=" |
...
failed" |
...
date=" |
...
1563176384" /> |
...
<sms id=" |
...
3784153937" |
...
to=" |
...
+98521141100" |
...
text=" |
...
test message |
...
A" status="pending" date="1563176803" /> <sms id=" |
...
1598774555" |
...
to=" |
...
+98521563322" |
...
text=" |
...
test message |
...
|
...
3" |
...
status=" |
...
sent" |
...
date=" |
...
1563177201" /> </ |
...
sms_list> </ |
...
gsm> |
Description of the xml nodes:
element - the properties of the GSM modem element:
id - identifier;
module - module identifier;
clas - class of the device;
type - device type;
state - state:
'normal' - the modem is ready to send SMS;
'alarm' - there's an internal error.
name - the name of the device;
value - modem signal strength in %;
imei - international identifier of mobile equipment;
pin - SIM PIN code;
sms_centre - SMS center numbergsm - SGM modem settings and status;- pin - SIM's PIN code;
- allowed - list of numbers from which SMS - commands are allowed, division of numbers through a space ' ';
status - current state of the modem:
- 'initialization' - modem initialization;
- 'found, initialization' - modem found, continued initialization;
- 'turn on time out' - timeout for the modem to turn on;
- 'found, ready' - the modem is ready to work;
- 'found, not ready' - the modem is not ready or defective;
- 'SIM-card not inserted' - SIM card installation error;
- 'PIN code required' - PIN code required;
- 'PIN code invalid' - the PIN is incorrect;
- 'PIN code length incorrect' - the length of the PIN code is incorrect;
- 'PIN code must be digit' - the PIN must consist only of digits;
- 'PUK code required' - PIN blocked, PUK code required;
- 'SMS Center number incorrect' - the SMS center number is incorrect;
- 'error sending SMS' - SMS sending error;
- 'command maximum repeated' - the maximum number of attempts to send an AT command;
- 'reset modem' - restart of the modem;
- 'number of resets is exceeded' - the maximum number of attempts to restart;
- 'modem turn off' - power to the modem is disabled;
- 'initialization' - modem initialization;
- verbosity - the level of debugging information (more in the description "updateelement");
- balance - the balance information node, issued only when the balance number is set, after updating the balance with the command with the fields querytype = "updateelement" and ctrl="updatebalance" for the GSM Modem element; attributes are:
- phone - balance service number;
- text - the text of the response to the balance request;
- t - the time when the balance information is received in the UTS;
- phone - balance service number;
- operators - the list of network operators, is issued only after updating the list of operators with the command with fields querytype="updateelement" and ctrl="updateoperators" for the GSM Modem element, attributes are:
- current - the name of the current statement;
- status - the status of the current operator in the network ; possible values are:
- 'registered' - registered in the network;
- 'not registered, searching' - searching the network;
- 'not registered, not searching' - networks not found;
- 'not registered' - not registered on the network;
- 'registered roaming' - registered in roaming;
- 'registration denied' - registration is prohibited.
- 'registered' - registered in the network;
- signal - signal strength in the network in dB;
- operator - available operator:
- id - the identifier of the operator;
- status - operator status:
- 'unknown': unknown;
- 'available': registration is allowed;
- 'current': current operator;
- 'forbidden': registration is prohibited.
- 'unknown': unknown;
- name - operator's text name.
- id - the identifier of the operator;
- smslist - list of SMS, for sending the SMS there's a request send_sms_message;period - the period ('100seconds', '100minutes', '100hours', '100days')separator - space (example: +72224443434, +72224443435);
- smsc - the number of the SMS center, this field is empty if the number is determined automatically;
- creg - network registration status code:
0 - not registered, modem is not currently searching a new operator to register to;
- 1 - registered, home network;
- 2 - not registered, but modem is currently searching a new operator to register to;
- 3 - registration denied;
- 4 - unknown;
- 5 - registered, roaming.
- csq - signal strength in the network:
0 – -113 dBm or less;
- 1 – -111 dBm;
- 2...30 – -109... -53 dBm;
- 31 – -51 dBm or greater;
- 99 – not known or not detectable;
- 100 – -116 dBm or less;
- 101 – -115 dBm;
- 102...191 – -114... -26dBm.
- cops - current operator name.
- sms_list - queue of sent SMS;
- sms - SMS in the queue:
- id - identifier of SMS in the queue;
- id - identifier of SMS in the queue;
- status - SMS status:
- status - SMS status:
- pending - added to the queue, waiting for sending;
- failed - could not be sent;
- send - sent.
- to
- - phone number of the SMS's recipient;
- text - SMS text;
- date - the time when added to the queue in UTS.
- sms - SMS in the queue:
setgsm - set GSM modem parameters, additional fields are:
- id - identifier of the GSM modem element;
- pin - SIM's PIN code;
- sms_centre
smsc - the number of the SMS center
. It is read when determining the presence of the SIM-card and is stored only on the SIM-card, leave this field blank for automatic determination;
- allowed - list of numbers from which SMS commands are allowed, separator - space (example: +72224443434, +72224443435);
- balance - the number used for request of the balance and the state of the account;
- operator - manual installation of the operator of cellular communication;
- verbosity - the level of debugging information (by default 2nd level). The possible values are:
- level 0: Emergency - the system is not operational: the maximum number of retries of AT commands, the modem initialization error, the SIM card is not inserted, the maximum number of retries of automatic modem re-uninstitution, the allocation error of dynamic memory;
- Level 1: Alert - urgent intervention is required: PIN code is required, error when sending SMS;
- level 2: Critical - critical events: failure to send AT commands, incoming SMS processing error, modem reinitialization, SMS queue is full, the list of available operators is full, successful sending of SMS;
- level 3: Error - error messages;
- level 4: Warning - various warnings: text and error number of the AT command, SMS text conversion error;
- Level 5: Notice - various important notifications: the version of the firmware of the modem;
- level 6: Informational - information messages: change of SMS center number, registration status in the network, successful processing of incoming SMS;
- Level 7: Debug - Detailed debugging messages, including exchange of AT commands.
- level 0: Emergency - the system is not operational: the maximum number of retries of AT commands, the modem initialization error, the SIM card is not inserted, the maximum number of retries of automatic modem re-uninstitution, the allocation error of dynamic memory;
- ctrl - modem control, possible values:
- "reset" - reset the modem;
- "clearsmslist" - clear the SMS queue;
- "updatebalance" - update the balance; asynchronous, in one minute the balance text is displayed in the log and stored in the text attribute of the balance node;
- "updateoperators" - update the list of operators;
send_sms_message - send SMS via GSM modem, parameters: - "reset" - reset the modem;
- to_phone - the phone number of the recipient;
send_sms_message - send SMS via GSM modem, message add to SMS queue, parameters:
- k - user session ID;
- to_phone - the phone number of the recipient;
- message - SMS text.
clearsms - clear the SMS queue, parameters:
- k - user session ID.
sendussd - send USSD request for check the balance state, not supported in LTE mode, parameters:
- k - user session ID;
- to_phone - the balance service number.
Code Block | ||
---|---|---|
| ||
<ussd text="Account balance 55.6$. Some kind of advertisement here" />
<ussd text="Error parsing ussd answer" />
<ussd text="Request not supported in LTE mode" /> |