Version 7 (modified by Cale Collins, 4 years ago) ( diff )

typo fix


Mesh Network

Nmap topo

This screenshot was generated using Zenmap. Nmap ping scan was ran on a Gateworks board with two peers connected via mesh, scan output was then exported to a desktop PC in .xml format.

What is mesh

A mesh network is a local network topology in which nodes connect dynamically without a hierarchy. Data transfer will follow the most efficient path between clients. This technology is applicable in many different industries, such as transportation, defense, and energy sectors.

Getting started with mesh

Unfortunately, there's not an all purpose approach for how a mesh network should be configured. It will require research to decide what hardware and software configuration will fit your needs closest. The first thing to consider is what radio to use, not all radios support mesh and some that do will require specific kernel versions or firmware to accomplish this. The best source of information will be the radio manufacturer — something to consider when selecting a radio is the level of support that will be available. Linux kernel mailing lists should be used as a primary resource if you suspect there's an issue with the driver, kernel, or radio firmware. WLE900VX is an excellent choice of radio and is available from the Gateworks store. This radio has been tested to work with 4.14, 4.20, and 5.4 kernels. A second radio which has been tested by Gateworks is the WPEQ-261ACNI(BT), this card is half length and includes bluetooth. According to the manufacturer this card will only mesh in kernel versions 5.3 and newer, and only when using a custom built wpa_supplicant. When creating a mesh network not all radios need to be the same model, we have tested creating a mesh network using a combination of these two radio models successfully.

Select a BSP that is appropriate for your application. In our testing the Bionic Ubuntu root filesystem was used with both Newport and Ventana family boards. OpenWRT and Buildroot are viable options as well. Enabling the necessary kernel modules will be required, though you may find in Gateworks kernel defconfigs these options have already been added. In our testing the following kernel config options were enabled:



This can be verified in Linux userspace with the command:

zcat /proc/config.gz |grep mesh -i

During testing attach antennas or attenuators depending on the proximity of the radios. Without a strong clean signal the network may behave unpredictably.

Configuring your BSP

Beyond the aforementioned steps providing anything more than general pointers would be impractical. There are many variables in how hardware can behave, what works in one case will cause a different configuration to fail. The following guidance is intended for those using Ath10k radios.

Some circumstances will require testing multiple firmware versions. Ath10k firmware can be downloaded from this repository:

The version of the current firmware being used can be verified by checking dmesg.

dmesg |grep ath -i 


[   16.699066] ath10k_pci 0000:07:00.0: firmware ver 10.2.4-1.0-00037 api 5 features no-p2p,raw-mode,mfp,allows-mesh-bcast crc32 a4a52adb

Depending on the firmware version you may be required to use a module parameter for rawmode. In some situations using rawmode will cause the interface to not appear, it is best to test without this option enabled first. When configuring the network you may receive a message informing you that it is required.

To enable raw mode:

setenv bootargs "${bootargs} ath10k_core.rawmode=1"

This option can also be enabled in the bootscript. On Newport make changes to "newport.env".

Check that your wireless interface is available:

ls /sys/class/net/

Check mesh point is an available network type:

iw list |grep "mesh point"

If these two items are present proceed with bringing up the mesh interface.

Bringing up the mesh network interface using "iw"


Create a mesh point interface “mesh0”.

iw phy phy0 interface add mesh0 type mp

Confirm the creation of the new interface.

iw mesh0 info
Interface mesh0
        type mesh point

Configure channel information, all radios on the network must be configured to use the same frequency.

iw dev mesh0 set freq 5745 80 5775

Optionally, the interface’s MAC address can be set.

ifconfig mesh0 hw ether 00:11:22:33:44:56

Assign a static IP and bring up the interface.

ifconfig mesh0

Join a network. “mesh-ath10k” is the mesh ID which can be maximum of 32 bytes long.

iw dev mesh0 mesh join mesh-ath10k

Verify link status, this command will not return anything unless there are minimum two peers on the network.

iw mesh0 station dump

Bringing up the mesh network interface using "wpa_supplicant"

Some firmware will require compiling wpa_supplicant from source.

Download the source code from this address:

Install required packages:

apt-get install libssl-dev dbus libdbus-1-dev libdbus-glib-1-2 libdbus-glib-1-dev libnl-3-dev libnl-genl-3-dev build-essential -y

Extract the .tar and create a .config:

tar -xvf wpa_supplicant-2.9.tar.gz
cd wpa_supplicant-2.9/wpa_supplicant/
cp defconfig .config

Use "vi" to edit the .config file, make sure CONFIG_MESH is not commented out and verify it is enabled:


Build wpa_supplicant:

make all & make install
  • Optional - execute the command "which wpa_supplicant" to locate the file that is currently in your $PATH and replace it with the one you have freshly built.

Verify that wpa_supplicant is the desired version:

wpa_supplicant -v 

Create an /etc/wpa_supplicant.conf file with the following contents:


Create a mesh point interface “mesh0”:

iw phy phy0 interface add mesh0 type mp

Optinally set the interface’s MAC address:

ifconfig mesh0 hw ether 00:11:22:33:44:56

Assign a static IP and bring up the interface.

ifconfig mesh0

Verify wpa_supplicant is not already running, if so kill the PID:

ps -ef |grep wpa 
kill -9 <PID>

Launch wpa_supplicant, run in the background.

wpa_supplicant -Dnl80211 -imesh0 -c /etc/wpa_supplicant.conf -B $

Check that two peers are connected:

iw mesh0 station dump

Pre-built image

Gateworks does not offer an official pre-built image for mesh networking. The .img.gz that was used for testing with Newport is linked below.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.