Software Integration Guide 60-SIPT/60-2230C Introduction This document details how to integrate the Ezurio 60 Series Wi-Fi and Bluetooth Linux software package for the ST60-SIPT and ST60-2230C modules using the Radio Backports package. We recommend you thoroughly analyze each step of the process. Each individual step should be integrated separately and manually tested. Attempting all of the steps at once without testing will likely cause bugs that are difficult to troubleshoot. Integrating a Wi-Fi driver into specific Linux platform code can be challenging and may require platform-specific changes. For help, downloads, and further documentation, please visit Ezurio on GitHub for further assistance. Terminology ST60-2230C - 60 Series Radio on M.2 form factor ST60-SIPT - 60 Series Radio in SIP form factor DVK-ST60-2230C - 60 Series Radio M.2 form factor Development Kit DVK-ST60-SIPT - 60 Series Radio SIP form factor Development Kit RDVK-50 - Ezurio 50 Series Radio Development Kit. Used for the evaluation of all Ezurio radios Scope The scope of this document is limited to providing instruction on where to obtain the Ezurio backports package, how to run the backports package and how to build the Sterling 60 series drivers for your Linux version of choice and their inclusion into your filesystem. It is assumed the reader has an understanding of Linux and building Linux software, the basic operation of the build system employed within the host platform to which the 60 Series radio is utilized. Ezurio recommends the use of Buildroot as a build system for embedded Linux systems. However, the specifics related to your build system are beyond the scope of this document. If you are using Buildroot, please consult the Ezurio RDVK documentation which utilizes a Buildroot distribution. If you are using Open Embedded or Yocto, please consult the documentation regarding those distributions. The remainder of this document assumes that you are using an RDVK-50 as your development platform to evaluate the 60 series radio. You should make the appropriate modifications to suit your development environment. Required Materials The following are required for this integration: Ezurio 60 Series Development Kit with SDIO or PCIE card form factor Host development platform running Linux version 3.0 or greater (if you are using kernel versions prior to 3.18, please contact Ezurio) RDVK-50 or other suitable host processor platform with an available SDIO or PCIE for the WLAN interface and an available UART port for the Bluetooth interface Cautions and Warnings Adhere to all cautions and warnings included with all materials. The 60 Series radio and DVK can be damaged by electrostatic discharge (ESD); handle accordingly. Build Host Linux Distribution and Version This guide was produced using a build host running Ubuntu 18.04.4. While it is possible to use a different version of Ubuntu or an entirely different Linux distribution, doing so may require a different procedure. Build hosts running distributions other than Ubuntu 18.04.4 are beyond the scope of this document. Enabling the Radio Hardware for Operation The radio requires you to de-assert the PCIE_W_DISABLE_N signal to allow the radio to operate. Consult the DVK schematic and user guide for the location of the PCIE_W_DISABLE_N signal. Depending on which DVK you are using this pin is situated on different connectors. If you are using the Radio Development Kit (RDVK_50) from Ezurio, connect a jumper cable between the RDVK-50 development board pin I2C.4 and the following connectors on the DVK: DVK-ST60-2230C - Pin J23.4 DVK-ST60-SIPT - Pin J8.6 If you are using a different development kit such as an MSC-Q7 or iMX.UL, please consult the schematics and documentation for those devices to select a suitable GPIO to control the PCIE_W_DISABLE_N signal. You also need to make the appropriate changes to the device trees for your development board. Modifying the 60 Series Radio DVK for SDR104 Operation By default the 60 series radio DVK boards (DVK-60-SIPT and DVK-60-2230C) have an SDIO bus configured to operate at 3.3v for HS operation. To modify the DVK board for SDR104 operation, the board must be configured to operate at 1.8V. The method required to enable this operation depends on the DVK that being used. On a DVK_SIPT board cut the solder bridge SB4. On a DVK_2230C it is just necessary to ensure that J4 and J7 have been removed. Obtaining Source from GitHub The source for Ezurio’s distribution is available at our publicly facing GitHub repository. The repo contains the firmware binary and driver backports package. Building BackPorts Notes on the wpa-supplicant Ezurio recommends that you use wpa_supplicant 2.9. This is the latest wpa_supplicant available and fixes a great many bugs found in older versions of the supplicant. The 60 series radio has been tested using the wpa_supplicant 2.9. Failures on a customer platform which are related to Wi-Fi performance with a prior version of the supplicant is most likely to be related to the supplicant version being used. Prepare Your Board Support Package Before integrating the Linux software package, disable all device software from attempting to manage the wireless connection. This includes, but is not limited to: NetworkManager, Conman, wpa_supplicant, and others. We also expect that the customer’s platform supplies the DHCP solution for use with the wireless interface. Introduction to Backports Ezurio recommends that you use the LTS 5.10 kernel. However, that isn’t always possible for your processor of choice or development platform. Ezurio uses the Backports package to allow you to take the driver package Ezurio releases, which is tested at a known kernel version (currently Linux kernel version 5.10), and apply the driver in a standard way to the kernel version you are using. The current backports package can used to build the driver for kernel versions between 3.0 and 5.10. Commands to build Backports After extraction, run following commands to cross-compile backport driver modules: set -a CROSS_COMPILE=${CROSS_COMPILE} ARCH=${TARGET_CPU} KLIB_BUILD=${DEV_PATH}/${LINUX_DIR} set +a make defconfig-sterling60 make The following kernel driver modules will be generated by this process and need to be loaded on the target: lrdmwl.ko -------- at ./drivers/net/wireless/summit/lrdmwl/ lrdmwl_sdio.ko --- at ./drivers/net/wireless/summit/lrdmwl/ lrdmwl_usb.ko ---- at ./drivers/net/wireless/summit/lrdmwl/ lrdmwl_pcie.ko --- at ./drivers/net/wireless/summit/lrdmwl/ mac80211.ko ------ at ./net/mac80211/ cfg80211.ko ------ at ./net/wireless/ compat.ko -------- at ./compat/ Running the 60 Series Driver Plug in the USB cable from USB2 on the RDVK-50 development kit to the USB port on your laptop, and confirm your serial port assignment is correct. Using dmesg to log the output from the RDVK-50, you should see indications that the USB serial device is recognized and the enumeration of the USB device corresponding to the RDVK-50. It should indicate something resembling the following: FTDI USB Serial Device converter now attached to ttyUSB0 The lrdmwl driver expects firmware to be in /lib/firmware/lrdmwl/ on the target. The firmware can be found in the backports-summit-X.Y.Z tarball. The software should connect to all security types supported by the wpa_supplicant and have normal throughput. Insert the SDIO adapter into the SD slot. Confirm that wlan0 is present by looking at the output of the command ip addr. To load the Wi-Fi drivers, use the following commands: insmod compat/compat.ko insmod net/wireless/cfg80211.ko insmod net/mac80211/mac80211.ko insmod drivers/net/wireless/summit/lrdmwl/lrdmwl.ko insmod drivers/net/wireless/summit/lrdmwl/lrdmwl_sdio.ko Bluetooth The Ezurio driver also provides support for Bluetooth on the 60 Series radio, including downloading the Bluetooth firmware over the primary interface and establishing a connection over the Bluetooth interface. Loading the Bluetooth driver To load the Bluetooth drivers and bring up the BT interface, type the following at the prompt on the RDVK-50: insmod net/bluetooth/bluetooth.ko insmod drivers/bluetooth/hci_uart.ko hciattach /dev/ttyUSB0 any 3000000 1 You can confirm that the BT interface is present and has been assigned a MAC address by typing the following: hciconfig Next, bring up the HCI interface as follows: hciconfig hci0 up You can now use the hcitool to operate the BT interface. Typing the command hcitool will provide a list of available commands. LE Transmit Power Reduction In some instances it may be necessary to reduce the BLE transmit power in order to stay in compliance with local regulatory requirements. The following HCI Command can be used to reduce the BLE transmit power. hcitool -i hci0 cmd <OGF> <OCF> <POWER> Param Value OGF 0x3F OCF 0x0087 POWER 0x05 (dBm) Example: hcitool -i hci0 cmd 0x3f 0x0087 0x05 Known compatibility issues libmtp libmtp is a library implementation of Microsoft’s Media Transfer Protocol for USB media players and phones for the Linux operating system. libmtp automatically probes USB devices in certain device classes, and this probing action could interfere with the download of firmware to the 60 series radios when configured for the USB interface. If libmtp is to be installed on your device, you may need to blacklist the 60 series in the libmtp udev rules to prevent firmware download failure. This can be done by adding the following lines to /lib/udev/rules.d/69-libmtp.rules on your target device: # Exclude Ezurio 60 series radio ATTR{idVendor}=="1286", ATTR{idProduct}=="2052", GOTO=