RADIUSdesk

This is an old revision of the document!


OpenWRT 17.01.x with MESHdesk packages

Follow these instructions to build the MESHdesk firmware on devices capable of running OpenWRT version 17.01.x

Minimum Hardware Requirements

  • The minimum hardware requirements are:
    • 8M Flash
    • 64M RAM
  • Although the system can potentially support hardware with less resources, supporting them in 2021 is not practical any more.
  • The hardware does not need a radio on it.
  • Hardware without radios can be managed using APdesk.
  • Mediatek and Atheros / Qualcomm SOC devices are supported.
  • Other target systems are also supported but have not been thoroughly tested to date.
  • If you are not sure if your hardware will work please visit the OpenWRT website and check. They have an ever growing list of supported hardware.
  • Next we will look at the steps you need to take to get MESHdesk working with it.

Steps In Adding New Hardware

The Very First Time (Draft)

These steps you have to do ONCE ONLY

  1. Build OpenWRT with MESHdesk firmware (MESHdesk disabled).
  2. Flash your device.
  3. Prepare the wan_network file for specific device.
  4. Prepare meshdesk config file for specific device.
  5. Prepare captive_config.json file for specific device.

Afterwards (Final)

  1. Build OpenWRT with MESHdesk firmware containing the device specific files for
    1. wan_network
    2. captive_config.json
    3. meshdesk
  2. Flash your device with the final built of firmware.
  • So without further ado, lets get going with the first draft built.
  • In this page we will take an Open Mesh OM2P (first version) Access Point as a sample unit.
  • You can use the hardware of your choice and simply apply the same principles.
  • Make sure you followed these instructions to prepare the environment.

Fetching the MESHdesk package

  • Check out the OpenWRT-MESHdesk package from the SourceForge repository.
#Do this in the working directory e.g. cd 17.01.7
git clone git://git.code.sf.net/p/radiusdesk/openwrt-meshdesk openwrt-meshdesk
  • The package has three main components. Each one is located in a unique folder.
  1. zzz-MESHdesk - This is the MESHdesk package which will be build by the SDK.
  2. files - This is the override structure containing files to override during the build process.
  3. luci-app-meshdesk - This is the Luci application used to enable central control.

Copying the three components

  • The zzz-MESHdesk folder needs to be copied under the package folder (openwrt/package).
#cd to the working directory
cp -R ./openwrt-meshdesk/zzz-MESHdesk ./openwrt/package 
  • The files folder needs to sit directly under the openwrt folder (root level).
#cd to the working directory
cp -R ./openwrt-meshdesk/files ./openwrt 
  • The luci-app-meshdesk folder needs to be copied under the feeds/luci/applications folder.
#cd to the working directory
cp -R ./openwrt-meshdesk/luci-app-meshdesk ./openwrt/feeds/luci/applications

Updating the available packages

  • Since we added a Luci application, we need to tell the SDK about it.
  • After you copied the packages across issue the following command:
#cd to the working directory
cd ./openwrt
scripts/feeds update -i
#Install the package to make it visible 
scripts/feeds install luci-app-meshdesk
  • The result is that the MESHdesk Luci application will be listed as one of the available Luci applications.
  • These instructions are for the 17.01.x branch.
  • Each branch has a unique set of small tweaks in its instructions.
  • If you are using a different branch please refer to that branch's page

Select Packages To Include With Firmware

  • Select the following packages when building the firmware.
  • Package names in bold are required.
  • The Mosquitto packages are for MQTT support.
  • The Batman packages are for mesh support.
Package Location Comment
zzz-MESHdesk Base system
kmod-batman-adv Kernel Modules → Network Support Keep the default options
lua-mosquitto Languages → Lua
libiwinfo-lua Languages → Lua
luasocket Languages → Lua
libuci-lua Libraries
luci Luci → Collections
luci-compat Luci → Modules Needs this modules for our package VERY IMPORTANT
luci-app-meshdesk Luci → Applications Luci App to enable and disable central management
luci-theme-material Luci → Themes Modern theme that is easy to customize
luci-lib-httpclient Luci → Libraries
luci-lib-httpprotoutils Luci → Libraries
luci-lib-json Luci → Libraries
luci-lib-jsonc Luci → Libraries
coova-chilli Network → Captive Portals Select OpenSSL as SSL Library. Also select Enable the JSON interface.. and ..Coova miniportal…
curl Network → File Transfer
relayd Network → Routing and Redirection
wpad IEEE 802.1x Auth/Supplicant (built-in full) Network → WirelessAPD Un-select wpad-basic
batctl-full Network Un-select batctl-default
mosquitto-client-ssl Network Note the CLIENT package
  • After you selected these packages you can save the configuration and issue make to build the firmware.
  • The firmware you just built will be standard OpenWRT in effect and you can flash your hardware as with normal OpenWRT then access it on 192.168.1.1.
    • Username and Password is root and admin for Luci and ssh.
  • The next section will cover the files you have to attend to for the specific hardware tweaks.

Initial File Preparation

  • Use ssh to gain access to the device in order to tweak these files.

wan_network

  • Refer to the default /etc/config/network file.
network
config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr '127.0.0.1'
	option netmask '255.0.0.0'
 
config globals 'globals'
	option ula_prefix 'fd15:97e0:cb63::/48'
 
config interface 'lan'
	option type 'bridge'
	option ifname 'eth0'
	option proto 'static'
	option ipaddr '192.168.1.1'
	option netmask '255.255.255.0'
	option ip6assign '60'
 
config interface 'wan'
	option ifname 'eth1'
	option proto 'dhcp'
 
config interface 'wan6'
	option ifname 'eth1'
	option proto 'dhcpv6'
  • With this setup we have the POE port as LAN (The port next to the Power Jack).
  • We also have the WAN sitting next to the antenna.
  • This is not ideal for us since we want to feed power onto the WAN port.
  • Next look at the /etc/MESHdesk/configs/wan_network file that is derived from it.
wan_network
config interface 'loopback'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'
    option ifname 'lo'
 
config interface 'lan'
    option ifname 'eth0'
    option type 'bridge'
    option proto 'dhcp'
 
config interface 'client_0'
    option proto 'dhcp'
 
config interface 'client_1'
    option proto 'dhcp'
  • Note there are no switch sections. Please refer to the other Wiki pages on the convention to use if the network file has switch sections.
  • client_0 and client_1 interface sections can always be kept as is.
  • lan interface section is in actuality the WAN port. (This is due to the historical nature of the project and also that we support hardware with a single Ethernet port)
  • Since we wanted the port with POE (eth0) as WAN we actually kept the membership of the lan interface as is (remember it is actually the WAN port)
  • Next we will look at the /etc/config/meshdesk file and tweak it to work with our environment and our hardware.
  • There is a growing list of existing sample wan_network files under the /openwrt/package/zzz-MESHdesk/files/MESHdesk/configs folder.
  • They have a convention of network_<firmware_id> e.g. network_xiaomi_4a_100
  • Simply copy that file over openwrt/package/zzz-MESHdesk/files/MESHdesk/configs/wan_network
  • Those files will have a matching existing hardware section in the openwrt/package/zzz-MESHdesk/files/MESHdesk/meshdesk file