Template:Networking rutos manual mobile utilities: Difference between revisions
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
==SMS Utilities== | ==SMS Utilities== | ||
The <b>SMS Utilities</b> section contains a list of rules that perform certain actions when they are activated by SMS messages. | |||
The SMS Utilities section contains a list of rules that perform certain actions when they are activated by SMS messages. | |||
[[File:Networking_rutos_manual_mobile_utilities_sms_utilities_sms_rules.png|border|class=tlt-border]] | [[File:Networking_rutos_manual_mobile_utilities_sms_utilities_sms_rules.png|border|class=tlt-border]] | ||
The entire list contains | The entire list contains more than 20 rules, but it does not all possible SMS action. You can also create custom rules or modify existing rules. All possible SMS rule actions, their default SMS texts and descriptions are listed in the table below. | ||
existing rules. | |||
<table class="nd-othertables_2" style="width: 100%;"> | |||
<tr> | |||
< | <th width=20%>Action</th> | ||
< | <th width=20%>SMS Text</th> | ||
<th width=60%>Description</th> | |||
< | </tr>{{#ifeq: {{{io}}} | 1 | | ||
< | <tr> | ||
<td><b>Change I/O state</b></td> | |||
{{#ifeq:{{{ | <td>ioset</td> | ||
< | <td>Changes the state of a selected output.</td> | ||
< | </tr>|}} | ||
<tr> | |||
<td><b>Change mobile settings</b></td> | |||
<td>cellular</td> | |||
<td>Is used to configure the device's mobile data connection. [[#Change_mobile_settings_.28cellular.29_rule|Click here]] for more information on this rule.</td> | |||
< | </tr>{{#ifeq: {{{dualsim}}} | 1 | | ||
< | <tr> | ||
<td><b>Force SIM switch</b></td> | |||
<td>switch_sim</td> | |||
<td>Switches from using one SIM card to another.</td> | |||
</tr>|}} | |||
}} | <tr> | ||
<td><b>FW upgrade from server</b></td> | |||
< | <td>fw_upgrade</td> | ||
< | <td>Upgrades the device's firmware (provided a new version is available on the FOTA server).</td> | ||
</tr> | |||
<tr> | |||
<td><b>Get list of profiles</b></td> | |||
< | <td>profdisp</td> | ||
< | <td>Sends a list of configuration profiles existing on the device.</td> | ||
</tr> | |||
<tr> | |||
<td><b>GPS control</b></td> | |||
<td>gpson</td> | |||
<td>Turns GPS on.</td> | |||
</tr> | |||
<tr> | |||
<td><b>GPS coordinates</b></td> | |||
<td>gps</td> | |||
<td>Sends the device's current GPS coordinates.</td> | |||
</tr> | |||
<tr> | |||
<td><b>IP unblock</b></td> | |||
<td>ipunblock</td> | |||
<td>Unblocks Web/SSH access for devices that were blocked for too many unsuccessful connection attempts. Send the SMS text to unblock all blocked devices or include the IP address of a single blocked device after the SMS text. For example: | |||
<ul> | |||
<li><i>ipunblock</i> - clears the block list (unblocks Web/SSH access for all previously blocked devices).</li> | |||
<li><i>ipunblock 192.168.1.2</i> - removes this IP address from the block list (unblock Web/SSH access for that device).</li> | |||
</ul> | |||
[[ | |||
<tr> | |||
<td> | |||
<td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<td> | |||
<td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<td> | |||
<td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<td> | |||
<td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<td> | |||
<td> | |||
</tr> | |||
<tr> | |||
<td> | |||
<td> | |||
<td> | |||
</ | |||
< | |||
</td> | </td> | ||
<td> | </tr>{{#ifeq: {{{io}}} | 1 | | ||
</tr> | <tr> | ||
<tr> | <td><b>I/O status</b></td> | ||
<td> | <td>iostatus</td> | ||
<td> | <td>Sends a status report message on the state of the device's inputs and outputs.</td> | ||
<td> | </tr>|}} | ||
<tr> | |||
<td><b>Manage OpenVPN</b></td> | |||
<td>vpnon</td> | |||
<td>Turns a selected OpenVPN instance on. Include the name of the OpenVPN instance that you wish to turn on after the rule's SMS text: | |||
<ul> | |||
<li><i>vpnon client_name</i></li> | |||
<li><i>vpnon server_name</i></li> | |||
</ul> | |||
</td> | </td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Manage OpenVPN</b></td> | ||
<td> | <td>vpnoff</td> | ||
<td> | <td>Turns a selected OpenVPN instance off. Include the name of the OpenVPN instance that you wish to turn off after the rule's SMS text: | ||
<ul> | |||
<li><i>vpnoff client_name</i></li> | |||
<li><i>vpnoff server_name</i></li> | |||
</ul> | |||
</td> | </td> | ||
</ | </tr> | ||
<tr> | |||
<td><b>Mobile data limit status</b></td> | |||
<td><i>no default text</i></td> | |||
< | <td>Sends a status report message that includes data limit usage information for mobile network interfaces (that have [[{{{name}}}_Interfaces#Mobile_Data_Limit|Mobile Data Limit]] enabled) </td> | ||
</tr> | |||
<tr> | |||
<td><b>Monitoring status</b></td> | |||
</ | <td>monitoring_status</td> | ||
< | <td>Sends a status report message that includes the RMS connection type, state and the device serial number and MAC address.</td> | ||
<td> | </tr> | ||
<tr> | |||
<td> | <td><b>More</b></td> | ||
<td>more</td> | |||
</ | <td>Displays next part of a composite response message (more than 160 characters).</td> | ||
</tr> | |||
<tr> | |||
<td> | <td><b>OpenVPN status</b></td> | ||
<td> | <td>vpnstatus</td> | ||
<td>Sends a status report message on all OpenVPN connections.</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td> | <td><b>Reboot</b></td> | ||
<td>reboot</td> | |||
<td> | <td>Reboots the device.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Restore to default</b></td> | ||
<td> | <td>restore</td> | ||
<td> | <td>Restores factory settings on the device.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>RMS action</b></td> | ||
<td> | <td>rms_on</td> | ||
<td> | <td>Turns RMS connection on.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>RMS action</b></td> | ||
<td> | <td>rms_off</td> | ||
< | <td>Turns RMS connection off.</td> | ||
</tr> | |||
</tr> | <tr> | ||
<tr> | <td><b>RMS connect</b></td> | ||
<td> | <td>rms_connect</td> | ||
<td> | <td>Forces the device to connect to RMS. This action is analogous to clicking the 'Connect' button in the Cloud Solutions → [[{{{name}}}_Cloud_Solutions#RMS|RMS page]].</td> | ||
<td> | </tr> | ||
<tr> | |||
</tr> | <td><b>RMS status</b></td> | ||
<tr> | <td>rms_status</td> | ||
<td> | <td>Sends a status report message on the state of the connection to RMS.</td> | ||
<td> | </tr> | ||
<td> | <tr> | ||
<td><b>Send status</b></td> | |||
</ | <td>status</td> | ||
<td>Sends a status report message.</td> | |||
</tr> | |||
< | |||
< | |||
<td>This | |||
</tr> | |||
<td> | |||
<td> | |||
<td> | |||
</tr> | |||
<td> | |||
<td> | |||
<td> | |||
</tr | |||
<tr> | <tr> | ||
<td><b>SSH access control</b></td> | |||
<td>sshon</td> | |||
<td>Turns remote and local (by default) SSH access on. This rule can be modified to only include local SSH access.</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td><b>SSH access control</b></td> | |||
<td>sshoff</td> | |||
<td>Turns SSH access off.</td> | |||
</tr> | |||
<td> | |||
</ | |||
<td> | |||
<td>Turns | |||
</tr | |||
<tr> | <tr> | ||
< | <td><b>Switch mobile data</b></td> | ||
< | <td>mobileon</td> | ||
< | <td>Turns mobile data usage on.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Switch mobile data</b></td> | ||
<td> | <td>mobileoff</td> | ||
<td> | <td>Turns mobile data usage off.</td> | ||
</tr>{{#ifeq: {{{wifi}}} | 1 | | |||
<tr> | |||
<td><b>Switch WiFi</b></td> | |||
<td>wifion</td> | |||
<td>Turns the WiFi radio on.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Switch WiFi</b></td> | ||
<td> | <td>wifioff</td> | ||
<td> | <td>Turns the WiFi radio off.</td> | ||
</tr>|}} | |||
<tr> | |||
<td><b>UCI API</b></td> | |||
<td>uci</td> | |||
<td>Is used to change the configuration settings on the device. [[Click here|#UCI_API_rule]] for more information on the UCI API rule.</td> | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Wake on LAN</b></td> | ||
<td> | <td>wakeup</td> | ||
<td> | <td>Sends a magic packet that "wakes up" a specified device from standby mode. If you have multiple Wake-on-LAN-capable devices, you will have to create a separate rule with a different SMS text for each one. Configuration for each device must include the MAC address of that device.</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Web access control</b></td> | ||
<td>webon</td> | |||
<td> | <td>Turns remote and local (by default) HTTP and HTTPS access on. This rule can be modified to only include local HTTP/HTTPS access.</td> | ||
< | |||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td> | <td><b>Web access control</b></td> | ||
<td>weboff</td> | |||
<td> | <td>Turns HTTP and HTTPS access off. This rule can also modified to turn of either HTTP or HTTPS separately.</td> | ||
< | |||
</tr> | </tr> | ||
</table> | </table> | ||
=== | ===SMS rule execution syntax=== | ||
---- | ---- | ||
< | To execute an SMS rule, send an SMS message to your device's SIM card number with the rule's <b><i>SMS Text</i></b> preceded by the selected <b><i>authorization keyword</i></b>, which depends on the selected <i>authorization method</i>: | ||
< | |||
<ul> | |||
<li><b>No authorization</b> - no special keyword required; simply send a rule's <i>SMS Text</i>. For example, to execute the <i>reboot</i> rule without authorization:<pre>reboot</pre></li> | |||
<li><b>By serial</b> - include the device's serial number before a rule's <i>SMS Text</i>. For example, to execute the <i>iostatus</i> rule with serial authorization:<pre>1111111111 iostatus</pre> <font size="-1"><i>(replace 1111111111 with your device's serial number)</i></font></li> | |||
< | <li><b>By device admin password</b> - include the device's password before a rule's <i>SMS Text</i>. For example, to execute the <i>vpnon</i> rule with password authorization:<pre>admin01 vpnon</pre> <font size="-1"><i>(replace admin01 with your device's admin password)</i></font></li> | ||
< | </ul> | ||
===Modify SMS Rule=== | |||
---- | |||
</ | Every SMS rule can be edited to your liking. If a rule does not meet your requirements, click the click the 'Edit' button next to it. Below are examples of what the configuration page for the <i>reboot</i> rule looks like. | ||
< | |||
<b>General settings</b> | |||
---- | |||
[[File:Networking_rutos_manual_mobile_utilities_sms_utilities_modify_sms_rule_general.png|border|class=tlt-border]] | |||
</ | |||
< | <ol> | ||
<li>The <b>Enable</b> slider turn the rule on or off. In order to use a rule, this slider must be set to 'on'. By default, all existing SMS rules are turned on.</li> | |||
<li>The <b>Action</b> dropdown selection specifies which action should be performed when the rule is executed.</li> | |||
<li>The <b>SMS text</b> field specifies the text that will trigger the rule upon receiving a message.</li> | |||
<li>The <b>Get status via SMS after reboot</b> slider specifies whether the device should send a status report message after an action is executed. The name of this slider may differ from rule to rule and it is only available for some rules.</li> | |||
</ | <li>The <b>Send status SMS to other number</b> slider specifies whether the device should send a status report message to another number (besides the original sender). Setting this slider to 'on' will prompt you to enter an additional phone number(s) of the status message recipient(s).</li> | ||
< | <li>The <b>Message text</b> box is used to modify the text that should be included in an SMS rule's response message.</li> | ||
</ol> | |||
<b>Authorization</b> | |||
---- | |||
< | [[File:Networking_rutos_manual_mobile_utilities_sms_utilities_modify_sms_rule_authorization.png|border|class=tlt-border]] | ||
< | |||
<ol> | |||
<li>The <b>Authorization method</b> dropdown selection specifies the type of authorization an SMS rule requires (device admin password, serial number or none).</li> | |||
<li>The <b>Allowed number(s)</b> dropdown selection specifies who can execute an SMS rule (based on phone number).</li> | |||
</ol> | |||
</ | ---- | ||
Most rules are configured in a similar manner. However, the configuration does differ from rule to rule, depending on a rule's purpose (selected 'Action'). If you run into trouble when configuring a rule, hover your mouse cursor over the name of a field to see a hint that explains what that field does. | |||
===Change mobile data settings (cellular) rule=== | ===Change mobile data settings (cellular) rule=== | ||
Line 1,146: | Line 243: | ||
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
<tr> | <tr> | ||
< | <th>Field</th> | ||
< | <th>Description</th> | ||
< | <th>Explanation</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,189: | Line 286: | ||
<table class="nd-mantable" > | <table class="nd-mantable" > | ||
<tr> | <tr> | ||
< | <th>Parameter</th> | ||
< | <th>Value</th> | ||
< | <th>Description</th> | ||
< | <th>Default message example</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
Line 1,247: | Line 344: | ||
Each of the above examples contain a single parameter but you can send out multiple parameters in one message. For example, '''"cellular apn=internet service=3gonly"'''. This message would set your APN to "internet" and your Service mode to 3G Only. You can also send a message that would include all of the parameters above: '''"cellular apn=internet dialnumber=*99***1# auth_mode=pap service=3gonly username=user password=pass"''' | Each of the above examples contain a single parameter but you can send out multiple parameters in one message. For example, '''"cellular apn=internet service=3gonly"'''. This message would set your APN to "internet" and your Service mode to 3G Only. You can also send a message that would include all of the parameters above: '''"cellular apn=internet dialnumber=*99***1# auth_mode=pap service=3gonly username=user password=pass"''' | ||
===UCI API rule=== | ===UCI API rule=== | ||
---- | ---- | ||
The UCI rule lets you set or get any parameter from the router's configuration files.<table class=" | The <b>UCI API</b> rule lets you set or get any parameter from the router's configuration files. | ||
<tr> | |||
<th> | <table class="nd-mantable"> | ||
<th> | <tr> | ||
<th> | <th>Field</th> | ||
</tr> | <th>Description</th> | ||
<tr> | <th>Explanation, notes</th> | ||
</tr> | |||
<tr> | |||
<td>Enable</td> | <td>Enable</td> | ||
<td>This will enable or disable the UCI API function</td> | <td>This will enable or disable the UCI API function</td> | ||
<td>Allows you to set or get any configurations from the router</td> | <td>Allows you to set or get any configurations from the router</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Action</td> | <td>Action</td> | ||
<td>The action to be performed when this rule is met.</td> | <td>The action to be performed when this rule is met.</td> | ||
<td>Sets or sends you any specified configurations of the router</td> | <td>Sets or sends you any specified configurations of the router</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>SMS text</td> | <td>SMS text</td> | ||
<td>SMS text that will trigger the rule</td> | <td>SMS text that will trigger the rule</td> | ||
<td>SMS text can contain letters, numbers, spaces and special symbols. Capital letters also matter'''Detailed explanations on how to use this function are presented in the table below''' | <td>SMS text can contain letters, numbers, spaces and special symbols. Capital letters also matter'''Detailed explanations on how to use this function are presented in the table below'''</td> | ||
</tr> | |||
</tr> | <tr> | ||
<tr> | |||
<td>Modem</td> | <td>Modem</td> | ||
<td>Select which modem you want to use</td> | <td>Select which modem you want to use</td> | ||
<td>Which modem is configured</td> | <td>Which modem is configured</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>Authorization method</td> | <td>Authorization method</td> | ||
<td>What kind of authorization to use for SIM management</td> | <td>What kind of authorization to use for SIM management</td> | ||
<td>Possible values: No authorization | By serial | By router admin password; default: '''By router admin password''' | <td>Possible values: No authorization | By serial | By router admin password; default: '''By router admin password'''</td> | ||
</tr> | |||
</tr> | <tr> | ||
<tr> | |||
<td>Allowed users</td> | <td>Allowed users</td> | ||
<td>White list of allowed users</td> | <td>White list of allowed users</td> | ||
<td>Possible values: From all numbers | From group | From single number; default: '''From all numbers''' | <td>Possible values: From all numbers | From group | From single number; default: '''From all numbers'''</td> | ||
</table> | </table> | ||
The following are syntax examples for the UCI API rule: | The following are syntax examples for the UCI API rule: | ||
<table class="nd-mantable"> | <table class="nd-mantable"> | ||
<tr> | <tr> | ||
<th> | <th>Field</th> | ||
<th> | <th>Description</th> | ||
<th> | <th>Explanation, notes</th> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>uci get config.section.option"</td> | <td>uci get config.section.option"</td> | ||
<td>Returns config option value</td> | <td>Returns config option value</td> | ||
<td>'''uci get network.wan.ipaddr''' - returns the router's WAN IP address</td> | <td>'''uci get network.wan.ipaddr''' - returns the router's WAN IP address</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>uci set config.section.option="value"</td> | <td>uci set config.section.option="value"</td> | ||
<td>Sets config option</td> | <td>Sets config option</td> | ||
<td>'''"uci set network.mobile.apn=example"''' - Changes mobile APN to example</td> | <td>'''"uci set network.mobile.apn=example"''' - Changes mobile APN to example</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>uci show config</td> | <td>uci show config</td> | ||
<td>Returns the contents of a config file</td> | <td>Returns the contents of a config file</td> | ||
<td>'''uci show openvpn''' - returns the contents of the openvpn config file</td> | <td>'''uci show openvpn''' - returns the contents of the openvpn config file</td> | ||
</tr> | </tr> | ||
<tr> | <tr> | ||
<td>uci show config.section</td> | <td>uci show config.section</td> | ||
<td>Returns the exact part of a config file (either section or the exact option value)</td> | <td>Returns the exact part of a config file (either section or the exact option value)</td> | ||
<td>'''uci show network.ppp''' - returns the contents of the ppp interface section from the network config file | <td>'''uci show network.ppp''' - returns the contents of the ppp interface section from the network config file</td> | ||
</tr> | |||
</tr> | </table> | ||
</table>As you can see, the UCI rule requires that you know the names of the configuration files and the names of the | |||
sections and parameters that they hold. You can find the config file list and some examples of UCI usage in general in | As you can see, the UCI rule requires that you know the names of the configuration files and the names of the sections and parameters that they hold. You can find the config file list and some examples of UCI usage in general in our '''[[UCI command usage]]''' article. | ||
our '''[[UCI command usage]]''' article. | |||
===Custom Rules=== | ===Custom Rules=== | ||
Line 1,335: | Line 430: | ||
==SMS Gateway== | ==SMS Gateway== | ||
This section | |||
This section provides a summary of the <b>SMS Gateway</b> functions for {{{name}}} devices. | |||
===Post/Get=== | ===Post/Get=== |
Revision as of 08:54, 9 October 2020
Template:Networking rutos manual fw disclosure
Summary
{{{name}}} routers have an extensive amount of various SMS control utilities. SMS Utilities can be used to set/get configurations, monitor and issue commands to the router.
SMS Utilities
The SMS Utilities section contains a list of rules that perform certain actions when they are activated by SMS messages.
The entire list contains more than 20 rules, but it does not all possible SMS action. You can also create custom rules or modify existing rules. All possible SMS rule actions, their default SMS texts and descriptions are listed in the table below.
Action | SMS Text | Description |
---|---|---|
Change mobile settings | cellular | Is used to configure the device's mobile data connection. Click here for more information on this rule. |
FW upgrade from server | fw_upgrade | Upgrades the device's firmware (provided a new version is available on the FOTA server). |
Get list of profiles | profdisp | Sends a list of configuration profiles existing on the device. |
GPS control | gpson | Turns GPS on. |
GPS coordinates | gps | Sends the device's current GPS coordinates. |
IP unblock | ipunblock | Unblocks Web/SSH access for devices that were blocked for too many unsuccessful connection attempts. Send the SMS text to unblock all blocked devices or include the IP address of a single blocked device after the SMS text. For example:
|
Manage OpenVPN | vpnon | Turns a selected OpenVPN instance on. Include the name of the OpenVPN instance that you wish to turn on after the rule's SMS text:
|
Manage OpenVPN | vpnoff | Turns a selected OpenVPN instance off. Include the name of the OpenVPN instance that you wish to turn off after the rule's SMS text:
|
Mobile data limit status | no default text | Sends a status report message that includes data limit usage information for mobile network interfaces (that have [[{{{name}}}_Interfaces#Mobile_Data_Limit|Mobile Data Limit]] enabled) |
Monitoring status | monitoring_status | Sends a status report message that includes the RMS connection type, state and the device serial number and MAC address. |
More | more | Displays next part of a composite response message (more than 160 characters). |
OpenVPN status | vpnstatus | Sends a status report message on all OpenVPN connections. |
Reboot | reboot | Reboots the device. |
Restore to default | restore | Restores factory settings on the device. |
RMS action | rms_on | Turns RMS connection on. |
RMS action | rms_off | Turns RMS connection off. |
RMS connect | rms_connect | Forces the device to connect to RMS. This action is analogous to clicking the 'Connect' button in the Cloud Solutions → [[{{{name}}}_Cloud_Solutions#RMS|RMS page]]. |
RMS status | rms_status | Sends a status report message on the state of the connection to RMS. |
Send status | status | Sends a status report message. |
SSH access control | sshon | Turns remote and local (by default) SSH access on. This rule can be modified to only include local SSH access. |
SSH access control | sshoff | Turns SSH access off. |
Switch mobile data | mobileon | Turns mobile data usage on. |
Switch mobile data | mobileoff | Turns mobile data usage off. |
UCI API | uci | Is used to change the configuration settings on the device. #UCI_API_rule for more information on the UCI API rule. |
Wake on LAN | wakeup | Sends a magic packet that "wakes up" a specified device from standby mode. If you have multiple Wake-on-LAN-capable devices, you will have to create a separate rule with a different SMS text for each one. Configuration for each device must include the MAC address of that device. |
Web access control | webon | Turns remote and local (by default) HTTP and HTTPS access on. This rule can be modified to only include local HTTP/HTTPS access. |
Web access control | weboff | Turns HTTP and HTTPS access off. This rule can also modified to turn of either HTTP or HTTPS separately. |
SMS rule execution syntax
To execute an SMS rule, send an SMS message to your device's SIM card number with the rule's SMS Text preceded by the selected authorization keyword, which depends on the selected authorization method:
- No authorization - no special keyword required; simply send a rule's SMS Text. For example, to execute the reboot rule without authorization:
reboot
- By serial - include the device's serial number before a rule's SMS Text. For example, to execute the iostatus rule with serial authorization:
1111111111 iostatus
(replace 1111111111 with your device's serial number) - By device admin password - include the device's password before a rule's SMS Text. For example, to execute the vpnon rule with password authorization:
admin01 vpnon
(replace admin01 with your device's admin password)
Modify SMS Rule
Every SMS rule can be edited to your liking. If a rule does not meet your requirements, click the click the 'Edit' button next to it. Below are examples of what the configuration page for the reboot rule looks like.
General settings
- The Enable slider turn the rule on or off. In order to use a rule, this slider must be set to 'on'. By default, all existing SMS rules are turned on.
- The Action dropdown selection specifies which action should be performed when the rule is executed.
- The SMS text field specifies the text that will trigger the rule upon receiving a message.
- The Get status via SMS after reboot slider specifies whether the device should send a status report message after an action is executed. The name of this slider may differ from rule to rule and it is only available for some rules.
- The Send status SMS to other number slider specifies whether the device should send a status report message to another number (besides the original sender). Setting this slider to 'on' will prompt you to enter an additional phone number(s) of the status message recipient(s).
- The Message text box is used to modify the text that should be included in an SMS rule's response message.
Authorization
- The Authorization method dropdown selection specifies the type of authorization an SMS rule requires (device admin password, serial number or none).
- The Allowed number(s) dropdown selection specifies who can execute an SMS rule (based on phone number).
Most rules are configured in a similar manner. However, the configuration does differ from rule to rule, depending on a rule's purpose (selected 'Action'). If you run into trouble when configuring a rule, hover your mouse cursor over the name of a field to see a hint that explains what that field does.
Change mobile data settings (cellular) rule
The Change mobile data settings rule is exceptional to most of the other rules as it does not perform a single action like turning specific services On/Off or getting status updates. It designed to change mobile data settings and it's SMS text can't be described by a single string because the message depends on what configurations you want to change. For example, you can send a message that will change your APN only, you can send a message that will change APN and mobile service mode, or even a message that will change every single mobile setting.
Field | Description | Explanation |
---|---|---|
Enable | This check box will enable or disable the Change mobile data settings function | Allows you to change mobile settings via SMS |
Action | The action to be performed when this rule is met. | Changes the specified mobile settings |
SMS text | SMS text that will trigger the rule | SMS text can contain letters, numbers, spaces and special symbols. Capital letters also matter. default: cellular. Detailed explanations on how to use this function are presented in the table below |
Authorization method | What kind of authorization to use for SIM management | Possible values:
|
Allowed users | White list of allowed users | Possible values:
|
The default SMS text for the Change mobile data settings rule is cellular but it is only an indication text and does not include any specific parameters to be changed. The list of parameters that can be changed and explanations on how to incorporate them into the "cellular" message is presented in the table below.
Parameter | Value | Description | Default message example |
---|---|---|---|
apn= | e.g., internet | Sets APN | cellular apn=internet |
dialnumber= | e.g., *99***1# | Sets Dialing number | cellular dialnumber=*99***1# |
auth_mode= |
|
Sets Authentication method | cellular auth_method=pap |
service= |
|
Sets the mobile Service mode | cellular service=auto |
username= | e.g., user | Sets the user name for PAP or CHAP authentication | cellular username=user |
password= | e.g., pass | Sets the password for PAP or CHAP authentication | cellular password=pass |
roaming= | 0 for OFF; 1 for ON | Turn Mobile data roaming ON or OFF | cellular roaming=0 |
Each of the above examples contain a single parameter but you can send out multiple parameters in one message. For example, "cellular apn=internet service=3gonly". This message would set your APN to "internet" and your Service mode to 3G Only. You can also send a message that would include all of the parameters above: "cellular apn=internet dialnumber=*99***1# auth_mode=pap service=3gonly username=user password=pass"
UCI API rule
The UCI API rule lets you set or get any parameter from the router's configuration files.
Field | Description | Explanation, notes |
---|---|---|
Enable | This will enable or disable the UCI API function | Allows you to set or get any configurations from the router |
Action | The action to be performed when this rule is met. | Sets or sends you any specified configurations of the router |
SMS text | SMS text that will trigger the rule | SMS text can contain letters, numbers, spaces and special symbols. Capital letters also matterDetailed explanations on how to use this function are presented in the table below |
Modem | Select which modem you want to use | Which modem is configured |
Authorization method | What kind of authorization to use for SIM management | Possible values: No authorization | By serial | By router admin password; default: By router admin password |
Allowed users | White list of allowed users | Possible values: From all numbers | From group | From single number; default: From all numbers |
The following are syntax examples for the UCI API rule:
Field | Description | Explanation, notes |
---|---|---|
uci get config.section.option" | Returns config option value | uci get network.wan.ipaddr - returns the router's WAN IP address |
uci set config.section.option="value" | Sets config option | "uci set network.mobile.apn=example" - Changes mobile APN to example |
uci show config | Returns the contents of a config file | uci show openvpn - returns the contents of the openvpn config file |
uci show config.section | Returns the exact part of a config file (either section or the exact option value) | uci show network.ppp - returns the contents of the ppp interface section from the network config file |
As you can see, the UCI rule requires that you know the names of the configuration files and the names of the sections and parameters that they hold. You can find the config file list and some examples of UCI usage in general in our UCI command usage article.
Custom Rules
If default rules do not suit your purposes, you can also configure custom SMS rules. To do so, go to the bottom of the SMS Utilities page, where you will find the Add Rule tab. Write SMS text, select an Action and press the Add button located next to it.
Configuring a new rule is very similar to editing default rules: you are provided with a list of Actions, other fields are generated in accordance with which Action you choose.
SMS Gateway
This section provides a summary of the SMS Gateway functions for {{{name}}} devices.
Post/Get
Post/Get allows you to perform action requests by writing them in the URL after your device’s IP address.
[[File:Networking_rutos_manual_mobile_utilities_sms_gateway_post_get_dualmodem_{{{dualmodem}}}.png]]
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Enable SMS management functionality through POST/GET |
User name | default: user1 | User name used for authorization (5 characters minimum). Allowed characters (a-zA-Z0-9!@#$%&*+-/=?^_`{|}~. ) |
Password | default: user_pass | Password used for authorization (5 characters minimum). Allowed characters (a-zA-Z0-9!@#$%&*+-/=?^_`{|}~. ) |
Use a web browser or any other compatible software to send HTTP post/get strings to the router. The router must be connected to a GSM network when using the Send SMS feature. Below you will find a table with possible actions and examples on how to use them:
Action | Post/get URL examples |
---|---|
View mobile messages list | http://192.168.1.1/cgi-bin/sms_list?username=user1&password=user_pass |
Read mobile message | http://192.168.1.1/cgi-bin/sms_read?username=user1&password=user_pass&number=1 |
Send mobile message | http://192.168.1.1/cgi-bin/sms_send?username=user1&password=user_pass&number=0037060000001&text=testmessage |
View mobile messages total | http://192.168.1.1/cgi-bin/sms_total?username=user1&password=user_pass |
Delete mobile message | http://192.168.1.1/cgi-bin/sms_delete?username=user1&password=user_pass&number=1 |
- 192.168.1.1 - router's IP address. (Replace it with your [[{{{name}}}_LAN#General_Setup|LAN IP]] or [[{{{name}}}_WAN#Operation_Modes|WAN IP]] (when connecting remotely))
- SMS related post/get commands. Possible values are:
- sms_list - view all SMS messages in storage
- sms_read - read a single SMS message by specified SMS index (number)
- sms_send - send an SMS message to specified recipient
- sms_total - display SMS storage statistics
- sms_delete - delete a single SMS message by specified SMS index (number)
- & - separation symbol. After specifying the SMS command, other parameters must be separated by an ampersand (&) symbol
- username - SMS post/get configuration user name
- password - SMS post/get configuration password
- number - SMS message index or (depending on context) recipient's phone number. SMS message indexes can be
viewed with the sms_list command.
Correct phone number format is:- 00 - number must be preceded by two zeros
- <country_code> - the next following element is the number holder's country code
- <receivers_number> - phone number of the recipient
For example, a valid number would be 0037012345678 (370 is country code and 12345678 is the receiver's phone number, all preceded by 00)
- text - SMS message text
To use Post/Get via SSH instead of a browser, you may want to use the curl -X command. Simply add the same URL command in between quotes and specify the HTTP method.
Examples:
- View SMS list:
curl -X GET "http://192.168.1.1/cgi-bin/sms_list?username=user1&password=user_pass"
- Send SMS:
curl -X GET "http://192.168.1.1/cgi-bin/sms_send?username=user1&password=user_pass&number=0037000000000&text=testmessage"
Auto Reply
Auto reply allows you to configure automatic replying to SMS messages that the router receives.
[[File:Networking_rutos_manual_mobile_utilities_sms_gateway_auto_reply_dualmodem_{{{dualmodem}}}.png]]
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Toggles Auto Reply ON or OFF |
Reply SMS-Utilities rules | off | on; default: off | It will reply to sms rules, from SMS-Utilities |
Don't save received messages | off | on; default: off | If enabled, the router will delete received SMS messages |
Mode | default: Everyone | Specifies whether to auto reply to every phone number or just just specified phone numbers. Available options:
|
Message text | default: none | The message that will be sent in reply |
SMS Forwarding
This section is a summary of the SMS Forwarding function in {{{name}}} routers.
SMS Forwarding To HTTP
The SMS Forwarding To HTTP functionality forwards SMS messages to HTTP, using either POST or GET methods.
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Enable/disable SMS forwarding to HTTP |
Forward SMS-Utilities rules | off | on; default: off | Enable/disable sms-utilities rules forwarding |
Don't save received message | off | on; default: off | Select whether you want to save forwarded messages or not |
Include sender's number | off | on; default: off | Enable/disable adding original message sender phone number at the end of message text |
HTTPS certificate verification | default: Ignore | Select whether to ignore or verify server certificate. Available options: |
Method | default: Get | Choose witch HTTP request method will be used. Available options: |
URL | default: none | URL to which message is going to be forwarded |
Number value name | default: none | Sender phone number code name for query string name/value pair |
Message value name | default: none | Message code name for query string name/value pair |
Extra data pair 1 | default: none | Extra html query name/value pair. Enter name to the left field and value to right |
Extra data pair 2 | default: none | Extra html query name/value pair. Enter name to the left field and value to right |
Mode | default: All messages | Choose which messages are going to be forwarded. Available options: |
SMS Forwarding To SMS
The SMS Forwarding To SMS function forwards SMS messages to one or several recipients.
[[File:Networking_rutos_manual_mobile_utilities_sms_gateway_sms_forwarding_to_sms_dualmodem_{{{dualmodem}}}.png|border|class=tlt-border]]
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Enables/disables SMS forwarding to SMS |
Forward SMS-Utilities rules | off | on; default: off | Enable/disable sms-utilities rules forwarding |
Don't save received message | off | on; default: off | Select whether you want to save forwarded messages or not |
Add sender's number | off | on; default: off | Enable/disable adding original message sender phone number at the end of message text. Only added if total message length is up to 480 characters |
Mode | default: All messages | Choose which messages are going to be forwarded. Available options: |
Recipients phone numbers | default: none | Number(s) to which received messages will be forwarded to |
SMS Forwarding To Email
The SMS Forwarding To Email function forwards SMS messages to email.
Field | Value | Description |
---|---|---|
Enable | off | on; default: off | Enables/disables SMS forwarding to Email |
Forward SMS-Utilities rules | off | on; default: off | Enables/disables sms-utilities rules forwarding |
Don't save received message | off | on; default: off | Select whether you want to save forwarded messages or not |
Add sender's number | off | on; default: off | Enable/disable adding sender phone number at the end of email text body |
Subject | default: none | Subject of an email. Allowed characters (a-zA-Z0-9!@#$%&*+-/=?^_`{|}~. ) |
Email group | default: none | Sender's email configuration |
Recipient's email address | default: none | For whom you want to send an email to. Allowed characters (a-zA-Z0-9._%+-) |
Mode | default: All messages | Choose which messages are going to be forwarded. Available options: |
Email To SMS Forwarding
Email to SMS Forwarding is a function that connects to your email account and checks its inbox at the specified frequency. If it finds any new received emails with a specific subject (phone number in email subject), it sends the body of the email as an SMS message(s) to the recipient specified in the email subject field.
Important note: all POP3 server email messages from inbox will be deleted when using this service.
[[File:Networking_rutos_manual_mobile_utilities_sms_gateway_email_to_sms_forwarding_dualmodem_{{{dualmodem}}}.png|border|class=tlt-border]]
Field name | Value | Description |
---|---|---|
Enable | off | on; default: off | Turns Email to SMS Forwarding ON or OFF |
POP3 server | host | ip; default: none | Email service provider's POP3 server address (can be looked up online) |
Server port | integer [0..65535]; default: none | Email service provider's POP3 server port (can be looked up online) |
User name | string; default: none | Email account user name. This is information is used by router in order to atuhenticate itself when connecting to the email client |
Password | string; default: none | Email account password. This is information is used by router in order to atuhenticate itself when connecting to the email client |
Secure connection (SSL) | yes | no; default: no | SSL is a protocol for transmitting private documents via the Internet. SSL uses a cryptographic system that uses two keys to encrypt data − a public key known to everyone and a private or secret key known only to the recipient of the message |
SMS limit | integer; default: 5 | Limit of SMS count that can be contained in the email body of text, SMS length is limited to 160 seven-bit characters. Emails that contain more symbols than it is specified in this field will not be sent as SMS messages |
Check email every | time; default: 1 minute | Email inbox check interval |
Interval | Minutes | Hours| Days; default: Minutes | Email inbox check interval |
Additional note: you may have noticed that there is no option where you can specify the recipient's phone number. As mentioned earlier, Email to SMS doesn't forward all emails, only the ones that are meant to be forwarded. Only emails with the recipient's phone number in the subject will be forwarded to SMS
Correct phone number format is:
- 00 - number must be preceded by two zeros
- <country_code> - the next following element is the number holder's country code
- <receivers_number> - phone number of the recipient
For example, a valid number would be 0037012345678 (370 is country code and 12345678 is the receiver's phone number, all preceded by 00) {{#ifeq:{{{name}}}| TRB255| |
Call Utilities
Just like SMS Utilities, Call Utilities provide you with the possibility to issue certain commands to the router from your mobile phone. The list of possible rules is of course shorter because you can only make one type of call. Keep that in mind when creating Call Utilities rules because one call will trigger all of the enabled rules at once.
Call Rules
To create a new rule, select an 'Action' and click the 'Add' button. The new rule will appear in the 'Call Rules' list. Click the 'Edit' button next to it to configure the rule.
Then you should be redirected to that rule's configuration page. The Call Configuration window is similar to SMS Configuration but less complex.
Call Configuration also has similar Authorization settings.
Messages
With the help of the Messages window you can read and send SMS messages.
Read SMS
In the Read SMS tab you can read and delete received/stored SMS messages. The layout is simple, there is a list of received SMS messages and you can choose how many entries of that list should be visible at one time with SMS per page drop box in the top left corner of the page and there is a Search field to help you navigate more efficiently through the list of messages in the top right corner of the page.
Send Messages
The Send Messages tab let's you send SMS messages from the router‘s SIM card.
[[File:Networking_rutos_manual_mobile_utilities_messages_send_messages_dualmodem_{{{dualmodem}}}.png|border|class=tlt-border]]
All you have to do is enter the recipient’s phone number, type in your message and hit the Send button.
Storage
In the Storage tab you can find settings associated with message storage.
[[File:Networking_rutos_manual_mobile_utilities_messages_storage_dualmodem_{{{dualmodem}}}.png|border|class=tlt-border]]
Field | Value | Description |
---|---|---|
Save messages on SIM | off | on; default: on | If this is enabled, messages from SIM card will not be removed after they have been read |
Delete forwarded messages | off | on; default: off | If enabled, all forwarded messages will be automatically deleted |
SIM card memory | - | Information about used/available SIM card memory |
Leave free space | default: 5 | How much memory (number of messages) should be left free |
[[Category:{{{name}}} Services section]]