This post was last edited by wateras1 on 2018-4-3 13:37 How to use openwrt uciUCI is the abbreviation of Unified Configuration Interface, which means unified configuration interface in Chinese. Its purpose is to provide a centralized control interface for OpenWrt. This tool implemented by OpenWrt allows you to modify system parameters by executing commands to transmit parameters, whether it is Lua or PHP program, or SHELL program or C program. Please refer to the Command Line Utility Tool at the end of this article.
The system configuration should be simple and direct. The original intention of UCI's design is to do so. It is the successor of the NVRAM-based configuration method (the NVRAM-based configuration method originated from the White Russian series of OpenWrt, which is no longer updated and was last released in 2007 with version number 0.9). UCI can be regarded as the main user configuration interface for the function settings of the OpenWrt system. Generally speaking, these configurations are closely related to the functions of the system. Imagine that the configuration items in the WEB interface of the router or embedded device we usually use are the functions integrated into the router or embedded device system. Common examples include the network interface settings, wireless parameter settings, logging settings, and remote login settings of the router.
For the op firmware that has been burned to the hardware, we need to modify some configuration information. Generally, this is achieved by directly modifying the uci file. It can be achieved by editing the relevant files in vi mode or through the uci command line. 1. I personally think it is more convenient to use the uci command line. What functional modules of the op firmware can be configured through the uci command line? 1 root root 782 Mar 20 11:04 dhcp -rw-r--r-- 1 root root 134 Mar 20 10:50 dropbear -rw-r--r-- 1 root root 4213 Mar 20 11:01 firewall -rw-r--r-- 1 root root 151 Mar 20 11:02 fstab -rw-r--r-- 1 root root 806 Mar 20 11:01 firewall -rw-r--r-- 1 root root 782 Mar 20 11:04 fstab -rw-r--r-- 1 root root 806 Mar 20 11:02 luci -rw-r--r-- 1 root root 325 Apr 3 11:16 mjpg-streamer -rw-r--r-- 1 root root 68 Mar 20 11:01 mountd -rw-r--r-- 1 root root 606 Apr 3 10:52 network -rw-r--r-- 1 root root 97 Mar 20 11:02 rpcd -rw-r--r-- 1 root root 713 Mar 20 11:02 hairport -rw-rw-r-- 1 root root 270 Feb 7 14:11 system -rw-r--r-- 1 root root 114 Mar 20 11:02 ubootenv -rw-rw-r-- 1 root root 736 Feb 7 14:18 ucitrack -rw-r--r-- 1 root root 665 Mar 20 11:02 uhttpd -rw-r--r-- 1 root root 575 Apr 2 19:43 wireless The above files can be configured through uci. For example, to modify the mjpg-streamer file, you can first use uci show mjpg-streamer to view the configuration information root@Widora:/# uci show mjpg-streamer mjpg-streamer.core=mjpg-streamer mjpg-streamer.core.enabled='0' mjpg-streamer.core.input='uvc' mjpg-streamer.core.output='http' mjpg-streamer.core.device='/dev/video0' mjpg-streamer.core.resolution='640x480' mjpg-streamer.core.yuv='0' mjpg-streamer.core.quality='80' mjpg-streamer.core.fps='5' mjpg-streamer.core.led='auto' mjpg-streamer.core.www='/www/webcam' mjpg-streamer.core.port='8080' mjpg-streamer.core.username='openwrt' mjpg-streamer.core.password='abc123456' Use the following configuration commands to modify the relevant information root@Widora:/# uci set mjpg-streamer.core.fps='25' root@Widora:/# uci set mjpg-streamer.core.enabled='1' root@Widora:/# uci commit mjpg-streamer root@Widora:/# /etc/init.d/mjpg-streamer restart (Be sure to add this command, otherwise the command will not take effect) Continue to check whether the command is effective, you can see that it is effective root@Widora:/# uci show mjpg-streamer mjpg-streamer.core=mjpg-streamer mjpg-streamer.core.input='uvc' mjpg-streamer.core.output='http' mjpg-streamer.core.device='/dev/video0' mjpg-streamer.core.resolution='640x480' mjpg-streamer.core.yuv='0' mjpg-streamer.core.quality='80' mjpg-streamer.core.led='auto' mjpg-streamer.core.www='/www/webcam' mjpg-streamer.core.port='8080' mjpg-streamer.core.username='openwrt' mjpg-streamer.core.password='abc123456' mjpg-streamer.core.fps='25' mjpg-streamer.core.enabled='1' If you want to modify other files, basically follow the above operation method, which is very convenient to operate. I personally think it is more convenient than using vi to modify. In fact, it realizes a web video monitoring function. You can realize video monitoring by buying a driver-free USB camera and realize remote monitoring by making a port mapping. I bought a disassembled laptop camera with 200W pixels and tested it. The effect is good, in mjpg format.
This content is originally created by EEWORLD forum user wateras1. If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the sourceenabled='1' If you want to modify other files, basically the above operation method is very convenient to operate. I personally think it is more convenient than using vi to modify. In fact, the above implements a web video monitoring function. You can realize video monitoring by buying a driver-free USB camera and realize remote monitoring by making a port mapping. I bought a disassembled laptop camera with 200W pixels and tested it. The effect is good, in mjpg format.
This content is originally created by EEWORLD forum user wateras1. If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the sourceenabled='1' If you want to modify other files, basically the above operation method is very convenient to operate. I personally think it is more convenient than using vi to modify. In fact, the above implements a web video monitoring function. You can realize video monitoring by buying a driver-free USB camera and realize remote monitoring by making a port mapping. I bought a disassembled laptop camera with 200W pixels and tested it. The effect is good, in mjpg format.
This content is originally created by EEWORLD forum user wateras1. If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source