Changes between Version 1 and Version 2 of expansion/gw16167


Ignore:
Timestamp:
10/16/2025 07:23:05 PM (38 hours ago)
Author:
Tim Harvey
Comment:

various updates; add bus information; remove software details not yet ready

Legend:

Unmodified
Added
Removed
Modified
  • expansion/gw16167

    v1 v2  
    33= GW16167 M.2 E-Key 802.11ah (!HaLow) radio
    44
    5 [[Image(gw16159.jpg,300px)]]
    6 
    7 
    8 The GW16167 M.2 E-Key Sub-1GHz 802.11ah radio uses the !MorseMicro MM8108 chip.
    9 
    10 '''NOTE: The GW16167 requires an M.2 E-Key socket with USB. This may require an adapter for the Venice SBCs'''
     5
     6The 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.
     7
     8'''NOTE: The GW16167 requires an M.2 E-Key socket with USB 2.0. This may require an adapter for the Venice SBCs'''
    119
    1210View the [https://www.gateworks.com/products/mini-pcie-expansion-cards/gw16159-802-11ah-halow-wifi-m2-card/ GW16167 Product Page] for pricing and specifications
     
    1412IEEE 802.11ah is a wireless networking protocol published in 2017 called Wi-Fi !HaLow as an amendment of the IEEE 802.11-2007 wireless networking standard. It uses 900 MHz license-exempt bands to provide extended-range Wi-Fi networks, compared to conventional Wi-Fi networks operating in the 2.4 GHz, 5 GHz and 6 GHz bands. It also benefits from lower energy consumption, allowing the creation of large groups of stations or sensors that cooperate to share signals, supporting the concept of the Internet of things (IoT). The protocol's low power consumption competes with Bluetooth, !LoRa, and Zigbee, and has the added benefit of higher data rates and wider coverage range.
    1513
    16 The radio communicates over the USB bus
     14The radio communicates over the USB 2.0 bus
    1715
    1816Datasheets:
    1917 * [https://www.morsemicro.com/resources/datasheets/modules/MM8108-MF15457_Data_Sheet.pdf MorseMicro MM8108 Datasheet]
    20 
    2118
    2219
     
    4138 * M2.4: 3.3VDC
    4239 * M2.5: USB-
    43  * M2.56: W_DISABLE1# routed to the RESET_N pin of the SX_SDMAH with a 200k pu to VDD_3P3
    44  * M2.54: W_DISABLE2# routed to the WAKE pin of the SX_SDMAH with a 10k pu to VDD_3P3
     40 * M2.56: W_DISABLE1# routed to the RESET_N pin of the MM8108 module a 200k pu to VDD_3P3
     41 * M2.54: W_DISABLE2# routed to the WAKE pin of the MM8108 module with a 10k pu to VDD_3P3
    4542 * M2.72: 3.3VDC
    4643 * M2.74: 3.3VDC
     
    9693
    9794Building with the Gateworks Venice BSP:
    98   1. Add a 'custom_kernel_mm6108' script
    99 {{{#!bash
    100 cat <<\EOF > custom_kernel_mm6108
    101 #!/bin/bash -e
    102 
    103 DIR=$PWD/mm610x
    104 OUTDIR=$DIR/out
    105 DESTDIR=$2
    106 
    107 MORSE_VER=1.12.4
    108 LIBNL_VER=libnl3_11_0
    109 OPENSSL_VER=openssl-3.4.0
    110 COUNTRY=US
    111 mkdir -p $DESTDIR/usr/sbin
    112 mkdir -p $DESTDIR/etc/modprobe.d
    113 mkdir -p $DIR
    114 cd $DIR
    115 
    116 # get repos of what we will build
    117 [ -d morse_driver ] || git clone --recurse-submodules https://github.com/Gateworks/morse_driver.git -b gateworks-venice
    118 [ -d libnl ] || git clone https://github.com/thom311/libnl.git -b $LIBNL_VER
    119 [ -d openssl ] || git clone https://github.com/openssl/openssl.git -b $OPENSSL_VER
    120 [ -d hostap ] || git clone https://github.com/MorseMicro/hostap.git -b $MORSE_VER
    121 [ -d morse_cli ] || git clone https://github.com/MorseMicro/morse_cli.git -b $MORSE_VER
    122 
    123 echo "Building mm6108 driver..."
    124 ARGS="KERNEL_SRC=$1 \
    125         CONFIG_MORSE_SDIO=y \
    126         CONFIG_MORSE_USER_ACCESS=y \
    127         CONFIG_MORSE_VENDOR_COMMAND=y \
    128         CONFIG_MORSE_SDIO_ALIGNMENT=4 \
    129         CONFIG_MORSE_POWERSAVE_MODE=0 \
    130         CONFIG_MORSE_COUNTRY=$COUNTRY \
    131         CONFIG_MORSE_RC=y \
    132         CONFIG_WLAN_VENDOR_MORSE=m"
    133 make -C morse_driver $ARGS
    134 make -C morse_driver $ARGS INSTALL_MOD_PATH=$2 modules_install
    135 
    136 # firmware:
    137 #  - mm6108 firmware
    138 #  - board configuration file (BCF) that provides driver with calibration constants and chip gpio config
    139 echo "Copying mm6108 firmware..."
    140 mkdir -p $2/lib/firmware/morse
    141 wget http://dev.gateworks.com/firmware/gw16159/mm6108.bin -O $2/lib/firmware/morse/mm6108.bin
    142 wget http://dev.gateworks.com/firmware/gw16159/LICENSE -O $2/lib/firmware/morse/LICENSE
    143 wget "http://dev.gateworks.com/firmware/gw16159/HY103760XB_SX-SDMAH-R2(US)_20240807_5V0.bin" -O $2/lib/firmware/morse/bcf_sxsdmah_fem5p0.bin
    144 
    145 [ -d $OUTDIR/include/libnl3 ] || {
    146         cd libnl
    147         ./autogen.sh
    148         ./configure --host=$ARCH CC=${CROSS_COMPILE}gcc --prefix=$OUTDIR --disable-shared
    149         make clean
    150         make -j32
    151         make install
    152         cd ..
    153 }
    154 
    155 [ -d $OUTDIR/include/openssl ] || {
    156         cd openssl
    157         ./Configure linux-generic32 no-shared no-dso no-async -DL_ENDIAN --prefix=$OUTDIR --openssldir=$OUTDIR
    158         # needed no-async to build latest openssl against uclib
    159         make -j32 \
    160                 CC=${CROSS_COMPILE}gcc \
    161                 RANLIB=${CROSS_COMPILE}ranlib \
    162                 LD=${CROSS_COMPILE}ld \
    163                 MAKEDEPPROG=${CROSS_COMPILE}gcc \
    164                 PROCESSOR=ARM
    165         #make install # installs man pages too
    166         make install_sw
    167         cd ..
    168 }
    169 
    170 # wpa_supplicant
    171 [ -r hostap/wpa_supplicant/wpa_supplicant_s1g.bin ] || {
    172         cp hostap/wpa_supplicant/defconfig hostap/wpa_supplicant/.config
    173         make -C hostap/wpa_supplicant/ clean
    174         CFLAGS="-I $OUTDIR/include/libnl3 -I $OUTDIR/include" \
    175                 LDFLAGS="-L $OUTDIR/lib/ --static" \
    176                 DESTDIR="$OUTDIR/sbin" \
    177                 BINDIR=/usr/sbin \
    178                 LIBS="-lnl-3 -lm -lpthread -lcrypto -lssl" \
    179                 CC=${CROSS_COMPILE}gcc \
    180                 make -j32 -C hostap/wpa_supplicant/ CONFIG_MESH=y
    181 }
    182 cp hostap/wpa_supplicant/{wpa_supplicant_s1g,wpa_cli_s1g,wpa_passphrase_s1g} $DESTDIR/usr/sbin/
    183 
    184 # hosapd
    185 [ -r hostap/hostapd/hostapd_s1g.bin ] || {
    186         cp hostap/hostapd/defconfig hostap/hostapd/.config
    187         make -C hostap/hostapd/ clean
    188         CFLAGS="-I $OUTDIR/include/libnl3 -I $OUTDIR/include" \
    189                 LDFLAGS="-L $OUTDIR/lib/ --static" \
    190                 DESTDIR="$OUTDIR/sbin" \
    191                 BINDIR=/usr/sbin \
    192                 LIBS="-lnl-3 -lm -lpthread -lcrypto -lssl" \
    193                 CC=${CROSS_COMPILE}gcc \
    194                 make -j32 -C hostap/hostapd/
    195 }
    196 cp hostap/hostapd/{hostapd_s1g,hostapd_cli_s1g} $DESTDIR/usr/sbin/
    197 
    198 # morse_cli
    199 [ -r morse_cli/morse_cli.bin ] || {
    200         make -C morse_cli clean
    201         CFLAGS="-I $OUTDIR/include/libnl3 -I $OUTDIR/include" \
    202                 LDFLAGS="-L $OUTDIR/lib/ --static" \
    203                 CC=${CROSS_COMPILE}gcc \
    204         make \
    205                 CONFIG_MORSE_TRANS_NL80211=1 \
    206                 CONFIG_MORSE_STATIC=1 \
    207                 -j32 -C morse_cli
    208 }
    209 cp morse_cli/morse_cli $DESTDIR/usr/sbin/
    210 
    211 # module parameters
    212 echo "options morse country=$COUNTRY enable_ext_xtal_init=1 bcf=bcf_sxsdmah_fem5p0.bin" > $DESTDIR/etc/modprobe.d/morse.conf
    213 EOF
    214 chmod +x custom_kernel_mm6108
    215 }}}
    216   3. rebuild the ubuntu-image:
    217 {{{#!bash
    218 source ./setup-environment
    219 make ubuntu-image
    220 }}}
    221 
    222 Module Parameters:
    223  - There are a number of module parameters supported by morse.ko however the required ones for the GW16167 are:
    224   * country=US
    225   * enable_ext_xtal_init=1
    226   * bcf=bcf_sxsdmah_fem5p0.bin
    227  - These can be placed in /etc/modprobe..d such as:
    228 {{{#!bash
    229 echo "options morse country=US enable_ext_xtal_init=1 bcf=bcf_sxsdmah_fem5p0.bin" > /etc/modprobe.d/morse.conf
    230 }}}
    231 
    232 
     95 * coming soon
    23396
    23497=== hostapd and wpa_supplicant
     
    244107ifconfig wlan0 up
    245108# morse_cli --interface=wlan0 hw_version
    246 HW Version: MM6108-A1
     109HW Version: MM8108
    247110# morse_cli --interface=wlan0 version
    248111Morse_cli Version: rel_1_12_5_2024_Jul_25-4-g3541610
     
    367230|| 2 || 71 || 8 || 12 || 908.0 ||
    368231|| 2 || 71 || 8 || 28 || 916.0 ||
    369 || 2 || 71 || 8 || 44 || 924.0^^^1^^^ ||
    370  1. 924MHz is disabled in mm6108 firmware due to noise exceeding specification
     232|| 2 || 71 || 8 || 44 || 924.0 ||
    371233
    372234
     
    616478More information on mesh and 802.11s can be found on our [https://trac.gateworks.com/wiki/wireless/wifi/mesh mesh networks] wiki page.
    617479
    618 [=#performance]
    619 == Performance
    620 The MM8108 supports:
    621  * Spacial Streams: 1
    622  * Channel bandwidths: 1/2/4/8 MHz
    623  * Modulation and Coding Schemes: MCS 0-9 (1/2/4/8 Mhz); MCS 10 (1Mhz only)
    624  * Data rates up to 43.3Mbps (MCS 9, 64-QAM, 8 Mhz channel, 4 us GI)
    625 
    626 Since 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.
    627 
    628 802.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:
    629  - 1 MHz: 24 data subcarriers.
    630  - 2 MHz: 52 data subcarriers.
    631  - 4 MHz: 108 data subcarriers.
    632  - 8 MHz: 234 data subcarriers.
    633 
    634 The PHY rate is calculated as: PHY Rate = (Number of Data Subcarriers) × (Bits per Subcarrier) × (Coding Rate) × (Symbols per Second) × (Number of Spatial Streams):
    635  - Data Subcarriers:
    636   * 1 MHz: 24 data subcarriers.
    637   * 2 MHz: 52 data subcarriers.
    638   * 4 MHz: 108 data subcarriers.
    639   * 8 MHz: 234 data subcarriers.
    640  - Bits per Subcarier and Coding Rate: Depends on MCS index
    641  - Symbols per Second:
    642   * Long GI (8us): 4 us data + 4 us GI: 125,000 symbols/s
    643   * Short GI (4us): 4 us data + 0 us GI: 250,000 symbols/s
    644  - Spatial Streams: 1 (common for IoT devices).
    645 
    646 
    647 
    648 
    649 Note 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.
    650 
    651 Actual throughput will be less taking into account overhead, congestion, and RF factors. To examine your link you can use the following:
    652  * examine the rate control stats:
    653 {{{#!bash
    654 cat /sys/kernel/debug/ieee80211/phy0/morse/mmrc_table
    655 }}}
    656  * examine your link status (RSSI and MCS info):
    657   - AP:
    658 {{{#!bash
    659 iw dev wlan0 station dump
    660 }}}
    661   - STA:
    662 {{{#!bash
    663 iw dev wlan0 link
    664 }}}
    665 
    666 The rate control stats {{{/sys/kernel/debug/ieee80211/phy0/morse/mmrc_table}}} will provide statistics from the Morse S1G TX Rate rate control algorithm:
    667  - each line represents stats for a given channel bandwidth, guard band interval, and MCS index
    668  - the 'rate_sel' column uses the following definitions:
    669   * A : Highest throughput
    670   * B : 2nd highest throughput
    671   * C : baseline throughput
    672   * P : Maximum delivery probability
    673   * L : Used for additional lookarounds when traffic is very low
    674 
    675 Examining 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.
    676 
    677 
    678 
    679 == Transmit Power
    680 
    681 It allows up to 26dBm at specific frequencies, bandwidth and MCS rate as noted in the table below.
    682480
    683481