Changes between Version 7 and Version 8 of expansion/gw16167


Ignore:
Timestamp:
01/15/2026 11:29:48 PM (85 minutes ago)
Author:
Tim Harvey
Comment:

updated software details

Legend:

Unmodified
Added
Removed
Modified
  • expansion/gw16167

    v7 v8  
    66The GW16167 M.2 E-Key Sub-1GHz 802.11ah radio uses the second-generation !MorseMicro MM8108 chip which offers improvements in range and throughput (up to 43.33Mbps) over the first generation MM6108.
    77
    8 '''NOTE: The GW16167 requires an M.2 E-Key socket with USB 2.0. This may require an adapter for the Venice SBCs'''
     8'''NOTE: The GW16167 requires an M.2 E-Key socket with USB 2.0. This may require an adapter for the Venice SBCs such as the [https://trac.gateworks.com/wiki/expansion/gw1614xminipciem2adapter#GW16151E-Key-USB2.0PCIe GW16151]'''
    99
    1010
     
    100100
    101101Building with the Gateworks Venice BSP:
    102  * coming soon
     102Building with the Gateworks Venice BSP:
     103  1. Add a 'custom_kernel_mm6108' script
     104{{{#!bash
     105cat <<\EOF > custom_kernel_mm6108
     106#!/bin/bash -e
     107
     108DIR=$PWD/mm610x
     109OUTDIR=$DIR/out
     110DESTDIR=$2
     111
     112MORSE_VER=1.16.4
     113LIBNL_VER=libnl3_11_0
     114OPENSSL_VER=openssl-3.5.0
     115LIBUSB_VER=v1.0.28
     116COUNTRY=US
     117mkdir -p $DESTDIR/usr/sbin
     118mkdir -p $DESTDIR/etc/modprobe.d
     119mkdir -p $DIR
     120cd $DIR
     121
     122# get repos of what we will build
     123[ -d morse_driver ] || git clone --recurse-submodules https://github.com/Gateworks/morse_driver.git -b 1.16.4-gateworks
     124[ -d morse-firmware ] || git clone https://github.com/MorseMicro/morse-firmware.git -b 1.16
     125[ -d libnl ] || git clone https://github.com/thom311/libnl.git -b $LIBNL_VER
     126[ -d openssl ] || git clone https://github.com/openssl/openssl.git -b $OPENSSL_VER
     127[ -d hostap ] || git clone https://github.com/MorseMicro/hostap.git -b $MORSE_VER
     128[ -d morse_cli ] || git clone https://github.com/MorseMicro/morse_cli.git -b $MORSE_VER
     129[ -d libusb ] || git clone https://github.com/libusb/libusb.git -b $LIBUSB_VER
     130
     131echo "Building morse_driver..."
     132ARGS="KERNEL_SRC=$1 \
     133        CONFIG_MORSE_SDIO=y \
     134        CONFIG_MORSE_USB=y \
     135        CONFIG_MORSE_USER_ACCESS=y \
     136        CONFIG_MORSE_VENDOR_COMMAND=y \
     137        CONFIG_MORSE_SDIO_ALIGNMENT=4 \
     138        CONFIG_MORSE_POWERSAVE_MODE=0 \
     139        CONFIG_MORSE_COUNTRY=$COUNTRY \
     140        CONFIG_MORSE_RC=y \
     141        CONFIG_MORSE_MONITOR=y \
     142        CONFIG_MORSE_DEBUGFS=y \
     143        CONFIG_WLAN_VENDOR_MORSE=m"
     144make -C morse_driver $ARGS
     145make -C morse_driver $ARGS INSTALL_MOD_PATH=$2 modules_install
     146
     147# firmware:
     148#  - mm610x firmware
     149#  - board configuration file (BCF) that provides driver with calibration constants and chip gpio config
     150echo "Copying firmware..."
     151mkdir -p $2/lib/firmware/morse
     152# GW16159 sdmah/sdio/mm6108
     153cp morse-firmware/firmware/mm6108.bin $2/lib/firmware/morse
     154wget http://dev.gateworks.com/firmware/gw16159/$MORSE_VER/LICENSE -O $2/lib/firmware/morse/LICENSE
     155wget "http://dev.gateworks.com/firmware/gw16159/$MORSE_VER/bcf_default.bin" -O $2/lib/firmware/morse/bcf_default.bin
     156# GW16167 mm8108/usb
     157cp morse-firmware/firmware/mm8108b2-rl.bin $2/lib/firmware/morse
     158cp -P morse-firmware/bcf/morsemicro/* $2/lib/firmware/morse
     159
     160[ -d $OUTDIR/include/libnl3 ] || {
     161        echo "Building libnl..."
     162        cd libnl
     163        ./autogen.sh
     164        ./configure --host=$ARCH CC=${CROSS_COMPILE}gcc --prefix=$OUTDIR --disable-shared
     165        make clean
     166        make -j$(nproc)
     167        make install
     168        cd ..
     169}
     170
     171[ -d $OUTDIR/include/openssl ] || {
     172        echo "Building openssl..."
     173        cd openssl
     174        ./Configure linux-generic32 no-shared no-dso no-async -DL_ENDIAN --prefix=$OUTDIR --openssldir=$OUTDIR
     175        # needed no-async to build latest openssl against uclib
     176        make -j$(nproc) \
     177                CC=${CROSS_COMPILE}gcc \
     178                RANLIB=${CROSS_COMPILE}ranlib \
     179                LD=${CROSS_COMPILE}ld \
     180                MAKEDEPPROG=${CROSS_COMPILE}gcc \
     181                PROCESSOR=ARM
     182        #make install # installs man pages too
     183        make install_sw
     184        cd ..
     185}
     186
     187# libusb
     188[ -d $OUTDIR/include/libusb ] || {
     189        echo "Building libusb..."
     190        cd libusb
     191        ./autogen.sh --disable-udev
     192        ./configure --host=$ARCH CC=${CROSS_COMPILE}gcc --prefix=$OUTDIR --disable-shared --enable-examples-build --disable-log --disable-udev
     193        make -j$(nproc) \
     194                CFLAGS="-Wunused-parameter" \
     195                CC=${CROSS_COMPILE}gcc \
     196                RANLIB=${CROSS_COMPILE}ranlib \
     197                LD=${CROSS_COMPILE}ld \
     198                MAKEDEPPROG=${CROSS_COMPILE}gcc \
     199                PROCESSOR=ARM
     200        make install
     201        cd ..
     202}
     203
     204# wpa_supplicant
     205[ -r hostap/wpa_supplicant/wpa_supplicant_s1g ] || {
     206        echo "Building wpa_supplicant_s1g..."
     207        cp hostap/wpa_supplicant/defconfig hostap/wpa_supplicant/.config
     208        disables="CONFIG_BGSCAN_SIMPLE"
     209        enables="CONFIG_DRIVER_NL80211_QCA \
     210                CONFIG_WPS_NFC CONFIG_SAE_PK \
     211                CONFIG_EAP_MD5 \
     212                CONFIG_EAP_MSCHAPV2 \
     213                CONFIG_EAP_TLS \
     214                CONFIG_EAP_TLSV1_3 \
     215                CONFIG_EAP_PEAP \
     216                CONFIG_EAP_TTLS \
     217                CONFIG_EAP_GTC \
     218                CONFIG_EAP_PWD \
     219                CONFIG_WPS_ER \
     220                CONFIG_WPS_REG_DISABLE_OPEN \
     221                CONFIG_WPS_NFC \
     222                CONFIG_SAE_PK \
     223                CONFIG_DEBUG_SYSLOG_FACILITY \
     224                CONFIG_MESH \
     225                CONFIG_BGSCAN_SIMPLE \
     226                "
     227        for opt in $enables; do
     228                sed -i -e "s/^#$opt=y/$opt=y/" hostap/wpa_supplicant/.config
     229        done
     230        for opt in $disables; do
     231                sed -i -e "s/^$opt=y/#$opt=y/" hostap/wpa_supplicant/.config
     232        done
     233        make -C hostap/wpa_supplicant/ clean
     234        PKG_CONFIG_PATH="$OUTDIR/lib/pkgconfig" \
     235        CFLAGS="-D_GNU_SOURCE -I $OUTDIR/include/libnl3 -I $OUTDIR/include -Wno-deprecated-declarations" \
     236        LDFLAGS="-L $OUTDIR/lib/ --static" \
     237        DESTDIR="$OUTDIR/sbin" \
     238        BINDIR=/usr/sbin \
     239        LIBS="-lnl-3 -lm -lpthread -lcrypto -lssl" \
     240        CC=${CROSS_COMPILE}gcc \
     241                make -j$(nproc) -C hostap/wpa_supplicant/
     242}
     243cp hostap/wpa_supplicant/{wpa_supplicant_s1g,wpa_cli_s1g,wpa_passphrase_s1g} $DESTDIR/usr/sbin/
     244
     245# hostapd
     246[ -r hostap/hostapd/hostapd_s1g ] || {
     247        echo "Building hostapd_s1g..."
     248        cp hostap/hostapd/defconfig hostap/hostapd/.config
     249        disables=""
     250        enables="CONFIG_DRIVER_NL80211_QCA \
     251                CONFIG_EAP \
     252                CONFIG_EAP_MD5 \
     253                CONFIG_EAP_EKE \
     254                CONFIG_EAP_MSCHAPV2 \
     255                CONFIG_EAP_PEAP \
     256                CONFIG_EAP_TLS \
     257                CONFIG_EAP_TTLS \
     258                CONFIG_EAP_GTC \
     259                CONFIG_EAP_SIM \
     260                CONFIG_EAP_AKA \
     261                CONFIG_EAP_AKA_PRIME \
     262                CONFIG_EAP_PAX \
     263                CONFIG_EAP_PSK \
     264                CONFIG_EAP_PWD \
     265                CONFIG_EAP_SAKE \
     266                CONFIG_EAP_GPSK \
     267                CONFIG_EAP_GPSK_SHA256 \
     268                CONFIG_EAP_FAST \
     269                CONFIG_EAP_TEAP \
     270                CONFIG_WPS \
     271                CONFIG_WPS_UPNP \
     272                CONFIG_WPS_NFC \
     273                CONFIG_EAP_IKEV2 \
     274                CONFIG_EAP_TNC \
     275                CONFIG_RADIUS_SERVER \
     276                CONFIG_SAE \
     277                CONFIG_SAE_PK \
     278                CONFIG_TLSV11 \
     279                CONFIG_TLSV12 \
     280                "
     281        for opt in $enables; do
     282                sed -i -e "s/^#$opt=y/$opt=y/" hostap/hostapd/.config
     283        done
     284        for opt in $disables; do
     285                sed -i -e "s/^$opt=y/#$opt=y/" hostap/hostapd/.config
     286        done
     287        make -C hostap/hostapd/ clean
     288        PKG_CONFIG_PATH="$OUTDIR/lib/pkgconfig" \
     289        CFLAGS="-D_GNU_SOURCE -I $OUTDIR/include/libnl3 -I $OUTDIR/include -Wno-deprecated-declarations" \
     290        LDFLAGS="-L $OUTDIR/lib/ --static" \
     291        DESTDIR="$OUTDIR/sbin" \
     292        BINDIR=/usr/sbin \
     293        LIBS="-lnl-3 -lm -lpthread -lcrypto -lssl" \
     294        CC=${CROSS_COMPILE}gcc \
     295                make -j$(nproc) -C hostap/hostapd/
     296}
     297cp hostap/hostapd/{hostapd_s1g,hostapd_cli_s1g} $DESTDIR/usr/sbin/
     298
     299# morse_cli
     300[ -r morse_cli/morse_cli.bin ] || {
     301        echo "Building morse_cli..."
     302        make -C morse_cli clean
     303        PKG_CONFIG_PATH="$OUTDIR/lib/pkgconfig" \
     304        CFLAGS="-I $OUTDIR/include/libnl3 -I $OUTDIR/include/libusb-1.0 -I $OUTDIR/include" \
     305        LDFLAGS="-L $OUTDIR/lib/ --static" \
     306        CC=${CROSS_COMPILE}gcc \
     307        make \
     308                CONFIG_MORSE_TRANS_NL80211=1 \
     309                CONFIG_MORSE_STATIC=1 \
     310                -j$(nproc) -C morse_cli
     311}
     312cp morse_cli/morse_cli $DESTDIR/usr/sbin/
     313
     314# module parameters
     315echo "options morse country=$COUNTRY enable_ext_xtal_init=1" > $DESTDIR/etc/modprobe.d/morse.conf
     316
     317EOF
     318chmod +x custom_kernel_mm6108
     319}}}
     320  3. rebuild the ubuntu-image:
     321{{{#!bash
     322source ./setup-environment
     323make ubuntu-image
     324}}}
     325
     326Module Parameters:
     327 - There are a number of module parameters supported by morse.ko however the required ones for the GW16159 are:
     328  * country=US
     329  * enable_ext_xtal_init=1
     330 - These can be placed in /etc/modprobe..d such as:
     331{{{#!bash
     332echo "options morse country=US enable_ext_xtal_init=1" > /etc/modprobe.d/morse.conf
     333}}}
     334
     335Kernel Messages:
     336{{{#!bash
     337# dmesg | grep mmc0
     338[    1.009160] mmc0: SDHCI controller on 30b40000.mmc [30b40000.mmc] using ADMA
     339[    1.029119] mmc_sdio_init_card mmc0 quirks=0x0 ocr_card=0x300000 (1.8v=1)
     340[    1.052784] mmc_sdio_init_card mmc0 setting voltage to 1.8V
     341[    1.166152] mmc0: new high speed SDIO card at address 0001
     342# cat /sys/bus/mmc/devices/mmc0:0001/{vendor,device)
     3430x325b
     3440x0306
     345# modprobe mac80211
     346# modprobe dot11ah
     347[    8.227402] Morse Micro Dot11ah driver registration. Version v1.16.4-gdec5bc215b88# modprobe morse country=US enable_ext_xtal_init=1
     348[    8.859749] morse micro driver registration. Version v1.16.4-gdec5bc215b88
     349[    8.869267] morse_sdio mmc0:0001:1: sdio new func 1 vendor 0x325b device 0x306 block 0x8/0x8
     350[    8.884404] morse_sdio mmc0:0001:2: sdio new func 2 vendor 0x325b device 0x306 block 0x200/0x200
     351[    8.884548] morse_sdio mmc0:0001:2: morse_of_probe: Device node not found
     352[    8.893804] morse_sdio mmc0:0001:2: morse_of_probe: No pin configs found
     353[    9.471810] morse_sdio mmc0:0001:2: Loaded firmware from morse/mm6108.bin, size 459124, crc32 0x51d355b9
     354[    9.473234] morse_sdio mmc0:0001:2: Loaded BCF from morse/bcf_default.bin, size 763, crc32 0xb9a1e2de
     355[    9.590998] morse_sdio mmc0:0001:2: morse_mac_init: WARNING enable_ps modparam must only be used for testing - use iw set power_save
     356[    9.613859] morse_sdio mmc0:0001:2: Driver loaded with kernel module parameters
     357[    9.613883] morse_sdio mmc0:0001:2:     slow_clock_mode                         : 0
     358[    9.613889] morse_sdio mmc0:0001:2:     enable_1mhz_probes                      : Y
     359[    9.613895] morse_sdio mmc0:0001:2:     enable_sched_scan                       : Y
     360[    9.613901] morse_sdio mmc0:0001:2:     enable_hw_scan                          : Y
     361[    9.613906] morse_sdio mmc0:0001:2:     enable_pv1                              : N
     362[    9.613912] morse_sdio mmc0:0001:2:     enable_page_slicing                     : N
     363[    9.613918] morse_sdio mmc0:0001:2:     log_modparams_on_boot                   : Y
     364[    9.613923] morse_sdio mmc0:0001:2:     enable_mcast_rate_control               : N
     365[    9.613929] morse_sdio mmc0:0001:2:     enable_mcast_whitelist                  : Y
     366[    9.613935] morse_sdio mmc0:0001:2:     ocs_type                                : 1
     367[    9.613941] morse_sdio mmc0:0001:2:     enable_wiphy                            : N
     368[    9.613946] morse_sdio mmc0:0001:2:     enable_auto_mpsw                        : Y
     369[    9.613953] morse_sdio mmc0:0001:2:     duty_cycle_probe_retry_threshold        : 2500
     370[    9.613958] morse_sdio mmc0:0001:2:     duty_cycle_mode                         : 0
     371[    9.613964] morse_sdio mmc0:0001:2:     enable_auto_duty_cycle                  : Y
     372[    9.613970] morse_sdio mmc0:0001:2:     dhcpc_lease_update_script               : /morse/scripts/dhcpc_update.sh
     373[    9.613976] morse_sdio mmc0:0001:2:     enable_ibss_probe_filtering             : Y
     374[    9.613982] morse_sdio mmc0:0001:2:     enable_dhcpc_offload                    : N
     375[    9.613987] morse_sdio mmc0:0001:2:     enable_arp_offload                      : N
     376[    9.613993] morse_sdio mmc0:0001:2:     enable_bcn_change_seq_monitor           : N
     377[    9.613998] morse_sdio mmc0:0001:2:     enable_cac                              : N
     378[    9.614004] morse_sdio mmc0:0001:2:     max_mc_frames                           : 10
     379[    9.614010] morse_sdio mmc0:0001:2:     tx_max_power_mbm                        : 2200
     380[    9.614016] morse_sdio mmc0:0001:2:     enable_twt                              : Y
     381[    9.614022] morse_sdio mmc0:0001:2:     enable_mac80211_connection_monitor      : N
     382[    9.614027] morse_sdio mmc0:0001:2:     enable_airtime_fairness                 : N
     383[    9.614033] morse_sdio mmc0:0001:2:     enable_raw                              : Y
     384[    9.614038] morse_sdio mmc0:0001:2:     max_aggregation_count                   : 0
     385[    9.614044] morse_sdio mmc0:0001:2:     max_rate_tries                          : 1
     386[    9.614049] morse_sdio mmc0:0001:2:     max_rates                               : 4
     387[    9.614055] morse_sdio mmc0:0001:2:     enable_watchdog_reset                   : N
     388[    9.614061] morse_sdio mmc0:0001:2:     watchdog_interval_secs                  : 30
     389[    9.614067] morse_sdio mmc0:0001:2:     enable_watchdog                         : Y
     390[    9.614073] morse_sdio mmc0:0001:2:     country                                 : US
     391[    9.614078] morse_sdio mmc0:0001:2:     enable_cts_to_self                      : N
     392[    9.614084] morse_sdio mmc0:0001:2:     enable_rts_8mhz                         : N
     393[    9.614089] morse_sdio mmc0:0001:2:     enable_trav_pilot                       : Y
     394[    9.614095] morse_sdio mmc0:0001:2:     enable_sgi_rc                           : Y
     395[    9.614100] morse_sdio mmc0:0001:2:     enable_mbssid_ie                        : N
     396[    9.614106] morse_sdio mmc0:0001:2:     virtual_sta_max                         : 0
     397[    9.614112] morse_sdio mmc0:0001:2:     thin_lmac                               : N
     398[    9.614117] morse_sdio mmc0:0001:2:     enable_dynamic_ps_offload               : Y
     399[    9.614123] morse_sdio mmc0:0001:2:     enable_ps                               : 0
     400[    9.614129] morse_sdio mmc0:0001:2:     enable_subbands                         : 2
     401[    9.614134] morse_sdio mmc0:0001:2:     enable_survey                           : Y
     402[    9.614140] morse_sdio mmc0:0001:2:     mcs10_mode                              : 0
     403[    9.614146] morse_sdio mmc0:0001:2:     mcs_mask                                : 1023
     404[    9.614152] morse_sdio mmc0:0001:2:     no_hwcrypt                              : N
     405[    9.614157] morse_sdio mmc0:0001:2:     enable_ext_xtal_init                    : Y
     406[    9.614163] morse_sdio mmc0:0001:2:     enable_otp_check                        : Y
     407[    9.614169] morse_sdio mmc0:0001:2:     bcf                                     :
     408[    9.614175] morse_sdio mmc0:0001:2:     serial                                  : default
     409[    9.614180] morse_sdio mmc0:0001:2:     debug_mask                              : 8
     410[    9.614187] morse_sdio mmc0:0001:2:     tx_status_lifetime_ms                   : 15000
     411[    9.614192] morse_sdio mmc0:0001:2:     tx_queued_lifetime_ms                   : 1000
     412[    9.614198] morse_sdio mmc0:0001:2:     max_txq_len                             : 32
     413[    9.614204] morse_sdio mmc0:0001:2:     default_cmd_timeout_ms                  : 600
     414[    9.614210] morse_sdio mmc0:0001:2:     reattach_hw                             : N
     415[    9.614216] morse_sdio mmc0:0001:2:     hw_reload_after_stop                    : 5
     416[    9.614222] morse_sdio mmc0:0001:2:     enable_short_bcn_as_dtim_override       : -1
     417[    9.614228] morse_sdio mmc0:0001:2:     fw_bin_file                             :
     418[    9.614234] morse_sdio mmc0:0001:2:     sdio_reset_time                         : 400
     419[    9.614240] morse_sdio mmc0:0001:2:     macaddr_suffix                          : 00:00:00
     420[    9.614246] morse_sdio mmc0:0001:2:     macaddr_octet                           : 255
     421[    9.614252] morse_sdio mmc0:0001:2:     max_total_vendor_ie_bytes               : 514
     422[    9.614259] morse_sdio mmc0:0001:2:     coredump_include                        : 1
     423[    9.614265] morse_sdio mmc0:0001:2:     coredump_method                         : 1
     424[    9.614270] morse_sdio mmc0:0001:2:     enable_coredump                         : Y
     425[    9.614276] morse_sdio mmc0:0001:2:     sdio_clk_debugfs                        :
     426[    9.614282] morse_sdio mmc0:0001:2:     enable_mm_vendor_ie                     : Y
     427[    9.614287] morse_sdio mmc0:0001:2:     fixed_guard                             : 0
     428[    9.614293] morse_sdio mmc0:0001:2:     fixed_ss                                : 1
     429[    9.614299] morse_sdio mmc0:0001:2:     fixed_bw                                : 2
     430[    9.614305] morse_sdio mmc0:0001:2:     fixed_mcs                               : 4
     431[    9.614310] morse_sdio mmc0:0001:2:     enable_fixed_rate                       : N
     432[    9.615157] morse_io: Device node '/dev/morse_io' created successfully
     433[    9.616514] usbcore: registered new interface driver morse_usb
     434successfully
     435# ls -l /sys/class/net/wlan0
     436lrwxrwxrwx 1 root root 0 Nov 21 00:59 /sys/class/net/wlan0 -> ../../devices/platform/soc@0/30800000.bus/30b40000.mmc/mmc_host/mmc0/mmc0
     437:0001/mmc0:0001:2/net/wlan0
     438# ls -l /sys/class/net/morse0
     439lrwxrwxrwx 1 root root 0 Jan 12 23:31 /sys/class/net/morse0 -> ../../devices/virtual/net/morse0
     440}}}
     441
     442
    103443
    104444=== hostapd and wpa_supplicant
     
    463803        ieee80211w=2
    464804        beacon_int=1000
     805        # 1.16.4 wpa_supplicant_s1g needs dtim_period=1
     806        dtim_period=1
    465807}
    466808EOF
     
    485827More information on mesh and 802.11s can be found on our [https://trac.gateworks.com/wiki/wireless/wifi/mesh mesh networks] wiki page.
    486828
     829[=#performance]
     830== Performance
     831The MM8108 supports:
     832 * Spacial Streams: 1
     833 * Channel bandwidths: 1/2/4/8 MHz
     834 * Modulation and Coding Schemes: MCS 0-9 (1/2/4/8 Mhz); MCS 10 (1Mhz only)
     835 * Data rates up to 43.33Mbps (MCS 9, 256-QAM, 8 Mhz channel, 4 us GI)
     836
     837Since 802.11ah is designed for low-power, long-range IoT applications, its rates are lower than higher-frequency Wi-Fi standards like 802.11n/ac/ax.
     838
     839802.11ah uses OFDM with a subcarrier spacing of 31.25 kHz (1/32 µs), scaled down from 802.11ac’s 312.5 kHz to support narrower channels. The number of data subcarriers varies with bandwidth:
     840 - 1 MHz: 24 data subcarriers.
     841 - 2 MHz: 52 data subcarriers.
     842 - 4 MHz: 108 data subcarriers.
     843 - 8 MHz: 234 data subcarriers.
     844
     845The PHY rate is calculated as: PHY Rate = (Number of Data Subcarriers) × (Bits per Subcarrier) × (Coding Rate) × (Symbols per Second) × (Number of Spatial Streams):
     846 - Data Subcarriers:
     847  * 1 MHz: 24 data subcarriers.
     848  * 2 MHz: 52 data subcarriers.
     849  * 4 MHz: 108 data subcarriers.
     850  * 8 MHz: 234 data subcarriers.
     851 - Bits per Subcarier and Coding Rate: Depends on MCS index
     852 - Symbols per Second:
     853  * Long GI (8us): 4 us data + 4 us GI: 125,000 symbols/s
     854  * Short GI (4us): 4 us data + 0 us GI: 250,000 symbols/s
     855 - Spatial Streams: 1 (common for IoT devices).
     856
     857[=#mcs_table]
     858Calculated max PHY Data Rates per MCS, channel bandwidth, and guard interval:
     859||= MCS ||= Modulation ||= Coding rate ||= 1 MHz channel (Mbps) Long GI / Short GI ||= 2 MHz channel (Mbps) Long GI / Short GI ||= 4 MHz channel (Mbps) Long GI / Short GI ||= 8 MHz channel (Mbps) Long GI / Short GI ||
     860|| 0 || BPSK || 1/2 || 0.3 / 0.33 || 0.65 / 0.72 || 1.35 / 1.5 || 2.925 / 3.25 ||
     861|| 1 || QPSK || 1/2 || 0.6 / 0.67 || 1.3 / 1.44 || 2.7 / 3.0 || 5.85 / 6.5 ||
     862|| 2 || QPSK || 3/4 || 0.9 / 1.0 || 1.95 / 2.17 || 4.05 / 4.5 || 8.775 / 9.75 ||
     863|| 3 || 16-QAM || 1/2 || 1.2 / 1.33 || 2.6 / 2.89 || 5.4 / 6.0 || 11.7 / 13.0 ||
     864|| 4 || 16-QAM || 3/4 || 1.8 / 2.0 || 3.9 / 4.33 || 8.1 / 9.0 || 17.55 / 19.5 ||
     865|| 5 || 64-QAM || 2/3 || 2.4 / 2.67 || 5.2 / 5.78 || 10.8 / 12.0 || 23.4 / 26.0 ||
     866|| 6 || 64-QAM || 3/4 || 2.7 / 3.0 || 5.85 / 6.5 || 12.15 / 13.5 || 26.3 / 29.3 ||
     867|| 7 || 64-QAM || 5/6 || 3.0 / 3.34 || 6.5 / 7.22 || 13.5 / 15.0 || 29.3 / 32.5 ||
     868|| 8 || 256-QAM || 3/4 || 3.6 / 4.0 || 7.8 / 8.667 || 16.20 / 18.0 || 35.1 / 39.0 ||
     869|| 9 || 256-QAM || 5/6 || N/A       || 8.667 / 9.630 || 18.0 / 20.0 || 39.0 / 43.333 ||
     870|| 10 || BPSK || 1/2 || 0.15 / 0.17 || N/A || N/A || N/A ||
     871
     872
     873Note that MCS10 is a special case in 802.11ah and is for 1MHz cahnnels only with a repetition mode modulated with BPSK and 1/2 coding rate. This is for ultra-low rate extended range. The repetition doubles robustness but halves throughput.
     874
     875Actual throughput will be less taking into account overhead, congestion, and RF factors. To examine your link you can use the following:
     876 * examine the rate control stats:
     877{{{#!bash
     878cat /sys/kernel/debug/ieee80211/phy0/morse/mmrc_table
     879}}}
     880 * examine your link status (RSSI and MCS info):
     881  - AP:
     882{{{#!bash
     883iw dev wlan0 station dump
     884}}}
     885  - STA:
     886{{{#!bash
     887iw dev wlan0 link
     888}}}
     889
     890The rate control stats {{{/sys/kernel/debug/ieee80211/phy0/morse/mmrc_table}}} will provide statistics from the Morse S1G TX Rate rate control algorithm:
     891 - each line represents stats for a given channel bandwidth, guard band interval, and MCS index
     892 - the 'rate_sel' column uses the following definitions:
     893  * A : Highest throughput
     894  * B : 2nd highest throughput
     895  * C : baseline throughput
     896  * P : Maximum delivery probability
     897  * L : Used for additional lookarounds when traffic is very low
     898
     899Examining this tells you what MCS rate you are using; if it is not the highest then look at RF characteristics such as antenna, transmit strength, RSSI, and interference.
     900
     901Example:
     902 * Using 8MHz Short GI:
     903{{{#!bash
     904# cat /sys/kernel/debug/ieee80211/phy0/morse/mmrc_table | head -n4; cat /sys/kernel/debug/ieee80211/phy0/morse/mmrc_table | grep 8MHz | grep SGI
     905
     906Morse Micro S1G RC Algorithm Statistics
     907Peer: 0c:bf:74:00:27:62
     908                     --------------Rate--------------  Throughput Probability ---------Last--------- ---------Total--------- ----MPDU-----
     909 8MHz   SGI        0       C   MCS0   1     7    3165  0.00  0.00           0     0       0        0           0           0       0     0
     910 8MHz   SGI        0           MCS1   1    15    2122  0.00  0.00           0     0       0        0           0           0       0     0
     911 8MHz   SGI        0           MCS2   1    23    1582  0.00  0.00           0     0       0        0           0           0       0     0
     912 8MHz   SGI        0           MCS3   1    31    1043  0.00  0.00           0     0       0        0           0           0       0     0
     913 8MHz   SGI        0           MCS4   1    39     791 19.50 19.49         100     0       0        0           3           3       0     0
     914 8MHz   SGI        0           MCS5   1    47     503  0.00  0.00           0     0       0        0           0           0       0     0
     915 8MHz   SGI        0           MCS6   1    55     395  0.00  0.00           0     0       0        0           0           0       0     0
     916 8MHz   SGI        0        P  MCS7   1    63     323 32.50 32.49         100     0       0        0         878         885       0     0
     917 8MHz   SGI        0      B    MCS8   1    71     287 39.00 36.26          93     0       0        0        1403        1462       0     0
     918 8MHz   SGI        0     A     MCS9   1    79     251 46.79 46.36          96     0       0        0       43597       45721       0     0
     919}}}
     920  - The above shows the majority of the packets are using MCS9, the highest rate for the mm8108.
     921
     922
    487923
    488924