Changes between Version 53 and Version 54 of wireless/wifi


Ignore:
Timestamp:
03/30/2020 10:31:34 PM (2 years ago)
Author:
Cale Collins
Comment:

removed and moved mesh point page.

Legend:

Unmodified
Added
Removed
Modified
  • wireless/wifi

    v53 v54  
    578578  - git git://w1.fi/srv/git/hostap.git (cgit: http://hostap.epitest.fi/cgit/hostap/)
    579579
    580 [=#mesh]
    581 = Mesh Network =
    582 == What is mesh
    583 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.
    584 
    585 https://en.wikipedia.org/wiki/Mesh_networking
    586 
    587 == Getting started with mesh ==
    588 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 [https://shop.gateworks.com/ 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.
    589 
    590 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:
    591 
    592 CONFIG_MAC80211_MESH=y
    593 
    594 CONFIG_LIBERTAS_MESH=y
    595 
    596 This can be verified in Linux userspace with the command:
    597 {{{#!bash
    598 zcat /proc/config.gz |grep mesh -i
    599 }}}
    600 
    601 During testing attach antennas or attenuators depending on the proximity of the radios.  Without a strong clean signal the network may behave unpredictably. 
    602 
    603 === Configuring your BSP ===
    604 
    605 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. 
    606 
    607 Some circumstances will require testing multiple firmware versions.  Ath10k firmware can be downloaded from this repository:
    608 
    609 https://github.com/kvalo/ath10k-firmware
    610 
    611 The version of the current firmware being used can be verified by checking dmesg.
    612 {{{#!bash
    613 dmesg |grep ath -i
    614 }}}
    615 Example:
    616 {{{
    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
    618 }}}
    619 
    620 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.
    621 
    622 To enable raw mode: 
    623 {{{#!bash
    624 setenv bootargs "${bootargs} ath10k_core.rawmode=1"
    625 }}}
    626 This option can also be enabled in the bootscript.  On Newport make changes to "newport.env".   
    627 
    628 Check that your wireless interface is available:
    629 {{{#!bash
    630 ls /sys/class/net/
    631 }}}
    632 
    633 Check mesh point is an available network type:
    634 {{{#!bash
    635 iw list |grep "mesh point"
    636 }}}
    637 If these two items are present proceed with bringing up the mesh interface.
    638 
    639 === Bringing up the mesh network interface using "iw" ===
    640 
    641 Reference:
    642 * https://wireless.wiki.kernel.org/en/users/drivers/ath10k/mesh
    643 
    644 Create a mesh point interface “mesh0”.
    645 {{{#!bash
    646 iw phy phy0 interface add mesh0 type mp
    647 }}}
    648 Confirm the creation of the new interface.
    649 {{{#!bash
    650 iw mesh0 info
    651 Interface mesh0
    652         type mesh point
    653 }}}
    654 Configure channel information, all radios on the networking must be configured to use the same frequency.
    655 {{{#!bash
    656 iw dev mesh0 set freq 5745 80 5775
    657 }}}
    658 
    659 Optionally, the interface’s MAC address can be set.
    660 {{{#!bash
    661 ifconfig mesh0 hw ether 00:11:22:33:44:56
    662 }}}
    663 
    664 Assign a static IP and bring up the interface.
    665 {{{#!bash
    666 ifconfig mesh0 192.168.1.10
    667 }}}
    668 
    669 Join a network. “mesh-ath10k” is the mesh ID which can be maximum of 32 bytes long.
    670 {{{#!bash
    671 iw dev mesh0 mesh join mesh-ath10k
    672 }}}
    673 
    674 Verify link status, this command will not return anything unless there are minimum two peers on the network. 
    675 {{{#!bash
    676 iw mesh0 station dump
    677 }}}
    678 
    679 === Bringing up the mesh network interface using "wpa_supplicant" ===
    680 
    681 Some firmware will require compiling wpa_supplicant from source.
    682 
    683 Download the source code from this address:
    684 
    685 http://www.linuxfromscratch.org/blfs/view/svn/basicnet/wpa_supplicant.html
    686 
    687 Install required packages:
    688 {{{#!bash
    689 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
    690 }}}
    691 Extract the .tar and create a .config:
    692 {{{#!bash
    693 tar -xvf wpa_supplicant-2.9.tar.gz
    694 cd wpa_supplicant-2.9/wpa_supplicant/
    695 cp defconfig .config
    696 }}}
    697 
    698 Use "vi" to edit the .config file, make sure CONFIG_MESH is not commented out and verify it is enabled:
    699 {{{
    700 CONFIG_MESH=y
    701 }}}
    702 
    703 Build wpa_supplicant:
    704 {{{#!bash
    705 make all & make install
    706 }}}
    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.
    708 Verify that wpa_supplicant is the desired version:
    709 {{{#!bash
    710 wpa_supplicant -v
    711 }}}     
    712 Create an /etc/wpa_supplicant.conf file with the following contents:
    713 {{{
    714 ctrl_interface=/var/run/wpa_supplicant
    715 user_mpm=1
    716 network={
    717         ssid="Mesh0"
    718         mode=5
    719         frequency=2442
    720         key_mgmt=NONE
    721 }}}
    722 Create a mesh point interface “mesh0”:
    723 {{{#!bash
    724 iw phy phy0 interface add mesh0 type mp
    725 }}}
    726 Optinally set the interface’s MAC address:
    727 {{{#!bash
    728 ifconfig mesh0 hw ether 00:11:22:33:44:56
    729 }}}
    730 Assign a static IP and bring up the interface.
    731 {{{#!bash
    732 ifconfig mesh0 192.168.1.10
    733 }}}
    734 Verify wpa_supplicant is not already running, if so kill the PID:
    735 {{{#!bash
    736 ps -ef |grep wpa
    737 kill -9 <PID>
    738 }}}
    739 Launch wpa_supplicant, run in the background.
    740 {{{#!bash
    741 wpa_supplicant -Dnl80211 -imesh0 -c /etc/wpa_supplicant.conf -B $
    742 }}}
    743 Check that two peers are connected:
    744 {{{#!bash
    745 iw mesh0 station dump
    746 }}}
    747 === Pre-built image ===
    748 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.   
    749 
    750 http://dev.gateworks.com/fae/mesh-newpor54.img.gz
    751 
    752 
    753 = Drivers =
     580= Mesh Point =
     581
     582To read more about mesh see our dedicated [wiki:/wireless/wifi/mesh mesh page].
     583
    754584[=#drivers]
    755585== Linux Kernel Drivers ==