Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. <nav type="pills" justified="false"> * [[:user_manuals|Back to Documentation]] * [[:network:firmware:openwrt-meshdesk-file|meshdesk]] </nav> ----- ====== meshdesk file ====== ===== Introduction ===== * The meshdesk configuration file follows the UCI conventions that are standard for OpenWrt. * It has a couple of named sections. * The only two sections you will typically tweak is **internet** and **settings**. ===== internet section with the name 'internet' ===== * This section is used to activate or deactivate the central control of the hardware. * The FQDN and IP address of the RADIUSdesk server and the URLs for certain actions are specified here. ===== settings section named 'settings' ===== * This section is the only section which is **unique according to the hardware**. * It will list the hardware id and the LEDs as well as the interface used for identity. * It also includes other settings which tweak the behavior of the device when it is centrally managed. ---------- ===== Background on LEDs ===== * MESHdesk use the LEDs of the device on which it is installed to display information about the environment. * **During startup** a LED indicates the method used to retrieve the settings from the controller. * **After startup** when the device is used in a mesh network, this LED indicates how many neighboring nodes it sees. * A second LED indicates whether the device is in proper contact with the controller. (The LED can be either ON or OFF in such a case) * Finally, for mesh networks, we can also specify a third LED that indicates the mesh traffic flowing through a node. ===== Exploring our hardware ===== * Let us take a look at the Xiaomi 4A 100M as an example. <code bash> #change directory to where the LEDs are cd /sys/class/leds/ ls #These are the LEDs available blue:power mt76-phy0 mt76-phy1 yellow:power #turn it off echo "0" > yellow\:power/brightness #turn it on echo "1" > yellow\:power/brightness #turn it off echo "0" > blue\:power/brightness #turn it on echo "1" > blue\:power/brightness </code> * We can use the blue LED to signal during startup and neighbour counting (**morse_led**). * We can also use the yellow LED to signal that communication with the controller is interrupted (**internet_led**). * However, since there is no third LED, we will not define one for mesh traffic (**wifi_led**). ===== Incorporating this in the settings section ===== * As we said earlier, the settings section is the only section which is unique according to the hardware. * We can thus modify the settings section as follows: <code bash> config settings 'settings' option hardware 'xiaomi_4a_100' option id_if 'eth0' option morse_led '/sys/class/leds/blue:power/brightness' option internet_led '/sys/class/leds/yellow:power/brightness' option internet_led_alarm '1' option wifi_led '/dev/null' option lan_up_file '/tmp/lan_up' </code> * **hardware** - must match the value of a hardware id in RADIUSdesk's Hardware applet. * **id_if** - must match the interface specified in the **wan_network** file. * **internet_led_alarm** - We set it to **1** to use it as an alarm (e.g. turn it on when the Internet is down). <alert type="info"> * Do not make the name of the hardware section longer than 14 characters. Longer names lead to problems during provisioning. * For devices where the interface used in wan_network is eth0.1, simply use eth0 here. </alert> * Later we will also use the value of **xiaomi_4a_100** to define the hardware on the controller. ==== Review new hardware ==== * The following table lists the most important points with comments <panel type="primary" title="Key hardware items" no-body="true"> ^ Item ^ Typical value ^ Comment ^ | settings -> hardware | xiaomi_4a_100 | Must match the value of a hardware id in RADIUSdesk's Hardware applet. | | settings -> id_if | eth0 | eg eth0, eth1 or wan - NOT eth0.1 (for those boards its just eth0) | | settings -> morse_led | /sys/class/leds/blue:power/brightness | LED to signal during startup and neighbour counting | | settings -> internet_led | /sys/class/leds/yellow:power/brightness | LED to signal connection to controller | | settings -> internet_led_alarm | 1 | If Internet LED should be used as an alarm or not | | settings -> wifi_led | /dev/null | LED used to show mesh traffic | | settings -> skip_radio_0 | 0 | set to 1 when radio0 is a 5G radio and you don't want to use it for config SSID | </panel> ===== Remember Your Environment ===== * Finally you need to adjust some items to match up with your controller and its environment. * The following table lists some of the important items with comments <panel type="primary" title="Key environment items" no-body="true"> ^ Item ^ Typical value ^ Comment ^ | internet1 -> disabled | 1 | change it to 0 in order for the device to be centrally controlled | | internet1 -> dns | cloud.radiusdesk.com | <wrap em>Supply Dummy Value If Not Using DNS System e.g. nohost.radiusdesk.com</wrap> | | internet1 -> protocol | https | Can be http or https | | internet1 -> ip | 176.31.15.210 | Fallback when FQDN does not resolve on FQDN not used | </panel> * We are almost finished. The last stop is to edit the captive_config.json file to customise it to our specific hardware. network/firmware/openwrt-meshdesk-file.txt Last modified: 2024/07/13 12:44by system