In this article, we will examine the features that we can activate with commands on RUTxx routers.
gsmctl is a set of shell commands that can request information from or perform operations on a modem. In other words, gsmctl is a way to use AT commands in shell form. You can use them via SSH or CLI, the router's command-line interface available through the WebUI.
To log in to a RUT router via SSH, download the free PuTTY app if you're using Windows; If you are using a Linux-based operating system, simply use the Terminal application. In either case, you need to know three things: the router's LAN IP address, username and password. The default LAN IP address for all RUT routers is 192.168.1.1; default login is username: root; password: admin01 (NOTE: The username used for SSH connections (e.g., root) is not the same as the username used to log into the router's WebUI (e.g., admin).
If you're using PuTTY, enter the router's LAN IP address in the Hostname (or IP address) field, select the SSH Connection type, and click Open. After that, you will be asked to enter the username and password.
If you're using Linux, open a Terminal and type this command:
# ssh firstname.lastname@example.org
If you have made changes to the LAN IP address or login name, change the relevant data in the above command to be correct for your particular situation. After executing this command, you will be asked to enter the administrator password of the router.
2-The syntax of a gsmctl command is gsmctl OPTIONS. Here is a list of possible gsmctl options:
-p --ip Display IP of physical interface
-e --bsent Display the number of bytes sent
-r --brecv Display number of bytes received
-j --connstate Display 3G connection status
-g --netstate Display network connection status
-i --imei Display device IMEI
-J --iccid Display SIM ICCID
-m --model Display device model
-w --manuf Display device manufacturer
-a --serial Display device serial number
-y --revision Display device revision number
-x --ish display IMSI
-z --simstate Display SIM card status
-u --pinstate Display PIN status
-q --signal Display GSM signal level
-X --rscp display WCDMA rscp level
-E --ecio Display WCDMA ec/io level
-W --rsrp Display LTE rsrp level
-Z --sinr Display LTE sinr level
-M --rsrq Display LTE rsrq level
-C --cellid Display cell ID parameter
-o --operator Display the name of the operator used
-f --opernum Display operator number
-t --conntype Display data container type
-c --temp Display module temperature in 0.1 degrees Celsius
-B --pincount Display pin/puk count
-F --network Display network information
-K --serving Display serving cell information
-I --neighbor Display neighbor cell information
-D --shutdown Shut down modem
-h --help Display this information
-v --version View version
sms management settings;
-S -r, --sms --read Read SMS on the page
-S -l, --sms --list List by SMS series type [all read, unread, etc.]
-S -t, --sms --total SMS show remaining space.
-S -d, --sms --delete Delete SMS
-S -s, --sms --send Sending SMS, phone number and must be written in the text.
-S -b, --sms --send-b64 Send Base64 encoded SMS
-A, --at <COMMAND> Send AT command to device
-H, --shell shell mode
-k, --debug Enable debugging information.
-n, --nolog Do not log the command
3-You can view this list by typing gsmctl -h or gsmctl –help via the terminal.
For example, try using gsmctl -q to get the current RSSI value in dBm. You can also combine options. For example, gsmctl -oqt;
Unlike gsmctl -q, gsmctl -oqt returns three options; carrier name, signal quality level, and carrier type, as you can see in the example above.
4-You can use gsmctl -H to use a specific AT command via SSH. After that, your console will enter shell mode, where you can type AT commands in their normal format. Or you can use gsmctl -A <AT_COMMAND> to execute AT commands one by one. Continuing with the example above, let's say you want to learn the RSSI value. While there are quite a few commands that can be used to achieve this goal, let's use AT+CSQ, which is used when executing gsmctl -q;
As you can see, this time the command returns two values instead of one, and they do not directly represent the RSSI value as with gsmctl -q. This is because AT+CSQ displays the received signal strength <rssi> and the channel bit error rate <ber>, and the numbers returned are not direct values but representations of direct values.
0 -113dBm or less
1 - 111dBm
2...30 -109dBm... -53dBm
31 -51 dBm or above
99 Unknown or undetectable
100 -116dBm or less
191 -25dBm or above
199 Unknown or undetectable
100~199 Extended for use in TD-SCDMA indicating received signal code strength (RSCP)
As another example, let's try getting network operator information. gsmctl -o or AT+COPS for this task? you can use
For this example we will use both and analyze the differences:
As you can see, gsmctl AT+COPS? Returns raw data. The response format for AT+COPS is +COPS: <mode>[,<format>[,<oper>][,<Act>]].
Explanations for individual values are given below.