This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
technical:openwrt-meshdesk-file [2022/09/18 13:02] admin created |
technical:openwrt-meshdesk-file [2022/09/18 21:17] (current) admin [Review new hardware] |
||
---|---|---|---|
Line 2: | Line 2: | ||
===== Background ===== | ===== Background ===== | ||
* MESHdesk use the LEDs of the device it is installed on to signal about the environment. | * MESHdesk use the LEDs of the device it is installed on to signal about the environment. | ||
- | * It signals during | + | * During |
- | * If the device is used in a mesh network it will signal | + | * After startup, if the device is used in a mesh network it, this LED signals |
- | * There is also another LED used to indicate if the device has proper contact with the controller. (The LED can be either ON or OFF in such a case) | + | * A second LED is used to indicate if the device has proper contact with the controller. (The LED can be either ON or OFF in such a case) |
- | * Finally on mesh networks we can also specify a LED that will indicate mesh traffic flowing through a node. | + | * Finally on mesh networks we can also specify a third LED that will indicate mesh traffic flowing through a node. |
+ | |||
+ | ===== Exploring our hardware ===== | ||
* Lets look at the Xiaomi 4A 100M as a sample. | * Lets look at the Xiaomi 4A 100M as a sample. | ||
<code bash> | <code bash> | ||
Line 23: | Line 26: | ||
</ | </ | ||
- | * In our case we can use the yellow LED to light up if the comms to the controller is broken. | ||
* We can use the blue LED to signal during startup and neighbor counts. | * We can use the blue LED to signal during startup and neighbor counts. | ||
- | * There is no extra LED so we will not define one for the mesh traffic. | + | |
- | * With this info we can create a hardware section in / | + | |
+ | |||
+ | ===== Add a hardware section for our device ===== | ||
+ | |||
+ | * With this info we can create a hardware section in / | ||
<code bash> | <code bash> | ||
config hardware ' | config hardware ' | ||
Line 33: | Line 39: | ||
option wifi_led ' | option wifi_led ' | ||
</ | </ | ||
- | | + | |
+ | ===== Adjust the settings section accordingly ===== | ||
+ | * There are two important options here to adjust | ||
+ | * **hardware** - have to match the value of a hardware | ||
+ | * **id_if** - have to match the interface specified in the **wan_network** file. | ||
<code bash> | <code bash> | ||
config settings ' | config settings ' | ||
Line 40: | Line 50: | ||
option lan_up_file '/ | option lan_up_file '/ | ||
</ | </ | ||
- | <WRAP center round tip 90%> | + | <WRAP center round tip 100%> |
- | Don't make the name of the hardware section more than 14characters. Longer names break things during deployment. | + | |
+ | * Devices where the interface used in wan_network is eth0.1 simply use eth0 here. | ||
</ | </ | ||
+ | * 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 which means it has to light up when communication to the controller is down. | ||
+ | * Since we want the **yellow LED** to be off when the communication to the controller is fine we need to check what the current setup is. | ||
+ | <code bash> | ||
+ | vi / | ||
+ | #Look for this section | ||
+ | if(ok_flag)then | ||
+ | internetLED(' | ||
+ | checkForContollerReboot(' | ||
+ | else | ||
+ | internetLED(' | ||
+ | checkForContollerReboot(' | ||
+ | end | ||
+ | </ | ||
+ | |||
+ | ==== Review new hardware ==== | ||
+ | |||
+ | |||
+ | * The following table lists the important items with comments | ||
+ | |||
+ | ^ Item ^ Typical value ^ Comment | ||
+ | | settings -> hardware | xiaomi_4a_100 | Must match a hw definition in the file itself | ||
+ | | settings -> id_if | eth0 | eg eth0, eth1 or wan - NOT eth0.1 (for those boards its just eth0) | | ||
+ | | settings -> skip_radio_0 | ||
+ | |||
+ | ===== 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 | ||
+ | |||
+ | ^ Item ^ Typical value ^ Comment | ||
+ | | internet1 -> disabled | ||
+ | | internet1 -> dns | cloud.radiusdesk.com | ||
+ | | internet1 -> protocol | https | Can be http or https | | ||
+ | | internet1 -> ip | 176.31.15.210 | Fallback when FQDN does not resolve on FQDN not used | | ||
+ | |||
+ | * We are nearly done. The last stop is to edit the **captive_config.json** file to fit our specific hardware. | ||