Changes between Version 50 and Version 51 of wireless/wifi

03/30/2020 09:56:42 PM (4 years ago)
Cale Collins

added mesh section


  • wireless/wifi

    v50 v51  
    578578  - git git:// (cgit:
     581= Mesh Network =
     582== What is mesh
     583A 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.
     587== Getting started with mesh ==
     588Unfortunately 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.
     590Select 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:
     596This can be verified in Linux userspace with the command:
     598zcat /proc/config.gz |grep mesh -i
     601During testing attach antennas or attenuators depending on the proximity of the radios.  Without a strong clean signal the network may behave unpredictably. 
     603=== Configuring your BSP ===
     605Beyond the aforementioned steps providing anything more than general pointers would be impractical. There are may 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. 
     607Some circumstance will require testing multiple firmware versions.  Ath10k firmware can be downloaded from this repository:
     611The version of the current firmware being used can be verified by checking dmesg.
     613dmesg |grep ath -i
     617[   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
     620Depending 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.
     622To enable raw mode: 
     624setenv bootargs "${bootargs} ath10k_core.rawmode=1"
     626This option can also be enabled in the bootscript.  On Newport make changes to "newport.env".   
     628Check that your wireless interface is available:
     630ls /sys/class/net/
     633Check mesh point is an available network type:
     635iw list |grep "mesh point"
     637If these two items are present proceed with bringing up with mesh interface.
     639=== Bringing up the mesh network interface using "iw" ===
     644Create a mesh point interface “mesh0”.
     646iw phy phy0 interface add mesh0 type mp
     648Confirm the creation of the new interface.
     650iw mesh0 info
     651Interface mesh0
     652        type mesh point
     654Configure channel information, all radios on the networking must be configured to use the same frequency.
     656iw dev mesh0 set freq 5745 80 5775
     659Optionally, the interface’s MAC address can be set.
     661ifconfig mesh0 hw ether 00:11:22:33:44:56
     664Assign a static IP and bring up the interface.
     666ifconfig mesh0
     669Join a network. “mesh-ath10k” is the mesh ID which can be maximum of 32 bytes long.
     671iw dev mesh0 mesh join mesh-ath10k
     674Verify link status, this command will not return anything unless there are minimum two peers on the network. 
     676iw mesh0 station dump
     679=== Bringing up the mesh network interface using "wpa_supplicant" ===
     681Some firmware will require compiling wpa_supplicant from source.
     683Download the source code from this address:
     687Install required packages:
     689apt-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
     691Extract the .tar and create a .config:
     693tar -xvf wpa_supplicant-2.9.tar.gz
     694cd wpa_supplicant-2.9/wpa_supplicant/
     695cp defconfig .config
     698Use "vi" to edit the .config file, make sure CONFIG_MESH is not commented out and verify it is enabled:
     703Build wpa_supplicant:
     705make all & make install
     707* 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.
     708Verify that wpa_supplicant is the desired version:
     710wpa_supplicant -v
     712Create an /etc/wpa_supplicant.conf file with the following contents:
     717        ssid="Mesh0"
     718        mode=5
     719        frequency=2442
     720        key_mgmt=NONE
     722Create a mesh point interface “mesh0”:
     724iw phy phy0 interface add mesh0 type mp
     726Optinally set the interface’s MAC address:
     728ifconfig mesh0 hw ether 00:11:22:33:44:56
     730Assign a static IP and bring up the interface.
     732ifconfig mesh0
     734Verify wpa_supplicant is not already running, if so kill the PID:
     736ps -ef |grep wpa
     737kill -9 <PID>
     739Launch wpa_supplicant, run in the background.
     741wpa_supplicant -Dnl80211 -imesh0 -c /etc/wpa_supplicant.conf -B $
     743Check that two peers are connected:
     745iw mesh0 station dump
     747=== Pre-built image ===
     748Gateworks does not offer an official pre-built image for mesh networking.  The .img.gz that was used for testing with Newport is linked below.   
     753= Drivers =
    581755== Linux Kernel Drivers ==