Changes

909 bytes removed ,  11:54, 29 March 2023
m
Line 518: Line 518:  
This example will provide instructions on how configure Mobile Data Limit and SMS Warning on RUT routers' using only UCI commands. For the sake of the example lets say that you want to set up a data limit of 1 GB with the limit counter restarting everyday at 10 a.m. and an SMS Warning that sends out a message when the 800 MB threshold is reached that also restarts everyday at 10 a.m.  
 
This example will provide instructions on how configure Mobile Data Limit and SMS Warning on RUT routers' using only UCI commands. For the sake of the example lets say that you want to set up a data limit of 1 GB with the limit counter restarting everyday at 10 a.m. and an SMS Warning that sends out a message when the 800 MB threshold is reached that also restarts everyday at 10 a.m.  
   −
To achieve such a task, the first relevant piece of required information is the config name, '''data_limit''', where all the necessary configuration settings are stored. This task will require the knowledge of many mandatory option so lets begin the step-by-step part (comments will be provided along with each step and a short summary afterwards):
+
To achieve such a task, the first relevant piece of required information is the config name, '''quota_limit''', where all the necessary configuration settings are stored:
    
Enabling Mobile Data Limit and SMS Warning:
 
Enabling Mobile Data Limit and SMS Warning:
  # uci set quota_limit.mob1s1a1=interface
+
  #uci set quota_limit.mob1s1a1=interface
  # uci set quota_limit.mob1s1a1.enabled='1'
+
  #uci set quota_limit.mob1s1a1.enabled='1'
 
+
  #uci set quota_limit.mob1s1a1.ifname='mob1s1a1'
Setting the Mobile Data and SMS Warning limits:
+
  #uci set quota_limit.mob1s1a1.reset_hour='10'
  # uci set data_limit.limit.prim_conn_limit=1000
+
  #uci set quota_limit.mob1s1a1.sim='1'
  # uci set data_limit.limit.prim_wrn_limit=800
+
  #uci set quota_limit.mob1s1a1.data_limit='10000'
 
+
  #uci set quota_limit.mob1s1a1.wrn_sent='0'
Setting the Mobile Data Limit period:
+
  #uci set quota_limit.mob1s1a1.enable_warning='1'
  # uci set data_limit.limit.prim_conn_period=day
+
  #uci set quota_limit.mob1s1a1.period='1'
  # uci set data_limit.limit.prim_conn_hour=10
+
#uci set quota_limit.mob1s1a1.warning_limit='8000'
 
+
#uci set quota_limit.mob1s1a1.warning_num='+37012345678'
Setting the SMS Warning period and phone number:
  −
  # uci set data_limit.limit.prim_wrn_period=day
  −
  # uci set data_limit.limit.prim_wrn_hour=10
  −
  # uci set data_limit.limit.prim_wrn_number=+37012345678
  −
 
  −
The first enables both SMS Warning and Mobile Data Limit services by setting the options ''prim_enb_conn'' and ''prim_enb_wrn'' to ''1''. The second step sets up the to limits by setting the options ''prim_conn_limit'' and ''prim_wrn_limit'' to ''1000'' and ''800'' respectively. The third step specifies the frequency at which Mobile Data Limit will be reset. The option ''prim_conn_period'' can take values ''month'', ''week'' or in this case, ''day'', and ''prim_conn_hour'' indicates the hour of the day (in this case, ''10''). The fourth step sets up the SMS Warning period in the same manner and also adds the phone number ''+37012345678'' to the option ''prim_wrn_number''
      
==External links==
 
==External links==

Navigation menu