[[PageOutline]] = GW16146 miniPCIe 802.11ah Radio Module [[Image(gw16146v3.png,300px)]] The [https://www.gateworks.com/products/mini-pcie-expansion-cards/gw16146-802-11ah-halow-wifi-mini-pcie-card/ GW16146] is a miniPCIe form factor 802.11ah radio consisting of: - FT232H MPSSE USB to SPI bridge - [https://www.silextechnology.com/connectivity-solutions/embedded-wireless/sx-newah Silex SX-NEWAH] module based on [https://www.newracom.com/product/nrc7292 Newracom NRC7292] (US only) The GW16146 differs from the Newracom NRC7292 EVK in the following ways: * Sits behind a FT232H USB to SPI bridge * Uses software polling instead of an interrupt * Uses the Silex SX-NEWAH radio containing the NRC7292 but RF tuned for US operation View the [https://www.gateworks.com/products/mini-pcie-expansion-cards/gw16146-802-11ah-halow-wifi-mini-pcie-card/ GW16146 Product Page] for pricing and specifications == 802.11ah Showcase View the [https://www.gateworks.com/802-11ah-halow-long-range-low-power-wireless-for-iot/ Gateworks 802.11ah Showcase] to learn more about 802.11ah [[Image(80211ahadvantages.png,300px)]] == Features The [https://www.silextechnology.com/connectivity-solutions/embedded-wireless/sx-newah Silex SX-NEWAH module] featuring the [https://www.newracom.com/product/nrc7292 Newracom 7292] features: * IEEE 802.11ah operating in Sub 1GHz license-exempt band - offers a much greater range over 2.5GHz and 5GHz technologies - offers a much higher data rate than proprietary Low-Power Wide-Area (LPWA) technologies such as LoRa and Sigfox - full IP stack lowers barrier to entry over proprietary Low-Power Wide-Area (LPWA) technologies such as LoRa and Sigfox * latest generation Wi-Fi security - WPA3 * channel widths: 1/2/4MHz channel widths with optional short guard interval (SGI) (yield 150Kbps to 15Mbps PHY throughput at the PHY layer but due to USB-to-SPI and driver polling maxes out at about 3mbps) * streams: 1 spatial stream * data rates: MCS0-MCS7, MCS10 (1MHz only) * country: US support only * modes: infrastructure, monitor, 802.11s mesh * auth / encryption: open, WPA2-PSK(AES), WPA3-OWE, WPA3-SAE * OFDM modulation * AES-CCMP encryption * 750 to 950MHz frequency band * TX gain range: 30dB * RX noise figure: <4dB * Max input level: -10dBm * dual embedded ARM Cortex-M0 and Cortex-M3 processor * SPI host interface * only 1 GW16146 is supported on a give system; as there is no concrete way to associate SPI bus number with particular device. The bus number assignment relies on USB bus scan and device probe sequence RF transmitter specifications: ||= BW =||= Freq (MHz) =||= Data Rates (MCS) =||= TX Power (min/typ/max dBm) =|| || 1MHz || 903.5 ~ 915.5 || 0,1,2,3,4,10 || 20.5 / 23.0 / 25.5 || || || || 5 || 19.5 / 22.0 / 24.5 || || || || 6 || 15.5 / 18.0 / 20.5 || || || || 7 || 11.5 / 14.0 / 16.5 || || || 916.5 ~ 926.5 || 0,1,2,3,4,10 || 19.5 / 22.0 / 24.5 || || || || 5 || 18.5 / 21.0 / 23.5 || || || || 6 || 15.5 / 18.0 / 20.5 || || || || 7 || 11.5 / 14.0 / 16.5 || || 2MHz || 905 ~ 917 || 0,1,2,3,4 || 20.5 / 22.0 / 24.5 || || || || 5 || 19.5 / 21.0 / 23.5 || || || || 6 || 12.5 / 18.0 / 20.5 || || || || 7 || 11.5 / 14.0 / 16.5 || || || 9195 ~ 925 || 0,1,2,3,4 || 19.5 / 22.0 / 24.5 || || || || 6 || 12.5 / 15.0 / 17.5 || || || || 7 || 11.5 / 14.0 / 16.5 || || 4MHz || 910 ~ 922 || 0,1,2,3,4,5 || 18.5 / 21.0 / 23.5 || || || || 6 || 12.5 / 15.0 / 17.5 || || || || 7 || 11.5 / 14.0 / 16.5 || Modulation and coding schemes (for 1 spatial stream 1/2/4MHz channels): ||= MCS index =||= Modulation and coding rate =||||= 1MHz (mbps) =||||= 2MHz (mbps) =||||= 4MHz (mbps) =|| || || ||= long GI =||= short GI =||= long GI =||= short GI =||= long GI =||= short GI =|| || 0 || BPSK 1/2 || 0.3 || 0.33 || 0.65 || 0.72 || 1.35 || 1.5 || || 1 || QPSK 1/2 || 0.6 || 0.67 || 1.3 || 1.44 || 2.7 || 3.0 || || 2 || QPSK 3/4 || 0.9 || 1.0 || 1.95 || 2.17 || 4.05 || 4.5 || || 3 || 16-QAM 1/2 || 1.2 || 1.33 || 2.6 || 2.89 || 5.4 || 6.0 || || 4 || 16-QAM 3/4 || 1.8 || 2.0 || 3.9 || 4.33 || 8.1 || 9.0 || || 5 || 64-QAM 2/3 || 2.4 || 2.67 || 5.2 || 5.78 || 10.8 || 12.0 || || 6 || 64-QAM 3/4 || 2.7 || 3.0 || 5.85 || 6.5 || 12.2 || 13.5 || || 7 || 64-QAM 5/6 || 3.0 || 3.34 || 6.5 || 7.22 || 13.5 || 15.0 || || 10 || BPSK 1/2 x 2 || 0.15 || 0.17 || - || - || - || - || - see rate table at: https://en.wikipedia.org/wiki/IEEE_802.11ah - **these are maximum PHY data rates - actual throughput depends also on packet loss and most importantly SPI and USB bus overhead and latency which effectively reduces throughput to a max of around 4.5mbps.** RF receiver specifications: ||= BW =||= Modulation =||= Data Rates =||= Rx Minimum Sensitivity (typ/max dBm) =|| || 1MHz || BPSK || MCS10 || -104 / -98 || || || BPSK || MCS0 || -102 / -95 || || || QPSK || MCS1 || -100 / -92 || || || QPSK || MCS2 || -95 / -90 || || || 16 QAM || MCS3 || -92 / -87 || || || 16 QAM || MCS4 || -88 / -83 || || || 64 QAM || MCS5 || -89 / -79 || || || 64 QAM || MCS6 || -86 / -78 || || || 64 QAM || MCS7 || -85 / -77 || || 2MHz || BPSK || MCS0 || -96 / -92 || || || QPSK || MCS1 || -96 / -89 || || || QPSK || MCS2 || -94 / -87 || || || 16 QAM || MCS3 || -92 / -84 || || || 16 QAM || MCS4 || -88 / -80 || || || 64 QAM || MCS5 || -84 / -76 || || || 64 QAM || MCS6 || -83 / -75 || || || 64 QAM || MCS7 || -81 / -74 || || 4MHz || BPSK || MCS0 || -92 / -89 || || || QPSK || MCS1 || -92 / -86 || || || QPSK || MCS2 || -92 / -84 || || || 16 QAM || MCS3 || -88 / -81 || || || 16 QAM || MCS4 || -85 / -77 || || || 64 QAM || MCS5 || -81 / -73 || || || 64 QAM || MCS6 || -80 / -72 || || || 64 QAM || MCS7 || -78 / -71 || Channel Mapping (US): - The SX-NEWAH Channel Mapping application note from Silex states the frequency range is 903.5 MHz to 926.5 MHz supporting channel widths of 1MHz, 2MHz, or 4MHz. The channel map (differs a bit from Newracom's info due to US) is: - 1 MHz Wide channel mappings: ||= Wi-Fi channel setting =||= Sub 1 GHz frequency [MHz] =|| || 3 || 903.5 || || 5 || 904.5 || || 7 || 905.5 || || 9 || 906.5 || || 11 || 907.5 || || 36 || 908.5 || || 37 || 909.5 || || 38 || 910.5 || || 39 || 911.5 || || 40 || 912.5 || || 41 || 913.5 || || 42 || 914.5 || || 43 || 915.5 || || 44 || 916.5 || || 45 || 917.5 || || 46 || 918.5 || || 47 || 919.5 || || 48 || 920.5 || || 149 || 921.5 || || 150 || 922.5 || || 151 || 923.5 || || 152 || 924.5 || || 100 ^^^1^^^ || 925.5 || || 104 ^^^1^^^ || 926.5 || 1. use of these channels is not recommended as these are Clear Access Channels (CAC) which when used will takea full 60 seconds before they are operational - 2 MHz Wide channel mappings: ||= Wi-Fi channel setting =||= Sub 1 GHz frequency [MHz] =|| || 6 || 905 || || 10 || 907 || || 153 || 909 || || 154 || 911 || || 155 || 913 || || 156 || 915 || || 157 || 917 || || 158 || 919 || || 159 || 921 || || 160 || 923 || || 161 || 925 || - 4 MHz Wide channel mappings: ||= Wi-Fi channel setting =||= Sub 1 GHz frequency [MHz] || || 162 || 910 || || 163 || 914 || || 164 || 918 || || 165 || 922 || == Antenna This radio requires an antenna properly tuned for the target frequency. Gateworks sells a 900 MHz antenna, the GW10124. [https://shop.gateworks.com/index.php?route=product/product&path=71&product_id=213 Purchase the GW10124] ** Note antenna adapter cable not included * Requires [https://shop.gateworks.com/index.php?route=product/product&product_id=42&search=sma GW10036 u.FL to SMA Cable Adapter] == Documentation There are a number of documents in the Newracom nrc7292 driver repository which may prove useful: * [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/AN-7292-002-Dynamic%20Vendor%20IE.pdf AN-7292-002-Dynamic Vendor IE.pdf] * [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/AN-7292-007-11s_mesh_network.pdf AN-7292-007-11s_mesh_network.pdf] * [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-002-Host%20driver%20porting.pdf UG-7292-002-Host%20driver%20porting.pdf] * [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-007-Commnad%20line%20application.pdf UG-7292-007-Commnad%20line%20application.pdf] * [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-011-NewraPeek.pdf UG-7292-011-NewraPeek.pdf] * [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-015-Transmit_Power_Control.pdf UG-7292-015-Transmit_Power_Control.pdf] - Note that some of these documents are heavily tailored to the Newracom NRC7292 EVK which may differ in some ways to the GW16146 Other references: * [https://www.silextechnology.com/connectivity-solutions/embedded-wireless/sx-newah Silex SX-NEWAH product page] - contains various specs and documents * https://en.wikipedia.org/wiki/IEEE_802.11ah == Software Software support consists of the following items: - Linux kernel driver for FT232H as a USB to SPI bridge - Linux kernel driver for the NRC7292 SPI Radio chip - Firmware files required for NRC7292 driver in /lib/firmware: nrc7292_cspi.bin and nrc7292_bd.dat - Userspace cli_app application to performing miscellaneous configuration via Netlink to the NRC7292 driver The above software support is present in the following: - Venice Ubuntu Focal (20.04) pre-built images - Newport Ubuntu Focal (20.04) pre-built images. - Ventana Ubuntu Focal (20.04) pre-built images OpenWRT repository link for NRC7292: - [https://github.com/newracom/nrc7292_openwrt] [=#spi_ft232h] === FT232H USB to SPI bridge The FT232H features an multi-protocol engine that can be used for UART, JTAG, SPI among perhaps other things. Gateworks has programmed the USB VID:PID to 0x2beb:0x0146 which binds to the out-of-tree Linux kernel [https://github.com/Gateworks/ftdi-usb-spi spi-ft232h driver]. When a GW16146 is found on the USB bus a SPI master host controller will be registered with the Linux kernel which you can see in /sys/class/spi_master. Note that various SoC's used for Gateworks boards also have built-in SPI controllers so you will need to look at the directory in /sys/class/spi_master to see what drivers each spi controller is bound to to find the right one. Examples: * show spi master controllers {{{#!bash # ls /sys/class/spi_master/ spi1 spi3 }}} * show drivers providing each master: {{{#!bash # ls -l /sys/class/spi_master/ total 0 lrwxrwxrwx 1 root root 0 Aug 27 17:59 spi1 -> ../../devices/platform/soc@0/soc@0:bus@30800000/30830000.spi/spi_master/spi1 lrwxrwxrwx 1 root root 0 Aug 27 17:59 spi3 -> ../../devices/platform/soc@0/soc@0:bus@32c00000/32e50000.usb/ci_hdrc.1/usb2/2-1/2-1.3/2-1.3:1.0/spi-ft232h.0/spi_master/spi3 # for i in $(ls /sys/class/spi_master/); do echo $i:$(basename $(readlink /sys/class/spi_master/$i/device)); done spi1:30830000.spi spi3:spi-ft232h.0 }}} * find spi master bound to spi-ft232h: {{{#!bash # for i in $(ls /sys/class/spi_master/); do if [ "$(basename $(readlink /sys/class/spi_master/$i/device))" == "spi-ft232h.0" ]; then echo $i; fi; done spi3 }}} * assign the bus number of the first spi-ft232h bus to a var: {{{#!bash # BUSNO=$(for i in $(ls /sys/class/spi_master/); do if [ "$(basename $(readlink /sys/class/spi_master/$i/device))" == "spi-ft232h.0" ]; then echo $i | sed 's/[^0-9]*//g'; fi; done) # echo $BUSNO 3 }}} Note that the SPI bus frequency can range from 450KHz to 30Mhz in 30MHz/n divisions where n is 1 to 65535 thus 30, 15, 10, 7.5, 6, 3.75MHz and so on. Invalid values will round up to the next highest freq. The frequency will be requested from the nrc.ko driver via the hifspeed kernel param (see below) Building: - The driver compiles a single module 'spi-ft232h.ko' and can be built out-of-tree by assigning KDIR to the directory of your kernel: {{{#!bash KDIR=/usr/src/venice/bsp/linux make }}} [=#nrc7292] === NRC7292 kernel driver The Silex SX-NEWAH module on the GW16146 has a Newracom NRC7292 and thus is mostly supported by Newracom's open-source driver. However, the Newracom driver assumes a SoC GPIO is used for SPI IRQ and in the case of the GW16146 this does not exist. Therefore a SPI polling feature was added to the driver therefore Gateworks has its own [https://github.com/Gateworks/nrc7292 nrc7292] driver. There is a large set of kernel params (which you can see via 'modinfo nrc.ko') but for our purposes the following are needed: * fw_name - firmware file from /lib/firmware * bd_name - Board data file from /lib/firmware * hifspeed - port speed in MHz (recommend 30000000 for 30MHz; available frequencies are 450KHz to 30Mhz in 30MHz/n divisions where n is 1 to 65535 thus 30, 15, 10, 7.5, 6, 3.75MHz and so on. Invalid values will round up to the next highest freq) * spi_bus_num - SPI bus number (find this dynamically from /sys/class/spi_master) * spi_cs_num - SPI chip select (must be 0 for FTDI USB_SPI bridge) * spi_polling_interval - SPI polling interval in ms (recommend 5ms) You must determine the SPI bus at runtime which can be done via: {{{#!bash # BUSNO=$(for i in $(ls /sys/class/spi_master/); do if [ "$(basename $(readlink /sys/class/spi_master/$i/device))" == "spi-ft232h.0" ]; then echo $i | sed 's/[^0-9]*//g'; fi; done) # echo $BUSNO }}} Now the module can be loaded as such: {{{#!bash # modprobe nrc fw_name=nrc7292_cspi.bin bd_name=nrc7292_bd.dat spi_bus_num=$BUSNO spi_polling_interval=5 hifspeed=30000000 }}} After several seconds due to the timing of firmware loading you should see a new wlan device under /sys/class/net. To find the correct wlan interface that is bound to the NRC7292 driver: {{{#!bash # WLAN="$(for i in $(ls -d /sys/class/net/wlan* 2>/dev/null); do if [ "$(basename $(readlink $i/device))" == "nrc80211" ]; then basename $i; fi; done)" # echo $WLAN wlan0 }}} After bringing up the interface you can perform more configuration on it via the 'cli_app' (see below) {{{#!bash ifconfig $WLAN up }}} Building: - The driver compiles a single module 'nrc.ko' and can be built out-of-tree by assigning KDIR to the directory of your kernel: {{{#!bash KDIR=/usr/src/venice/bsp/linux make }}} - kernel requirements: CONFIG_CRYPTO_CCM, CONFIG_CRYPTO_GCM, CONFIG_CRYPTO_SEQIV, CONFIG_CRYPTO_CBC, CONFIG_CRYPTO_CTR, CONFIG_CRYPTO_ECB, CONFIG_CRYPTO_AES [=#cli_app] === cli_app There is a 'cli_app' that is part of the driver code which communicates with the driver via the Netlink generic socket family API. Netlink is a Linux kernel interface used for inter-process communication between kernel and userspace similar to unix domain sockets designed for transferring miscellaneous networking information between kernel space and userspace processes. See https://en.wikipedia.org/wiki/Netlink for details. The cli_app facilitates setting misc details that are not handled via iw. The app can be used in interactive mode by running without args or by sending commands. Example usage showing useful features: * interactive mode {{{#!bash # ./cli_app =================================================== Newracom Command Line Application (2.4) =================================================== NRC> help =================================================================================================== help :show CLI tree exit :exit program show version :show version show config [vif_id] :show configuration show edca :show EDCA parameters show uinfo [vif_id] :show UMAC information show ampdu [clear] :show/clear AMPDU count show signal [start|stop] [interval] [number] :show rssi/snr show maxagg :show max aggregation show duty :show duty cycle show autotxgain :show autotxgain show cal_use :show cal_use show bdf_use :show board data use show recovery stats :show recovery show detection stats :show detection show temp :show temp show wakeup_pin :show wakeup pin configuration show wakeup_source :show wakeup source configuration show stats simple_rx :show received packet information show mac clear :clear TX/RX Statistics show mac tx stats :show TX Statistics show mac tx clear :clear TX Statistics show mac rx stats :show RX Statistics show mac rx clear :clear RX Statistics set gi :set guard interval set maxagg {size:default=0}:set aggregation set config :set ack, aggregation, mcs set rc [vif_id] [mode] :set rate control set duty {duty window} {tx duration} {exclude mgmt[0|1]}:set duty cycle set cal_use :set cal_use set bdf_use :set board data use set txpwr :set txpwrt set wakeup_pin {Debounce:on|off} {PIN Number:0~31} :set wakeup pin for deepsleep set wakeup_soruce rtc gpio hspi :set wakeup source for deepsleep set addba [tid] {mac address} :set addba tid / send addba with mac address set delba [tid] {mac address} :set delba tid / send delba with mac address set rts :set rts on/off test mcs :set mcs test country JP or :set/show tx time control for JP(Japan) =================================================================================================== OK NRC> exit =================================================== Exit Newracom Command Line Application =================================================== }}} * show software/hardware version info: {{{#!bash # ./cli_app show version Newracom Firmware Version : 01.03.03 gerrit/master : c977f Board Revision : 7292A OK }}} * set use of board data for tx power levels and calibration: {{{#!bash # ./cli_app set bdf_use on Board Data use : on OK }}} * enable A-MPDU (frame aggregation): {{{#!bash # ./cli_app set maxagg 1 8 -------------------------------- updated aggregation ---------------------------------- AC : BK State : OFF Value : 8 Size : 0 AC : BE State : ON Value : 8 Size : 0 AC : VI State : OFF Value : 8 Size : 0 AC : VO State : OFF Value : 8 Size : 0 --------------------------------------------------------------------------------------- OK root@focal-venice-sta:~# ./cli_app set maxagg 1 on -------------------------------- updated aggregation ---------------------------------- AC : BK State : OFF Value : 8 Size : 0 AC : BE State : ON Value : 8 Size : 0 AC : VI State : OFF Value : 8 Size : 0 AC : VO State : OFF Value : 8 Size : 0 --------------------------------------------------------------------------------------- OK }}} * set guard band interval to long (or short if you wish) {{{#!bash # ./cli_app set gi long guard interval : long OK }}} * enable RF calibration: {{{#!bash # ./cli_app set cal_use on Calibration_use : on Country : US OK }}} For more info see [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-007-Commnad%20line%20application.pdf UG-7292-007-Command line application.pdf] Note that the interface needs to be up. [=#examples] === Configuration and Usage examples 1. Loading drivers: a. lsusb shows GW16046 on bus with VID:0x2beb and PID=0x0146 {{{#!bash # lsusb -d 0x2beb:0x0146 Bus 001 Device 003: ID 2beb:0146 }}} b. Obtain the SPI bus number created by the spi-ft232h driver which has bound to the GW16046 via VID/PID (Note that we save this in the BUSNO env variable which will be used below) {{{#!bash # BUSNO="$(for i in $(ls /sys/class/spi_master/); do if [ "$(basename $(readlink /sys/class/spi_master/$i/device))" == "spi-ft232h.0" ]; then echo $i | sed 's/[^0-9]*//g'; fi; done)" # echo $BUSNO 3 }}} c. Load the NRC7292 driver providing the SPI bus number from above (we use the BUSNO env var here): {{{#!bash # modprobe nrc fw_name=nrc7292_cspi.bin bd_name=nrc7292_bd.dat spi_bus_num=$BUSNO spi_polling_interval=5 hifspeed=30000000 }}} - after several seconds you should see a new wlan device under /sys/class/net d. obtain the wlan device that is bound to the driver (note it takes several seconds after loading the driver module for the device to get registered due to firmware loading and timing) (Note that we save this in the WLAN env variable which will be used below) {{{#!bash # WLAN="$(for i in $(ls -d /sys/class/net/wlan* 2>/dev/null); do if [ "$(basename $(readlink $i/device))" == "nrc80211" ]; then basename $i; fi; done)" # echo $WLAN wlan0 }}} e. bring up the interface (required for configuration below) {{{#!bash # ifconfig $WLAN up }}} 2. Configure miscellaneous parameters via cli_app Netlink tool * enable transmission power controL (TPC) {{{#!bash # cli_app set bdf_use on # enable transmission power control (TPC) Board Data use : on OK }}} * configure frame aggregation {{{#!bash # cli_app set maxagg 1 8 # configure frame aggregation -------------------------------- updated aggregation ---------------------------------- AC : BK State : OFF Value : 8 Size : 0 AC : BE State : OFF Value : 8 Size : 0 AC : VI State : OFF Value : 8 Size : 0 AC : VO State : OFF Value : 8 Size : 0 --------------------------------------------------------------------------------------- OK # cli_app set maxagg 1 on # enable frame aggregation -------------------------------- updated aggregation ---------------------------------- AC : BK State : OFF Value : 8 Size : 0 AC : BE State : ON Value : 8 Size : 0 AC : VI State : OFF Value : 8 Size : 0 AC : VO State : OFF Value : 8 Size : 0 --------------------------------------------------------------------------------------- OK }}} - The Access Category (BK/BE/VI/VO) are based on ToS field in an IP header: * BK: 0x20, 0x28, 0x38, 0x48, 0x58 * BE: 0x00, 0x60, 0x70 * VI: 0x88, 0x90, 0x98, 0xa0, 0xb8 * VO: 0xc0, 0xe0 * configure guard band interval {{{#!bash # cli_app set gi long # set long guard interval guard interval : long OK }}} * configure power calibration {{{#!bash # cli_app set cal_use on # enable power calibration Calibration_use : on Country : US OK }}} - for the Command Line App usage details see [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-007-Commnad%20line%20application.pdf UG-7292-007-Command Line Application.pdf] 3. Configure AP or STA mode: * Define your channel and SSID via env variables (used in scripts below) {{{#!bash SSID=halow_demo CH=161 PSK=12345678 }}} - For Channel mapping details see: [https://github.com/Gateworks/nrc7292/blob/master/package/host/doc/UG-7292-003-S1G_Channel.pdf UG-7292-003-S1G_Channel.pdf] * Open security model: - AP (using WLAN/SSID/CH env variables) {{{#!bash # apt install hostapd # make sure hostapd is installed # /etc/init.d/hostapd stop # make sure its not running # cat << EOF > /tmp/hostapd.conf ctrl_interface=/var/run/hostapd country_code=US interface=$WLAN ssid=$SSID hw_mode=a channel=$CH ieee80211h=1 ieee80211d=1 ieee80211n=1 macaddr_acl=0 driver=nl80211 beacon_int=100 ap_max_inactivity=16780 EOF # hostapd /tmp/hostapd.conf & [1] 1006 Configuration file: /tmp/hostapd.conf rfkill: Cannot open RFKILL control device wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE Using interface wlan0 with hwaddr 84:25:3f:87:fc:b6 and ssid "halow_demo" wlan0: interface state COUNTRY_UPDATE->ENABLED wlan0: AP-ENABLED }}} - STA (using WLAN/SSID env variables) {{{#!bash # cat << EOF > /tmp/wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant country=US network={ ssid="$SSID" scan_ssid=1 key_mgmt=NONE freq_list=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 scan_freq=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 } p2p_disabled=1 EOF # wpa_supplicant -i $WLAN -c /tmp/wpa_supplicant.conf & }}} * WPA2-PSK security - AP (using WLAN/SSID/CH/PSK env variables) {{{#!bash # cat << EOF > /tmp/hostapd.conf ctrl_interface=/var/run/hostapd country_code=US interface=$WLAN ssid=$SSID hw_mode=a channel=$CH ieee80211h=1 ieee80211d=1 ieee80211n=1 macaddr_acl=0 driver=nl80211 beacon_int=100 ap_max_inactivity=16780 wpa=2 wpa_key_mgmt=WPA-PSK wpa_pairwise=CCMP rsn_pairwise=CCMP wpa_passphrase=$PSK EOF # hostapd /tmp/hostapd.conf & }}} - STA (using WLAN/SSID/PSK env variables) {{{#!bash # cat << EOF > /tmp/wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant country=US update_config=1 network={ ssid="$SSID" scan_ssid=1 proto=RSN key_mgmt=WPA-PSK pairwise=CCMP group=CCMP psk="$PSK" freq_list=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 scan_freq=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 } p2p_disabled=1 ignore_old_scan_res=1 EOF # wpa_supplicant -i $WLAN -c /tmp/wpa_supplicant.conf & }}} * WPA3-SEA (see https://en.wikipedia.org/wiki/Simultaneous_Authentication_of_Equals) - AP (using WLAN/SSID/PSK env variables) {{{#!bash # cat << EOF > /tmp/hostapd.conf ctrl_interface=/var/run/hostapd country_code=US interface=$WLAN ssid=$SSID hw_mode=a channel=$CH ieee80211h=1 ieee80211d=1 ieee80211n=1 ieee80211w=2 macaddr_acl=0 driver=nl80211 beacon_int=100 ap_max_inactivity=16780 wpa=2 wpa_key_mgmt=SAE wpa_pairwise=CCMP rsn_pairwise=CCMP wpa_passphrase=$PSK EOF # hostapd /tmp/hostapd.conf & }}} - STA (using WLAN/SSID/PSK env variables) {{{#!bash # cat << EOF > /tmp/wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant country=US update_config=1 network={ ssid="$SSID" scan_ssid=1 proto=RSN key_mgmt=SAE pairwise=CCMP group=CCMP psk="$PSK" ieee80211w=2 freq_list=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 scan_freq=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 } p2p_disabled=1 ignore_old_scan_res=1 EOF # wpa_supplicant -i $WLAN -c /tmp/wpa_supplicant.conf & }}} * WPA3-OWE (see https://en.wikipedia.org/wiki/Opportunistic_Wireless_Encryption) - AP (using WLAN/SSID/PSK env variables) {{{#!bash # cat << EOF > /tmp/hostapd.conf ctrl_interface=/var/run/hostapd country_code=US interface=$WLAN ssid=$SSID hw_mode=a channel=$CH ieee80211h=1 ieee80211d=1 ieee80211n=1 ieee80211w=2 macaddr_acl=0 driver=nl80211 beacon_int=100 ap_max_inactivity=16780 wpa=2 wpa_key_mgmt=OWE wpa_pairwise=CCMP rsn_pairwise=CCMP EOF # hostapd /tmp/hostapd.conf & }}} - STA (using WLAN/SSID/PSK env variables) {{{#!bash # cat << EOF > /tmp/wpa_supplicant.conf ctrl_interface=/var/run/wpa_supplicant country=US update_config=1 pmf=2 network={ ssid="$SSID" scan_ssid=1 proto=RSN key_mgmt=OWE pairwise=CCMP group=CCMP psk="$PSK" ieee80211w=2 freq_list=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 scan_freq=2412 2422 2432 2442 2452 2462 5180 5185 5190 5195 5200 5205 5210 5215 5220 5225 5230 5235 5240 5745 5750 5755 5760 5500 5520 5540 2417 2437 2457 5765 5770 5775 5780 5785 5790 5795 5800 5805 5560 2447 5810 5815 5820 5825 5580 } p2p_disabled=1 ignore_old_scan_res=1 EOF # wpa_supplicant -i $WLAN -c /tmp/wpa_supplicant.conf & }}} ==== Troubleshooting 1. Ensure the device can be seen on the USB bus: {{{#!bash # lsusb -d 0x2beb:0x0146 Bus 001 Device 003: ID 2beb:0146 }}} 1. Ensure the spi_ft232h driver is loaded {{{#!bash # lsmod | grep ft232 spi_ft232h 24576 0 # dmesg | grep ft232 [ 7.555554] usbcore: registered new interface driver spi_ft232h }}} 1. Ensure the spi_ft232h driver has registers a SPI bus: {{{#!bash # ls -l /sys/class/spi_master/ | grep ft232h lrwxrwxrwx 1 root root 0 Aug 31 20:13 spi3 -> ../../devices/platform/soc@0/soc@0:bus@32c00000/32e50000.usb/ci_hdrc.1/usb1/1-1/1-1.3/1-1.3:1.0/spi-ft232h.0/spi_master/spi3 }}}