Building OpenWrt for the Seeed Studio WM6108 802.11ah HaLow Radio

speckx1 pts0 comments

Building OpenWrt for the Seeed Studio WM6108 802.11ah HaLow Radio – Beyondlogic

Sneak Peek

Search for:

The Seeed Studio Wio-WM6108 mini-PCIe module is a popular choice for creating a 802.11ah HaLow router. The mini-PCIe card can be inserted into the WM1302 Raspberry Pi Hat and attached to a Raspberry Pi.

Seeed Studio have a pre-built OpenWRT Image on their Wiki page, but it is a bit outdated and based on Morse Micro’s 2.7-dev release. They also don’t provide any guidance to how to build your own updated version.

This article shows how to build an OpenWRT image (based on Morse Micro’s 2.11-dev release) and what changes are necessary for the WM6108. It is aimed to be a bit technical, showing the manual steps or changes required, rather than patching OpenWRT or creating board files for an automated WM6108 build and providing the binaries. It is assumed if you are building your own router, you want to know what is going on under the hood. If you want a ready made product instead, try the HalowLink 2.

The Wio-WM6108 contains a FGH100M-H module from Quectel and is based on the Morse Micro MM6108 first generation integrated circuit. The FGH100M-H supports the 902-928 MHz frequency band, hence check if this is supported in your country. For example, Europe uses the 863-868 MHz band making the FGH100M-H unsuitable there.

Building OpenWRT

These instructions were used on Ubuntu 24.04.2 LTS. (Please note on Ubuntu 26.04 LTS, you may experience some issues building elfutils-0.189)

Morse Micro maintain a fork of OpenWRT patched with support for their HaLow drivers. Their HalowLink routers are based on this fork. Likewise, some of their evaluation kits (e.g mm6108-ekh01) are using a Raspberry Pi 4 and with their own hats (e.g. MMECH06) . We are essentially leveraging of their good work.

We choose to build an image for the Morse Micro mm6108-ekh01-spi which is close to what we intend to use – a mm6108 based radio connected via an SPI interface.

Morse Micro provide build instructions in their repository. First we need to install any build tools and dependencies:

sudo apt update<br>sudo apt install build-essential clang flex g++ gawk gcc-multilib \<br>git gettext libncurses5-dev libssl-dev python3-distutils-extra rsync \<br>unzip zlib1g-dev swig

And then we can clone and build OpenWRT using the commands below:

git clone https://github.com/MorseMicro/openwrt.git<br>cd openwrt<br>./scripts/morse_setup.sh -i -b mm6108-ekh01-spi<br>make -j8

Once built, the image files should be found in the openwrt/bin/targets/bcm27xx/bcm27xx/ folder and can be written to SDCard using your favorite tool. The file you are looking for is openwrt-morse-[ver]-mm6108-ekh01-spi-squashfs-sysupgrade.img.gz where [ver] is the version number.

If you want to skip this step, you can download a pre-built copy here.

Device Tree

While the Morse Micro OpenWRT repository has support for Development kits such as the MM6108-EKH01, the Seeed Studio hat uses a different set of GPIO pins. In Linux, we specify these changes via a compiled device tree. It is easier to modify one, rather than start from scratch.

The relevant device tree source files starts out as patches in OpenWRT, located at https://github.com/MorseMicro/openwrt/tree/2.11-dev/target/linux/bcm27xx/patches-5.15

The two we are interested in are:

991-0002-dt-overlays-morse-add-powersave-and-reset-pin-defini.patch

991-0003-dt-overlays-morse-add-spi-overlay-fragment.patch

Once OpenWrt is built, both the source files and compiled binaries are located on your build machine in openwrt/build_dir/target-aarch64_cortex-a72_musl/linux-bcm27xx_bcm2711/linux-5.15.189/arch/arm/boot/dts/overlays/

The task is simple – we just need to replace the pin numbers in MM6108-EKH01 (old) with what the Seeed Studio (new) hat uses.

Namemm610x<br>(old)WM6108<br>(new)Pin Number<br>(40-pin RPI Header)Pin Number (mPCIe)SPI_MISOGPIO9GPIO92147SPI_MOSIGPIO10GPIO101949SPI_CLKGPIO11GPIO112345SPI_CSGPIO8GPIO82451SPI_INTGPIO25GPIO52910ResetGPIO5GPIO171122WakeupGPIO3GPIO231633BusyGPIO7GPIO241831

Once modified, they can be recompiled using the device tree compiler. This can be installed on your Ubuntu build machine using:

sudo apt-get install device-tree-compiler

And then compiled into binaries using the following commands:

dtc -I dts -O dtb morse-ps-overlay.dts -o morse-ps.dtbo<br>dtc -I dts -O dtb mm610x-spi-overlay.dts -o mm610x-spi.dtbo

Once compiled, they need to be loaded to your OpenWrt filesystem /boot/overlays

Pre-compiled versions can be found here. If your OpenWRT router is on the internet, they can be loaded directly using wget. ssh into OpenWRT and run:

cd /boot/overlays<br>rm mm610x-spi.dtbo<br>wget https://www.beyondlogic.org/halow/mm610x-spi.dtbo<br>rm morse-ps.dtbo<br>wget https://www.beyondlogic.org/halow/morse-ps.dtbo

The individual overlays are loaded by a file located in /boot/distroconfig.txt. However, as we are using the same file names, there is no need to change anything here.

Notes:

While mm610x-spi contains all the GPIO...

openwrt morse build mm6108 using wm6108

Related Articles