FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
445 views 5 comments
by anonymous
Goodmorning,

I am trying to make a full config script for CLI , Enabling operator mode and whitelist is not a problem however i cannot find anything CLI related about making the whitelist trough CLI.

If i look at the commands what the webui uses :

uci add operctl operlist=cfg0123d7
uci set operctl.@operlist[-1].name='test'

This does not work when putting it manualy in the CLI.

Could someone help me out?

Best regards,

Tansu

2 Answers

0 votes
by anonymous

Hello,

Could you post all of the commands that you use for configuration? Also, there are a couple of things to keep in mind. 

After setting the parameters with uci, another command is necessary to enter uci commit. This command writes changes of the given configuration file, or, if none is given, all configuration files, to the filesystem. All “uci set”, “uci add”, “uci rename” and “uci delete” commands are staged into a temporary location and written to flash only once “uci commit” is entered. 

Next you need to either reboot the router or operctl service, in order for the new configuration to be used. This can be done with command reload_config at the end of all configurations.

Bet regards,

Žygimantas 

by anonymous
Hello,

i use 

uci add operctl operlist=cfg0123d7

uci set operctl.@operlist[-1].name='test'

uci commit

reload_config

This does work when there is a list created already i can see take effect by changing the name.

however if the operator list is empty and i run the above commands to make a list i get this.

uci add operctl operlist=cfg0123d7

cfg064805

uci set operctl.@operlist[-1].name='test'
uci:invalid argument
BR,
Tansu
by anonymous

Hello,

Try following the commands from the screenshot:

Best regards,

Žygimantas

by anonymous

Hello,

I have tried the commands you are showing in the screenshot.
 

It makes a list now but i got the following problem in the webUI.(this is in FW 2.6) in fw 7.0 the webui shows how is supposed to be but i want this to happen in FW 2.6.

BR,

Tansu

by anonymous
Hello,

Unfortunately it is a bug fixed only with latter firmware revisions.

Best regards,

Žygimantas
0 votes
by anonymous
Thanks for the info.

One more qeustion.

now after using uci set operctl.@operlist[-1].mcc_mnc='20416' how can i add more variables in this line trying to add more codes in the list but it just make one long op. code.

Br,

Tansu
by anonymous

Please refer to this link for instructions on how to add lists using uci commands: https://wiki.teltonika-networks.com/view/UCI_command_usage#UCI_add_list.

Best regards,

Žygimantas