RADIUSdesk

logo

This is an old revision of the document!


meshdesk file

Background

  • MESHdesk use the LEDs of the device it is installed on to signal about the environment.
    • It signals during startup about the method it uses to try and fetch its settings at that moment.
    • If the device is used in a mesh network it will signal how many neighboring nodes it sees after startup.
    • 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)
    • Finally on mesh networks we can also specify a LED that will indicate mesh traffic flowing through a node.
    • Lets look at the Xiaomi 4A 100M as a sample.
#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
  • 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.
  • 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 /etc/config/meshdesk
config hardware 'xiaomi_4a_100'
	option morse_led '/sys/class/leds/blue:power/brightness'
	option internet_led '/sys/class/leds/yellow:power/brightness'
	option wifi_led 'led0'
  • This have to match the value for hardware under the settings section
config settings 'settings'
	option hardware 'xiaomi_4a_100'
	option id_if 'eth0'
	option lan_up_file '/tmp/lan_up'

Don't make the name of the hardware section more than 14characters. Longer names break things during deployment.