User Tools

Site Tools


wiki:basicuci

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:basicuci [2019/05/28 11:22] (current)
Line 1: Line 1:
 +======Basic Uci======
  
 +The UCI (Unified Configuration Interface) system is the centralized configuration method for OpenWRT. A very detailed explanation as well as a list of all uci files and options can be found from the OpenWRT wiki [[http://​wiki.openwrt.org/​doc/​uci|here]].
 +
 +=====Linino Uci=====
 +
 +The Linino firmware will already contain twelve uci files in ''/​etc/​config'':​
 +  * arduino ​
 +  * dhcp
 +  * dropbear ​
 +  * firewall ​
 +  * fstab 
 +  * luci
 +  * network ​
 +  * system
 +  * ubootenv ​
 +  * ucitrack ​
 +  * uhttpd
 +  * wireless
 +
 +====Examples====
 +
 +Here are some simple examples of using uci to configure your device to get started.
 +
 +**Changing Wireless SSID**
 +
 +The default SSID for the Arduino Yun is Arduino-XXXXXXXXXXXX,​ where the X's represent your divice'​s MAC-Address. To change the SSID change directory to ''/​etc/​config''​ and open the file titled //​wireless//​
 +
 +''#​ cd /​etc/​config''​
 +
 +''#​ vi wireless''​
 +
 +The wireless file should look like this:
 +
 +  config wifi-device '​radio0'​
 +          option type '​mac80211'​
 +          option channel '​11'​
 +          option hwmode '​11ng'​
 +          option path '​platform/​ar933x_wmac'​
 +          option htmode '​HT20'​
 +          list ht_capab '​SHORT-GI-20'​
 +          list ht_capab '​SHORT-GI-40'​
 +          list ht_capab '​RX-STBC1'​
 +          list ht_capab '​DSSS_CCK-40'​
 +          option disabled '​0'​
 +  config wifi-iface
 +          option device '​radio0'​
 +          option network '​lan'​
 +          option mode '​ap'​
 +          option encryption '​none'​
 +          option ssid '​Arduino Yun-XXXXXXXXXXXX'​
 +          ​
 +Using ''​vi''​ (tutorial [[http://​www.cs.colostate.edu/​helpdocs/​vi.html|here]]),​ simply change the last option ''​option ssid '​Arduino Yun-90A2DAF0000E'​ ''​ to ''​option ssid '​your_ssid_here'​ '',​ save the file, then commit the settings by restarting with the command:
 +
 +''#​ /​etc/​init.d/​network restart''​
 +
 +An equivalent way to change uci settings is to use the ''​uci''​ command.
 +
 +Usage: ''​uci [<​options>​] <​command>​ [<​arguments>​]''​
 +
 +To change the ssid of your device, use the command:
 +
 +''#​ uci wireless.@wifi-iface[1].ssid=your_ssid_here''​
 +
 +We use @wifi-iface[1] to represent the second rule on the wireless page. This comes in handy when there are options with the same names in two different rules.
 +
 +To commit the changes us the commands:
 +
 +''#​ uci commit wireless''​
 +
 +''#​ /​etc/​init.d/​network restart''​
wiki/basicuci.txt ยท Last modified: 2019/05/28 11:22 (external edit)