Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
network:firmware:openwrt-meshdesk-file [2024/07/13 11:05] systemnetwork:firmware:openwrt-meshdesk-file [2024/07/13 12:44] (current) system
Line 7: Line 7:
  
 ====== meshdesk file ====== ====== meshdesk file ======
 +===== Introduction =====
 +
   * The meshdesk configuration file follows the UCI conventions that are standard for OpenWrt.   * The meshdesk configuration file follows the UCI conventions that are standard for OpenWrt.
-  * It has the following named sections:+  * 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' ===== ===== internet section with the name 'internet' =====
   * This section is used to activate or deactivate the central control of the hardware.   * 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 also specified here. +  * The FQDN and IP address of the RADIUSdesk server and the URLs for certain actions are specified here. 
-===== wifi-client section named 'wifi_client' ===== + 
-  * The wifi-client section is used by hardware that has WiFi radios on to configure itself as a WiFi client+===== settings section named 'settings' ===== 
-  * This WiFi client then attempts to connect to a hidden SSID contained in mesh networks to serve as an //information station// for other devices that are also centrally managed.+  * 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 =====+===== Background on LEDs =====
   * MESHdesk use the LEDs of the device on which it is installed to display information about the environment.   * MESHdesk use the LEDs of the device on which it is installed to display information about the environment.
-     * During startup, an LED indicates the method used to retrieve the settings from the controller. +     * **During startup** a LED indicates the method used to retrieve the settings from the controller. 
-     * After startupwhen the device is used in a mesh network, this LED indicates how many neighboring nodes it sees.+     * **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)      * 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.      * Finally, for mesh networks, we can also specify a third LED that indicates the mesh traffic flowing through a node.
Line 42: Line 48:
 </code> </code>
  
-  * We can use the blue LED to signal during startup and neighbour counting. +  * 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. +  * 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.+  * However, since there is no third LED, we will not define one for mesh traffic (**wifi_led**).
    
-===== Add a hardware section for our device ===== +===== Incorporating this in the settings section ===== 
- +   As we said earlier, the settings section is the only section which is unique according to the hardware
-   With this information, we can create a hardware section in /etc/config/meshdesk+   * We can thus modify the settings section as follows:
 <code bash> <code bash>
-config hardware 'xiaomi_4a_100' +config settings 'settings' 
-   option morse_led '/sys/class/leds/blue:power/brightness' +    option hardware 'xiaomi_4a_100' 
-   option internet_led '/sys/class/leds/yellow:power/brightness' +    option id_if 'eth0' 
-   option wifi_led 'led0'+    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> </code>
  
-===== Customize the Settings section accordingly ===== +  * **hardware** - must match the value of a hardware id in RADIUSdesk's Hardware applet
-  * There are two important options here to customize the +  * **id_if** - must match the interface specified in the **wan_network** file. 
-        * **hardware** - they must match the value of a hardware definition in the settings section+  * **internet_led_alarm** - We set it to **1** to use it as an alarm (e.g. turn it on when the Internet is down).
-        * **id_if** - must match the interface specified in the **wan_network** file. +
-<code bash> +
-config settings 'settings' +
-   option hardware 'xiaomi_4a_100' +
-   option id_if 'eth0' +
-   option lan_up_file '/tmp/lan_up' +
-</code>+
  
 <alert type="info"> <alert type="info">
Line 72: Line 75:
 </alert> </alert>
   * Later we will also use the value of **xiaomi_4a_100** to define the hardware on the controller.   * Later we will also use the value of **xiaomi_4a_100** to define the hardware on the controller.
-===== Alarm On or Alarm Off?  ===== 
-  * We use the yellow LED as an alarm, i.e. it must light up when communication with the controller is interrupted. 
-  * Since we do not want the **yellow LED** to light up when communication with the controller is OK, we need to check what the current setting is. 
-<code bash> 
-vi /etc/MESHdesk/reporting/report_to_server.lua  
-#Look for this section 
-    if(ok_flag)then                                  
-        internetLED('0'); -- NOTE Here we can swap them, e.g. 0 to turn off a red LED when the internet is OK 
-        checkForContollerReboot('1');                    
-    else                                                                              
-        internetLED('1');                                                         
-        checkForContollerReboot('0');                   
-    end 
-</code> 
  
 ==== Review new hardware ==== ==== Review new hardware ====
Line 92: Line 81:
 <panel type="primary" title="Key hardware items" no-body="true"> <panel type="primary" title="Key hardware items" no-body="true">
 ^ Item        ^ Typical value           ^ Comment    ^ ^ Item        ^ Typical value           ^ Comment    ^
-| settings -> hardware | xiaomi_4a_100 | Must match a hw definition in the file itself  |+| settings -> hardware | xiaomi_4a_100 | Must match the value of 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 -> 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  | | 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> </panel>
  • network/firmware/openwrt-meshdesk-file.1720861533.txt.gz
  • Last modified: 2024/07/13 11:05
  • by system