RADIUSdesk

logo

This is an old revision of the document!


OpenWRT 22.03.x with MESHdesk packages

Follow these instructions to include the MESHdesk package on devices capable of running OpenWRT version 22.03.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 2022 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 compile OpenWrt with the MESHdesk package included.

Steps In Adding New Hardware

Explaining our modus operandi (MO)

  • To introduce a new device we will:
    1. Create an initial development firmware image with all the required packages and files included but with central management disabled.
    2. We will then flash a device with this image and make the device specific tweaks in order for it to work as expected when managed centrally.
    3. We can then use these tweaked files to build a production image for the device that will include the device specific files.
  • This approach allows us to:
    • Minimize the risk of bricking the device (A factory reset will bring it back to a normal running OpenWrt)
    • Allow fine tuning to the device without the need to create and flash a new firmware image each time we make a tweak.

Initial Development Firmware

These steps are ONCE ONLY when introducing new hardware.

  1. Build OpenWRT with MESHdesk package (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.

To structure the documentation better we have dedicated pages to discuss these files including their function and how to tweak them for your specific device.

This is a once only process so after you have made the tweaks to the files you can skip this step in future and simply use those device specific files when you need to build new firmware for the same hardware.

Production Firmware

  1. Build OpenWRT firmware with the MESHdesk package that contains the device specific files for
    1. wan_network
    2. captive_config.json
    3. meshdesk
  2. Flash your device with the production firmware.
  • So without further ado, lets get going with the initial development firmware.
  • We will take a Xiaomi 4A 100M Access Point as a sample unit.
  • You can use the hardware of your choice and simply apply the same principles.

Checkout the MESHdesk code

  • Most of the packages one can include when building OpenWrt firmware are either part of the SDK or can be included using the package feeds that is also part of the SDK.
  • You can also include packages that is not part of the SDK or part of the feeds.
  • The MESHdesk package is such a package.
  • The MESHdesk package is hosted on Github as part of a git repository.
  • This git repository also includes other the items we will use with our firmware development (the Luci application and some additional files)
  • Check out the openwrt-meshdesk package from the Github repository.
#Do this in the working directory e.g. cd 23.03.0 (on the same level as the openwrt directory)
git clone https://github.com/RADIUSdesk/openwrt-meshdesk.git openwrt-meshdesk
  • The repository has three main components. Each one is located in a unique folder.
    1. MESHdesk - This is the MESHdesk package which will be included 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 or disable central control of the device.

Copying the three components

  • The MESHdesk folder needs to be copied under the package folder (openwrt/package).
#cd to the working directory
cp -R ./openwrt-meshdesk/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.

Select Packages To Include With Firmware

  • The OpenWrt SDK has a cursors interface (much like Midnight Commander for the old school readers 8-O)
  • To start this cursors interface up you need to cd from the working directory to the openwrt directory.
  • Then issue the following:
#cd to the working directory
cd openwrt
make menuconfig
  • Here you will select the hardware architecture of the device you want to build the firmware for and also its model.
  • Also select the following packages when building the firmware.
  • When selecting a package there are the options to build it as a module (M) or fully include it (*).
  • Make sure you select with the (*) option to fully include the package.
  • Package names in bold are required.
  • The Mosquitto packages are for MQTT support.
  • The Batman packages are for mesh support.