802.11s mesh networking with Beaglebone Black

Hello all,

I am trying to setup a 802.11s mesh network using Beaglebone Black devices and TP-Link TL-WN722N wireless adapter. Debian image I am using is Debian 7.8 Wheezy and linux version is 3.8.13-bone79. I installed the required files (firmware and driver) for wireless adapter’s chipset and when I started typing commands for mesh, I got the following error:

$sudo iw dev wlan0 interface add mesh type mp

command failed: Operation not supported (-95)

Then, I checked the kernel configuration to see if mesh is enabled or not and I saw that all MAC80211 configurations related with mesh networking is enabled. Then I ran the iw list command to see if mesh point mode is supported or not, output can be found below:

$iw list

Wiphy phy0
Band 1:
Capabilities: 0x116e
HT20/HT40
SM Power Save disabled
RX HT20 SGI
RX HT40 SGI
RX STBC 1-stream
Max AMSDU length: 3839 bytes
DSSS/CCK HT40
Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
Minimum RX AMPDU time spacing: 8 usec (0x06)
HT TX/RX MCS rate indexes supported: 0-7
Frequencies:

  • 2412 MHz [1] (20.0 dBm)
  • 2417 MHz [2] (20.0 dBm)
  • 2422 MHz [3] (20.0 dBm)
  • 2427 MHz [4] (20.0 dBm)
  • 2432 MHz [5] (20.0 dBm)
  • 2437 MHz [6] (20.0 dBm)
  • 2442 MHz [7] (20.0 dBm)
  • 2447 MHz [8] (20.0 dBm)
  • 2452 MHz [9] (20.0 dBm)
  • 2457 MHz [10] (20.0 dBm)
  • 2462 MHz [11] (20.0 dBm)
  • 2467 MHz [12] (20.0 dBm)
  • 2472 MHz [13] (20.0 dBm)
  • 2484 MHz [14] (disabled)
    Bitrates (non-HT):
  • 1.0 Mbps
  • 2.0 Mbps (short preamble supported)
  • 5.5 Mbps (short preamble supported)
  • 11.0 Mbps (short preamble supported)
  • 6.0 Mbps
  • 9.0 Mbps
  • 12.0 Mbps
  • 18.0 Mbps
  • 24.0 Mbps
  • 36.0 Mbps
  • 48.0 Mbps
  • 54.0 Mbps
    max # scan SSIDs: 4
    max scan IEs length: 2257 bytes
    Coverage class: 0 (up to 0m)
    Supported Ciphers:
  • WEP40 (00-0f-ac:1)
  • WEP104 (00-0f-ac:5)
  • TKIP (00-0f-ac:2)
  • CCMP (00-0f-ac:4)
    Available Antennas: TX 0 RX 0
    Supported interface modes:
  • IBSS
  • managed
  • AP
  • AP/VLAN
  • monitor
  • P2P-client
  • P2P-GO
    software interface modes (can always be added):
  • AP/VLAN
  • monitor
    valid interface combinations:
  • #{ managed, P2P-client } <= 2, #{ AP, P2P-GO } <= 2,
    total <= 2, #channels <= 1
    Supported commands:
  • new_interface
  • set_interface
  • new_key
  • new_beacon
  • new_station
  • new_mpath
  • set_mesh_params
  • set_bss
  • authenticate
  • associate
  • deauthenticate
  • disassociate
  • join_ibss
  • join_mesh
  • remain_on_channel
  • set_tx_bitrate_mask
  • action
  • frame_wait_cancel
  • set_wiphy_netns
  • set_channel
  • set_wds_peer
  • Unknown command (84)
  • Unknown command (87)
  • Unknown command (85)
  • Unknown command (89)
  • Unknown command (92)
  • connect
  • disconnect
    Supported TX frame types:
  • IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
  • Unknown mode (10): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
    Supported RX frame types:
  • IBSS: 0x40 0xb0 0xc0 0xd0
  • managed: 0x40 0xd0
  • AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
  • AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
  • mesh point: 0xb0 0xc0 0xd0
  • P2P-client: 0x40 0xd0
  • P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
  • Unknown mode (10): 0x40 0xd0
    Device supports RSN-IBSS.
    HT Capability overrides:
  • MCS: ff ff ff ff ff ff ff ff ff ff
  • maximum A-MSDU length
  • supported channel width
  • short GI for 40 MHz
  • max A-MPDU length exponent
  • min MPDU start spacing
    Device supports TX status socket option.
    Device supports HT-IBSS.

After seeing that mesh point mode isn’t available, I tried different methods to solve the problem. First, I tried the adapter in another linux system and saw that at that system, mesh point is supported, so I thought the problem is on the kernel or image I am using. I did some updates and changes but I still couldn’t solve the problem. What am I missing here? How can I make my beaglebone system to support mesh point?

Thanks for your help.

Utku Ozgur

After seeing that mesh point mode isn’t available, I tried different methods to solve the problem. First, I tried the adapter in another linux system and saw that at that system, mesh point is supported, so I thought the problem is on the kernel or image I am using. I did some updates and changes but I still couldn’t solve the problem. What am I missing here? How can I make my beaglebone system to support mesh point?

Thanks for your help.

Define “another linux system”. Kernel, distro, and distro version.

It also may be worth checking iw versions between the working on and non working systems.

802.11s is not supported by all wireless NICs. You should check your hardware and http://linuxwireless.org/en/users/Drivers/. You may try batman-adv for HW independent mesh.

On Jan 23, 2016,07:29,William Hermans <yyrkoon@gmail.com> Wrote:

802.11s is not supported by all wireless NICs. You should check your hardware and http://linuxwireless.org/en/users/Drivers/. You may try batman-adv for HW independent mesh.

I do not doubt that is correct. However, the original poster already stated that the same device worked fine on another Linux system.

I believe that the problem is that your kernel’s ath9k driver does not include complete support 802.11s. Later kernels do support the required driver functionality. You can see this from the iw output in that “mesh point” is not a supported interface mode:

Supported interface modes:

  • IBSS
  • managed
  • AP
  • AP/VLAN
  • monitor
  • P2P-client
  • P2P-GO

Note the abscense of “mesh point” in this output.

Here is the output from my system (/etc/dogtag: BeagleBoard.org Debian Image 2016-01-17; uname -r: 4.1.15-ti-rt-r41)

Supported interface modes:

  • IBSS
  • managed
  • AP
  • AP/VLAN
  • monitor
  • mesh point
  • P2P-client
  • P2P-GO

I would highly recommend updating to a recent Debian 8.x image and a 4.1.x kernel. IIRC, anything older than 3.19 didn’t work too well with mesh mode. I have not tried with 4.1.x but I would expect that it should work fine.

ba
debian@bbb2:~$
ba

Just so it’s understood. You do not need to install a new rootfs image in order to install, and use a newer kernel. In other words, I’m personally using Wheezy 7.8, and a 4.1.x kernel.

In order to achieve this, all I did was download, and dd the 7.8 Wheezy console image, and then:

apt-get update

apt-cache search linux-image | grep 4

And then pick a suitable kernel

Additionally though one would also have to follow similar instructions to these in order to get updated device tree files, and compiler setup. http://www.embeddedhobbyist.com/2015/09/beaglebone-black-updating-device-tree-files/

Just so it’s understood. You do not need to install a new rootfs image in order to install, and use a newer kernel. In other words, I’m personally using Wheezy 7.8, and a 4.1.x kernel.

Of course. Just thinking that if there wasn’t any other reason to stay on Wheezy, it would be a good thing to upgrade to a recent Jessie image and get support for the latest tools that are available there (e.g. iw, ip). Latest versions of these tools are unlikely to have been backported to Wheezy. I do know that older versions of iw did not properly support mesh points.

One other thing, if your image is running connman, you will want to make sure it doesn’t interfere (try to manage) any interfaces you create. I typically create my mesh points on “mp0”, so I have a /etc/connman/main.conf something like the following to ensure that connman ignores mp0 (actually ignores any mpX interface):

Place this file in /etc/connman/main.conf

[General]

Don’t manage mesh point interfaces of the form “mpx”…

NetworkInterfaceBlacklist=mp

ba

Thanks William and Brian for your help.

Mesh point is added to the supported interface modes list and worked without problem after changing the kernel from 3.8 to 4.1.

Utku

I’m trying to get 802.11s mesh networking running on the “beaglebone green wireless (AM335x)” by the step on WL18xx System Build Scripts (processors.wiki.ti.com/…/WL18xx_System_Build_Scripts)..)

I will use the 802.11s on “beaglebone green wireless (AM335x)”. But I tried the steps on the desktop pc (64 bits) with Ubuntu 14.04.5 LTS. Kernel version is 4.4.0-72-generic

  1. First, I downloaded “ti-processor-sdk-linux-am335x-evm-03.02.00.05” to follow the setting steps in the webside, but it didn’t work.

After “./build_wl18xx.sh update R8.7”, the console appeared “your kernel headers are incompletee/not installed” . (Please refer the next picture.)

I tried to use the command "apt-get install build-essential linux-headers-$(uname -r) ", but it did not work.

  1. Then I download “ti-sdk-am335x-evm-07.00.00.00-Linux-x86” to follow the setting steps.

After “./build_wl18xx.sh update R8.7”, the console appeared

“Kernel configuration is invalid. include/generated/autoconf.h or include/config/auto.conf are missing.”(Please refer the next picture.)

I tried to use the command " sudo apt-get install autoconf", but it did not work.

Should I use “ti-processor-sdk-linux-am335x-evm-03.02.00.05” or “ti-sdk-am335x-evm-07.00.00.00-Linux-x86”?

And how can I fix the problems to get 802.11s mesh networking running on the “beaglebone green wireless (AM335x)” ?

Hi Utku,

very interesting project, have you tried to use mesh supported wifi adapters?

for the kernel, you will need kernel + modules + firmware all installed.