In this manual, we will be able to program our Teltonika router to turn on or off the WiFi access point at specific times.
Let's begin by "assuming" that our wireless network is already configured on the Teltonika router.
This can be useful, for example, to save energy, for security, or simply to establish usage schedules, etc.
As the first step:
The first thing we will do is to access our Teltonika router via SSH terminal, for which we can use software like putty as a client, for example:
If you don't have putty, you can download it from the following link:
Login with the root user and the password you have defined for the access user.
As the second step:
From here, we start adding the following commands, which we can copy and paste directly into the console:
I will explain the parameters of each command:
First line of command:
0: action should take place at minute 0 (right after the hour changes)
8 - action should take place at 8 AM.
all days of the month are applicable to the rule.
all months of the year are applicable to the rule.
1-5: action should be performed from Monday to Friday.
uci set wireless.@wifi-iface[0].user_enable=1 - enables the WiFi access point
uci delete wireless.@wifi-iface[0].disabled - removes the option of disabled WiFi
uci commit: commits configuration changes.
wifi: restarts the wifi service.
First line of command:
0 8 * * 1-5 uci set wireless.@wifi-iface[0].user_enable=1 && uci delete wireless.@wifi-iface[0].disabled && uci commit && wifi
Second line:
0: action should take place at minute 0 (right after the hour changes)
18 - action should take place at 6 PM.
* - all days of the month apply to the rule.
* - all months of the year apply to the rule.
1-5: action should be performed from Monday to Friday.
uci set wireless.@wifi-iface[0].user_enable=0 - disables the WiFi access point
uci set wireless.@wifi-iface[0].disabled=1 - disables the WiFi access point
uci commit: commits configuration changes.
wifi: restarts the wifi service.
&& - separates different commands.
Second line of command:
0 18 * * 1-5 uci set wireless.@wifi-iface[0].user_enable=0 && uci set wireless.@wifi-iface[0].disabled=1 && uci commit && wifi
In summary, the first line enables the WiFi AP at 8 AM, and the second disables it at 6 PM. At the end of the activation and deactivation processes, changes are confirmed, and related services are restarted.
With this, we have programmed the automatic activation and deactivation of the WiFi interface.