54
GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 – 2018-02-13

GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 – 2018-02-13

Page 2: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 2 of 54 2018-02-13

TELIT MAY MAKE CHANGES TO SPECIFICATIONS AND PRODUCT

DESCRIPTIONS AT ANY TIME, WITHOUT NOTICE.

NOTICES

LIMITATION OF LIABILITY

While reasonable efforts have been made to assure the accuracy of this document, Telit assumes no liability resulting from any inaccuracies or omissions in this document, or from use of the information obtained herein. The information in this document has been carefully checked and is believed to be reliable. However, no responsibility is assumed for inaccuracies or omissions. Telit reserves the right to make changes to any products described herein and reserves the right to revise this document and to make changes from time to time in the content hereof with no obligation to notify any person of revisions or changes. Telit does not assume any liability arising out of the application or use of any product, software, or circuit described herein; neither does it convey license under its patent rights or the rights of others.

It is possible that this publication may contain references to, or information about Telit products (machines and programs), programming, or services that are not announced in your country. Such references or information must not be construed to mean that Telit intends to announce such Telit products, programming, or services in your country.

Telit assumes no liability whatsoever, and disclaims any express or implied warranty, relating to sale and/or use of Telit products including liability or warranties relating to fitness for a particular purpose, merchantability, or infringement of any patent, copyright or other intellectual property right. Telit products are not authorized for use as critical components in medical, lifesaving, or life-sustaining applications.

COPYRIGHT

This Telit manual and contents are owned by Telit and/or its licensors and protected by U.S. and international copyright laws, conventions, and treaties. Your right to use this manual is subject to limitations and restrictions imposed by applicable licenses and copyright laws. Unauthorized reproduction, modification, distribution, display or other use of this manual may result in criminal and civil penalties.

This instruction manual and the Telit products described in this instruction manual may be, include or describe copyrighted Telit material, such as computer programs stored in semiconductor memories or other media. Laws in Italy and other countries preserve for Telit and its licensors certain exclusive rights to copyright material, including the exclusive right to copy, reproduce in any form, distribute and make derivative works of the copyrighted material. Accordingly, any copyrighted material of Telit and its licensors contained herein or in the Telit products described in this instruction manual may not be copied, reproduced, distributed, merged or modified in any manner without the express written permission of Telit. Furthermore, the purchase of Telit products shall not be deemed to grant either directly or by implication, estoppel, or otherwise, any license under the copyrights, patents or patent applications of Telit, as arises by operation of law in the sale of a product.

Page 3: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13

USAGE AND DISCLOSURE RESTRICTIONS

I. License Agreements

The software described in this document is the property of Telit and its licensors. It is furnished by express license agreement only and may be used only in accordance with the terms of such an agreement.

II. Copyrighted Materials

Software and documentation are copyrighted materials. Making unauthorized copies is prohibited by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system, or translated into any language or computer language, in any form or by any means, without prior written permission of Telit.

III. High Risk Materials

Components, units, or third-party products used in the product described herein are NOT fault-tolerant and are NOT designed, manufactured, or intended for use as on-line control equipment in the following hazardous environments requiring fail-safe controls: the operation of Nuclear Facilities, Aircraft Navigation or Aircraft Communication Systems, Air Traffic Control, Life Support, or Weapons Systems (High Risk Activities). Telit and its supplier(s) specifically disclaim any expressed or implied warranty of fitness for such High-Risk Activities.

IV. Trademarks

Telit, Telit and stylized Logos are registered Trademarks. All other product or service names are the property of their respective owners.

V. Third Party Rights

The software may include Third Party Right software. In this case, you agree to comply with all terms and conditions imposed on you in respect of such separate software. In addition to Third Party Terms, the disclaimer of warranty and limitation of liability provisions in this License shall apply to the Third Party Right software.

TELIT HEREBY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED FROM ANY THIRD PARTIES REGARDING ANY SEPARATE FILES, ANY THIRD PARTY MATERIALS INCLUDED IN THE SOFTWARE, ANY THIRD PARTY MATERIALS FROM WHICH THE SOFTWARE IS DERIVED (COLLECTIVELY “OTHER CODE”), AND THE USE OF ANY OR ALL THE OTHER CODE IN CONNECTION WITH THE SOFTWARE, INCLUDING (WITHOUT LIMITATION) ANY WARRANTIES OF SATISFACTORY QUALITY OR FITNESS FOR A PARTICULAR PURPOSE.

NO THIRD PARTY LICENSORS OF OTHER CODE SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND WHETHER MADE UNDER CONTRACT, TORT OR OTHER LEGAL THEORY, ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE OTHER CODE OR THE EXERCISE OF ANY RIGHTS GRANTED UNDER EITHER OR BOTH THIS LICENSE AND THE LEGAL TERMS APPLICABLE TO ANY SEPARATE FILES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

www.Telit.com

Page 4: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 4 of 54 2018-02-13

CONTENTS

NOTICES…………. ........................................................................................... 2

LIMITATION OF LIABILITY ............................................................................. 2

COPYRIGHT ..................................................................................................... 2

USAGE AND DISCLOSURE RESTRICTIONS ................................................ 3

CONTENTS ...................................................................................................... 4

1. INTRODUCTION ............................................................................ 7

1.1. Scope ............................................................................................. 7

1.2. Audience ........................................................................................ 7

1.3. Contact Information and Support ................................................... 7

1.4. Text Convention ............................................................................. 7

1.5. Related Documents ........................................................................ 8

2. HARDWARE AND SOFTWARE COMPONENTS ......................... 9

2.1. Hardware Components .................................................................. 9

2.1.1. Linux Host ...................................................................................... 9

2.1.2. GS2K Modules ............................................................................. 10

2.1.3. SDIO Interconnect ........................................................................ 10

2.2. Software Components .................................................................. 10

2.2.1. Linux Application .......................................................................... 10

2.2.1.1. WPA Supplicant ............................................................................ 10

2.2.1.2. Hostapd ........................................................................................ 11

2.2.1.3. WPA CLI ....................................................................................... 11

2.2.1.4. Hostapd CLI .................................................................................. 11

2.2.1.5. UserApp ........................................................................................ 11

2.2.2. Telit Wi-Fi NIC Applications .......................................................... 11

2.2.2.1. OTHFU Application ...................................................................... 11

2.2.2.2. RF Test Tool ................................................................................. 11

2.2.3. Linux Kernel ................................................................................. 11

2.2.4. GS2K Wi-Fi Driver ........................................................................ 11

2.2.5. GS2K Firmware ............................................................................ 11

2.3. Software Package ........................................................................ 12

3. REFERENCE PLATFORM .......................................................... 13

3.1. X86 PC Host Platform .................................................................. 13

Page 5: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 5 of 54 2018-02-13

3.2. Arm Cortex A9 Embedded Platform ............................................. 13

3.3. GS2K SDIO Wi-Fi Adapter Board(WAB) ...................................... 13

4. BUILDING AND LOADING THE SOFTWARE ............................ 15

4.1. GS2K Linux Package ................................................................... 15

4.2. X86 PC Platform ........................................................................... 15

4.2.1. Building the Kernel and Loading the Host .................................... 15

4.2.2. Building the Driver ........................................................................ 15

4.2.3. Preparing the Test Setup ............................................................. 15

4.2.4. Load and Run the Driver .............................................................. 15

4.3. ARM Cortex A9 Embedded Platform ............................................ 15

4.3.1. Building the kernel and Driver, loading the Host .......................... 15

4.3.2. Preparing the Test Setup ............................................................. 16

4.3.3. Loading and Running the Driver ................................................... 16

5. WIRELESS NETWORK OPERATIONS ...................................... 17

5.1. Steps to load the GS2K Wi-Fi module during boot time: .............. 17

5.2. GS2K WLAN interface details ...................................................... 17

5.3. STA Mode .................................................................................... 17

5.4. AP Mode ....................................................................................... 19

5.5. Throughput measurement ............................................................ 22

5.5.1. UDP throughput Test procedure in station mode ......................... 22

5.5.2. TCP throughput Test procedure in station mode .......................... 23

6. OVER THE HOST FIRMWARE UPDATE .................................... 24

6.1. GS2K OTHFU Application ............................................................ 24

6.2. Compiling and building the application ......................................... 25

6.3. Build requirements: ...................................................................... 25

6.4. Typical command sequence for OTHFU ...................................... 25

7. RF TEST COMMANDS ................................................................ 26

7.1. GS2K RF Test Application............................................................ 26

7.2. Compiling and building the application ......................................... 27

7.3. Build requirements ....................................................................... 27

7.4. Typical command sequence for RF TEST.................................... 27

APPENDIX A: DOWNLOADING, BUILDING AND INSTALLING LINUX KERNEL ON X86 UBUNTU ................................................................................................. 29

A.1 Get the source code ..................................................................... 29

A.2 Building the kernel ........................................................................ 33

A.3 Installing and booting the kernel ................................................... 33

Page 6: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 6 of 54 2018-02-13

APPENDIX B: BUILDING AND INSTALLING LINUX KERNEL AND DRIVER ON NXP I MX6 EMBEDDED HOST ................................................................................ 34

B.1 Bringing up the NXP IMX6 EVK Board: ........................................ 34

B.2 Setting up the SD card ................................................................. 36

APPENDIX C: RF TEST COMMAND AND ARGUMENT DESCRIPTION ..... 38

C.1 Regulatory and Transmit Tests using RF Test Commands .......... 38

C.1.1 Regulatory Testing ....................................................................... 38

C.1.2 Transmit Testing ........................................................................... 38

C.1.3 Gain Control Table ....................................................................... 38

C.1.4. Start RF Test ................................................................................ 38

C.1.5. Stop RF Test ................................................................................ 38

C.1.6. Asynchronous Frame Transmission ............................................. 38

C.1.7 Start Asynchronous Frame Reception .......................................... 41

C.1.8 Stop Asynchronous Frame Reception .......................................... 43

C.1.9 Asynchronous Frame Transmission (TX99 mode) ....................... 44

C.1.10. Asynchronous Frame Transmission (TX100 mode) ..................... 49

APPENDIX D: PROGRAMMING SETUP - GAINSPAN WAB BOARD ......... 52

DOCUMENT HISTORY .................................................................................. 53

Page 7: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 7 of 54 2018-02-13

1. INTRODUCTION

1.1. Scope

This user guide provides information required to install and evaluate Telit Wi-Fi NIC driver for Linux hosts with GS2K modules. It also provides guidelines for using firmware update and RF test commands.

1.2. Audience

This document is intended for Telit customers, who are integrators and about to implement their applications using Telit Wi-Fi NIC module.

1.3. Contact Information and Support

For general contact, technical support services, technical questions and report documentation errors contact Telit Technical Support at:

[email protected]

Alternatively, use:

http://www.telit.com/support

For detailed information about where you can buy the Telit modules or for recommendations on accessories and components visit:

http://www.telit.com

Our aim is to make this guide as helpful as possible. Keep us informed of your comments and suggestions for improvements.

Telit appreciates feedback from the users of our information.

1.4. Text Convention

Danger – This information MUST be followed or catastrophic equipment failure or bodily injury may occur.

Caution or Warning – Alerts the user to important points about integrating the module, if these points are not followed, the module and end user equipment may fail or malfunction.

Page 8: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 8 of 54 2018-02-13

Tip or Information – Provides advice and suggestions that may be useful when integrating the module.

All dates are in ISO 8601 format, i.e. YYYY-MM-DD.

1.5. Related Documents

Please refer to http://www.telit.com/gnss/ for current documentation and downloads.

Page 9: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 9 of 54 2018-02-13

2. HARDWARE AND SOFTWARE COMPONENTS

This chapter describes the components and procedures for building a wireless application with Linux host and Telit Wi-Fi NIC module.

The GS2K chipset implements 802.11 b/g/n MAC+PHY functionality. It integrates complete MAC, PHY and RF functionality on a single chip providing a low cost and easy-to-use solution for adding wireless connectivity to applications.

GS2K based modules (GS2200M and GS2101M) integrate GS2K chipset and required components like crystals, regulators, RF front end components to provide ready-to-use WLAN radio modules that can be used as NIC cards to provide network connectivity to hosts. These modules are regulatory, certified and calibrated for easy integration and build applications instantly without requiring any work on radio connectivity modules.

GS2K based modules provides host interface over SDIO, SPI and UART for connecting a variety of hosts. The SDIO interface provides high speed interconnection for bigger host systems that are based on processors with 32-bit CPU and MMU which run on Linux operating systems. The Linux host implements the GS2K drivers, the network stack, the supplicant and authenticator 802.11 security and the applications. It also communicates with GS2K modules over SDIO.GS2K modules implements commands and functionality to support Linux network API.

Standard Linux applications like “wpa_supplicant” and “hostapd” are used for control path and standard Linux data path is used for data communications requiring no custom software. Custom applications are used only for device firmware update and RF test as they are not part of standard Linux offerings.

NOTE:

SPI, UART interface currently not supported.

2.1. Hardware Components

The following diagram illustrates the hardware components:

The description to the hardware components are as follows:

2.1.1. Linux Host

The Linux host can be any processor system that can run standard Linux software. It can be a high end X86 PC or an embedded platform like i.MX6SLL. The host processor is selected by customer.

Linux Host

(e.g., X86 PC, i.MX6SLL)

GS2K Module

(GS2200MIZ, GS2101MIP, etc)

SDIO interconnect

Page 10: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 10 of 54 2018-02-13

2.1.2. GS2K Modules

GS2K modules acts as NIC card, it is based on GS2K chipset and supports all GS2K modules.

2.1.3. SDIO Interconnect

The SDIO interconnect provides connectivity between the host and GS2K processor.

2.2. Software Components

The following diagram illustrates the software components being used. Telit Wi-Fi NIC host software is provided along with the package – which is required to be installed in a directory and built (discussed in the coming chapters).

2.2.1. Linux Application

Standard Linux applications are used for network connection setup and management. Following are the standard Linux application:

2.2.1.1. WPA Supplicant

“wpa_supplicant” is a WPA supplicant for Linux, BSD, Mac OS X, and Windows with WPA and WPA2 (IEEE 802.11i / RSN) support. It is suitable for both desktop/laptop computers and embedded systems. Supplicant is IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator, controls the roaming and IEEE 802.11 authentication/association of WLAN driver.

Sockets Data i/f NL80211 Ctl i/f

Wpa_cli

hostapd_cli OTHFU App RF Test App User App

Wpa_supplicant Hostapd

User Space

Kernel Space

CFG80211

NW Stack

GS2K Wi-Fi SDIO Driver

CFG80211 Linux Host

GS2K Module

GS2K Firmware

SDIO i/f

= Telit Wi-Fi NIC Software

= User Software

= Standard Linux Sw

Page 11: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 11 of 54 2018-02-13

2.2.1.2. Hostapd

“hostapd” is a user space daemon for access point and authentication servers. It implements IEEE 802.11 access point management, IEEE 802.1X/WPA/WPA2/EAP Authenticators, RADIUS client, EAP server, and RADIUS authentication server.

2.2.1.3. WPA CLI

“wpa_cli” is a text-based frontend program interacting with “wpa_supplicant”. It is used to get the current status, change configuration, trigger events, and request interactive user input.

2.2.1.4. Hostapd CLI

“hostapd_cli” utility is a text-based frontend program for interacting with hostapd.

2.2.1.5. UserApp

“UserApp” makes use of networking services to setup socket connections and perform data transfer.

2.2.2. Telit Wi-Fi NIC Applications

2.2.2.1. OTHFU Application

OTHFU application provides over-the-host firmware update facility for GS2K firmware. Applications. GS2K firmware is updated using this application. (Refer Chapter - 6 Over the Host Firmware Update).

2.2.2.2. RF Test Tool

RF test tool application provides commands for testing and evaluating GS2K radio. It provides commands for frame transmission and reception (Refer Chapter – “7 RF Test commands”).

2.2.3. Linux Kernel

Standard Linux kernel is used without any customizations.

2.2.4. GS2K Wi-Fi Driver

GS2K Wi-Fi driver is a kernel module provided by Telit. This module implements driver for interfacing Linux kernel network control and data path to GS2K Wi-Fi device. It interprets commands and messages between Linux kernel and GS2K. It also performs queuing and flow control.

It contains SDIO driver adaptation layer for communication between Linux kernel and GS2K SDIO device over SDIO interconnect. It implements probe, interrupt handling and buffer management.

2.2.5. GS2K Firmware

GS2K firmware is loaded on GS2K module. It is programmed and run on GS2K providing IEEE 802.11 Full MAC functionality. It handles scan, association and data transfer functionality and implements MAC features like rate adaptation, client power-save, AP mode inactivity tracking, AP mode power save buffering, etc. It also provides firmware update and RF test functionality, and is considered as a single binary image that is loaded into GS2K module flash.

Page 12: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 12 of 54 2018-02-13

2.3. Software Package

Telit Wi-Fi NIC software package “gs2k_wifi_nic.tar.gz” consists of Telit Wi-Fi NIC software components and few tools.

Following are the software package contents:

1. fw – gs2k fw single image binary 2. drv - contains driver files and make file 3. apps

a. othfu – contains othfu app source files and makefile b. rftest – contains rftest app source files and makefile

4. wpa_supplicant – contains sample configuration files 5. hostapd – contains sample configuration files 6. tools – contains “gs_flashprogrammer” and any other tools if required.

Page 13: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 13 of 54 2018-02-13

3. REFERENCE PLATFORM

This chapter describes the reference platform used to demonstrate the solution, the setup and applications used.

The Linux solution is demonstrated using a reference platform setup. Two Linux host platforms are used, one PC host and the other is embedded host. The GS2K target board is same in both cases and is described as follows:

3.1. X86 PC Host Platform

“Lenovo Thinkpad T440p” laptop is used for X86 PC host running Ubuntu 16.4 and Linux Kernel version 4.9.11. This machine has a SD card slot to plug the GS2K target board for testing.

3.2. Arm Cortex A9 Embedded Platform

i.MX6SLL application processor is a single Arm® Cortex®-A9, which operates at speed upto 800 MHz. Products based on the i.MX6SLL application processors enables cost effective, rapid development of multimedia applications for Android® and Linux® operating systems. This board has a SD card slot to plug GS2K target board for testing.

3.3. GS2K SDIO Wi-Fi Adapter Board(WAB)

GS2K SDIO Wi-Fi Adapter Board (WAB) is a GS2101MIP module based hardware adapter board that is interfaced using the SDIO interface of a Linux host processor.

The following diagram shows the i.MX6SLL board and GS2K SDIO WAB.

Page 14: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 14 of 54 2018-02-13

GS2K SDIO WAB is plugged into SD card slot on laptop for testing.

Page 15: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 15 of 54 2018-02-13

4. BUILDING AND LOADING THE SOFTWARE

This chapter provides the steps for building GS2K Linux drivers, loading and running them on a reference platform.

4.1. GS2K Linux Package

This step is common for all Linux host platforms.

1. Create a folder called “telit”.

mkdir ~/telit

2. Copy “gs2k_wifi_nic.tar.gz” package into this directory. 3. Unzip the package using following command.

tar xvf gs2k_wifi_nic.tar.gz

4.2. X86 PC Platform

Following are the steps for building, loading and running GS2K Linux drivers on X86 host reference platform.

4.2.1. Building the Kernel and Loading the Host

On X86 platform, the host and development system are the same and hence it is not required to setup a cross-compilation environment. Ubuntu 16.4 with Linux kernel version 4.9.11 is required on X86 PC.

Check the Linux Kernel version by issuing the command “uname -r”. If Linux kernel version is already installed - then just build the driver, install and test it with instructions in following sections. If the Linux kernel version is not installed – then download, build and install the kernel on Ubuntu (Refer - Appendix A: Downloading, Building and Installing Linux Kernel on x86 Ubuntu).

4.2.2. Building the Driver

1. Go to “~/telit/gs2k_wifi_nic/drv” 2. Build the driver

4.2.3. Preparing the Test Setup

Program GS2K WAB with GS2K firmware provided in ‘fw’ folder of the package using the flash programmer tool.

Refer “Appendix D: Programming Setup - GainSpan WAB Board” for preparing the test setup and for programming steps using flash programmer refer “GS2K Module Programming User Guide”.

4.2.4. Load and Run the Driver

Follow the procedures mentioned in Chapter: “5 Wireless Network Operations” to load and setup wireless connection and perform data transfer.

4.3. ARM Cortex A9 Embedded Platform

Following are the steps for building, loading and running GS2K Linux drivers for ARM Cortex A9 host reference platform:

4.3.1. Building the kernel and Driver, loading the Host

The GS2K driver is tested with Linux kernel version 4.9.11. If the complete setup for i.MX6SLL board including cross-compile environment, building the bootloader, kernel and root filesystem and loading them on host board already exists then - simply include the driver in the build procedure and follow the procedures mentioned in Chapter - “5

Page 16: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 16 of 54 2018-02-13

Wireless Network Operations” to install and test. If the complete setup is not present then – follow the procedures mentioned in “Appendix B: Building and Installing Linux Kernel and Driver on NXP i MX6 Embedded Host” to download, build and install the kernel, root filesystem and GS2K driver.

4.3.2. Preparing the Test Setup

Program GS2K WAB with GS2K firmware provided in ‘fw’ folder of the package using the flash programmer tool.

Refer “Appendix D: Programming Setup - GainSpan WAB Board” for preparing the test setup and for programming steps using flash programmer refer “GS2K Module Programming User Guide”.

4.3.3. Loading and Running the Driver

Follow the procedures mentioned in Chapter - “5 Wireless Network Operations” to load and setup wireless connection and perform data transfer.

Page 17: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 17 of 54 2018-02-13

5. WIRELESS NETWORK OPERATIONS

This chapter provides step by step procedure to setup wireless network connectivity and perform data transfer.

Prepare the system (refer Chapter – “4 Building and loading the software”) before configuring the WLAN interface.

Following are the steps to connect to the wireless network and test data transfer, once the WLAN interface is configured:

NOTE:

Configuration instructions are only for reference and contain typical example. For more details refer – “Linux documentation”.

5.1. Steps to load the GS2K Wi-Fi module during boot time:

• Compile GS2K module (refer: - 4.2.2Building the Driver) and place the module file “gs2k_sdio.ko” in “/lib/modules/$(uname -r)/kernel/drivers/net”

• Open the file “/etc/modules” and write “gs2k_sdio” in it.

• Run the command “depmod -a ”

• And run the command “sudo update-initramfs -u”

• Once the above commands are successfully executed the at every restart the

GS2K Wi-Fi module will be automatically loaded.

• Run command “lsmod | grep” for gs2k to check whether “gs2k_sdio” is currently

loaded.

5.2. GS2K WLAN interface details

The following command is used to find the physical device corresponding to GS2K WLAN interface:

iw dev

The following command is used to check the features and commands supported by all devices:

iw phy

5.3. STA Mode

Following are the steps to configure and test wireless interface in station mode:

1. Configure DHCP

a) Open configuration file and make sure DHCP is enabled.

>vi /etc/network/interfaces

File should contain below two lines:

auto wlan0

iface wlan0 inet dhcp

b) Restart networking

Page 18: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 18 of 54 2018-02-13

> /etc/init.d/networking restart

2. Create or update the configuration file.

Typical configuration file contains the following references:

a) Open Mode (for example sta_open_con.conf file)

ctrl_interface=/run/wpa_supplicant

update_config=1

network={

ssid="MY_AP_OPEN"

scan_ssid=1

key_mgmt=NONE

} b) AES security (for example sta_aes_con.conf file)

ctrl_interface=/run/wpa_supplicant

update_config=1

network={

ssid="MY_AP_AES"

scan_ssid=1

key_mgmt=WPA-PSK

psk="GSDemo123"

proto=RSN

pairwise=CCMP

group=CCMP

} c) Mixed mode (for example sta_mixed_con.conf file)

ctrl_interface=/run/wpa_supplicant

update_config=1

network={

ssid="MY_AP_MIXED"

proto=RSN

key_mgmt=WPA-PSK

pairwise=CCMP

group=TKIP

psk="GSDemo123"

}

3. Terminate wpa_supplicant (if its running)

>sudo killall wpa_supplicant

Page 19: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 19 of 54 2018-02-13

>sudo rfkill unblock wifi

4. Bring up GS2K Wi-Fi module

Check whether GS2K Wi-Fi module is already installed.

>lsmod | grep gs2k

If above command does not list gs2k_sdio, then load the module manually.

Go to the directory in which GS2K Wi-Fi NIC driver installed.

>cd ~/telit/gs2k_wifi_nic/drv

>sudo insmod gs2k_sdio.ko

5. Discover the n/w interface

>ip a

or

>ifconfig

6. Start wpa_supplicant and initiate connection (use the required conf file)

For example:

> wpa_supplicant -B -i wlan0 nl80211 -c sta_open_con.conf

> wpa_supplicant -B -i wlan0 nl80211 -c sta_aes_con.conf

> wpa_supplicant -B -i wlan0 nl80211 -c sta_mixed_con.conf

7. To check the IP address and status:

> ifconfig wlan0

8. If needed disable power save feature

>sudo iw dev wlan0 set power_save off

>sudo iw dev wlan0 get power_save

9. If required start wpa_cli application

> wpa_cli -i wlan0

10. Test data transfer using ping

>ping <AP IP address>

5.4. AP Mode

Following are the steps to configure and test wireless interface in AP mode:

1. Configure DHCP server

1.1. Assign static IP

Page 20: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 20 of 54 2018-02-13

a) Open configuration file and make sure static configuration.

> vi /etc/network/interfaces

File content:

auto wlan0

iface wlan0 inet static

address 10.0.0.1

netmask 255.255.255.0

gateway 10.0.0.1

b) restart networking

> /etc/init.d/networking restart

1.2. Open dhcp configuration file and modify if required

> vi /etc/dhcp/dhcpd.conf

Sample configuration given below:

ddns-update-style none;

ignore client-updates;

authoritative;

option routers 10.0.0.1;

option subnet-mask 255.255.255.0;

option broadcast-address 10.0.0.255;

option domain-name-servers 10.0.0.1,8.8.8.8,8.8.4.4;

option time-offset 0;

default-lease-time 1209600;

max-lease-time 1814400;

subnet 10.0.0.0 netmask 255.255.255.0 {

range 10.0.0.3 10.0.0.13;

}

2. Start DHCP Server

> sudo service isc-dhcp-server restart

OR

> sudo service isc-dhcp-server start

3. Start DHCP server ane select the interface to start DHCP server. Open the file

“/etc/default/isc-dhcp-server” and write INTERFACES="wlan0"

4. Create or update the conf file

Typical configuration file contains the following references:

Page 21: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 21 of 54 2018-02-13

a) Open Mode ( hostapd_open.conf)

interface=wlan0 driver=nl80211 ssid=Test_AP_OPEN channel=11 hw_mode=g ieee80211n=1

b) AES security (hostapd_aes.conf)

interface=wlan0

driver=nl80211

ssid=Test_AP_AES

channel=11

hw_mode=g

ieee80211n=1

wpa=2

wpa_passphrase=GSDemo123

wpa_key_mgmt=WPA-PSK

rsn_pairwise=CCMP

c) TKIP security (hostapd_tkip.conf)

interface=wlan0

driver=nl80211

ssid=Test_AP_TKIP

channel=11

hw_mode=g

ieee80211n=1

wpa=2

wpa_passphrase=GSDemo123

wpa_key_mgmt=WPA-PSK

wpa_pairwise=TKIP d) Mixed mode (hostapd_mixed.conf)

interface=wlan0

driver=nl80211

ssid=Test_AP_MIXED

channel=11

hw_mode=g

ieee80211n=1

wpa=2

wpa_passphrase=GSDemo123

wpa_key_mgmt=WPA-PSK

rsn_pairwise=CCMP TKIP

Page 22: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 22 of 54 2018-02-13

5. Terminate wpa_supplicant (if its running)

>sudo killall wpa_supplicant

>sudo rfkill unblock wifi

6. Bring up GS2K Wi-Fi module

a. Check GS2K Wi-Fi module is installed or not.

>lsmod | grep gs2k

If above issued command does not list “gs2k_sdio”, then load the module manually.

b. Go to the directory in which GS2K Wi-Fi driver installed.

>cd ~/telit/gs2k_wifi_nic/drv

>sudo insmod gs2k_sdio.ko

7. Start hostapd (use the required conf file)

For example:

> sudo hostpd -B -dd hostapd_open.conf

> sudo hostpd -B -dd hostapd_aes.conf

> sudo hostpd -B -dd hostapd_mixed.conf

> sudo hostpd -B -dd hostapd_tkip.conf

8. Start CLI application

> sudo hostapd_cli

9. Connect a client to this AP in wpa-psk security mode with above passphrase and

run ping.

5.5. Throughput measurement

iPerf is a tool used to measure the maximum TCP/UDP throughput.

For peak performance, tests are conducted in RF chamber or in a less crowded environment.

5.5.1. UDP throughput Test procedure in station mode

• Bring up GS2K Wi-Fi NIC module (say STA#1) and connect to an AP

• Connect one of the PC/Laptop (say STA#2) to the same AP through an ethernet

cable

• Disable power save in STA#1

>sudo iw dev wlan0 set power_save off

• Start UDP server in STA#2

iperf -s -u

Page 23: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 23 of 54 2018-02-13

• Ping STA#2 and make sure the link is up and ARP is resolved.

• Now issue the following command in STA#1

>iperf -u -c <IP address of STA#2> -t 60 -b 100m

5.5.2. TCP throughput Test procedure in station mode

• Bring up GS2K Wi-Fi NIC module (say STA#1) and connect to an AP

• Connect one of the PC/Laptop (say STA#2) to same AP through ethernet cable

• Disable power save in GS2K Wi-Fi NIC

>sudo iw dev wlan0 set power_save off

• Start TCP server in Laptop.

iperf -s

• Now issue the following command in STA#1

>iperf -c <IP address of STA#2> -t 60

Page 24: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 24 of 54 2018-02-13

6. OVER THE HOST FIRMWARE UPDATE

This chapter describes the procedure to setup and perform GS2K firmware update using the OTHFU application provided in the package.

6.1. GS2K OTHFU Application

‘gs2k_othfu’ is a service tool for GS2K firmware upgrade. It is generic netlink based CLI utility that allows GS2K device firmware to be updated by Host MCU. Host MCUs updates the node with OTHFU application.

The command syntax to invoke this application is as follows:

>. /gs2k_othfu <device> <image_type> <file_name>

This command is used to upload the firmware.

device: Wi-Fi device Name (for example wlan0).

To find available list of devices, issue command "iw dev".

Image Type:

1 – Single Image

file_name: Image Name

For a successful firmware update:

Once single image is successfully downloaded, following message is printed:

OTHFU STATUS:SUCCESS

Firmware download success

For a Failed firmware update:

If any error (parsing error, error writing to flash) occurs the following message for the corresponding error message are:

1. Unable to handle firmware update:

OTHFU STATUS:ERROR

ERROR:Firmware download failed

2. Command rejected by the driver due to invalid parameters:

OTHFU STATUS: INVALID PARAMETER

ERROR: Firmware download failed

3. Firmware update failed due to flash access error in GS2K device:

OTHFU STATUS:FLASH WRITE ERROR

ERROR:Firmware download failed

4. Error occurred while downloading the firmware chunk:

OTHFU STATUS:OTHFU FAILED

ERROR:Firmware download failed

5. Time out while waiting for firmware download response from GS2K device:

OTHFU STATUS:OTHFU TIMEOUT ERROR

ERROR:Firmware download failed

Page 25: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 25 of 54 2018-02-13

>./gs2k_othfu --help

NOTE:

a) Ensure the image is available in the current directory or the complete path is provided.

b) Ensure “wpa_supplicant” or “hostapd” is not running. Terminate any of the applications which uses nl80211.

c) This utility tool requires admin privilege to run using “sudo”.

6.2. Compiling and building the application

To build “gs2k_othfu”, go to application directory and just enter 'make'.

6.3. Build requirements:

libnl >= libnl1

libnl-dev >= libnl-dev-1

pkg-config

“libnl” is required while using OTHFU - the first working version is 1.0 pre8 as this release introduced “genl”, Generic Netlink, which relies on “nl80211”.

If the “libnl” version is wrong then download and compile with the following steps:

Install libnl-dev using the following command:

sudo apt-get install libnl-dev

or

sudo apt-get install libnl-3-dev

6.4. Typical command sequence for OTHFU

1. Terminate wpa_supplicant

>sudo killall wpa_supplicant

>sudo rfkill unblock wifi

2. Bring up GS2K Wi-Fi module

Go to the directory in which GS2K Wi-Fi driver installed (driver/gs2k/).

>sudo insmod gs2k_sdio.ko

3. Initiate firmware update

Go to the directory in which OTHFU userapp installed.

>sudo ./gs2k_othfu wlan0 1 gs2000_singleimage.bin

Page 26: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 26 of 54 2018-02-13

7. RF TEST COMMANDS

This chapter describes the procedure to run RF tests with RF test application provided in the package.

7.1. GS2K RF Test Application

'gs2k_rftest' is the utility tool for RF testing of GS2K driver. It is Generic Netlink based CLI utility for GS2K RF testing that allows host to send RF Test commands to GS2K device.

NOTE:

a) Make sure wpa_supplicant or hostapd is not running in the system. Terminate any of the applications which uses nl80211.

b) This utility tool requires admin privilege to run using “sudo”.

c) All input parameters are mandatory.

d) Parameters are separated by space.

e) For parameter description refer - Appendix C: RF Test Command and Argument Description.

>./gs2k_rftest <device> wrfteststart

>./gs2k_rftest <device> wrfteststop

>./gs2k_rftest <device> wframetxtest <Channel> <BandWidth> <NumFrames>

<FrameLen> <TxRate> <TxPower> <DestAddr> <Bssid>

<HtEnable> <GuardInterval> <GreenField> <PreambleType>

<QosEnable> <AckPolicy> <Scrambler> <AifsnVal> <Antenna>

<ccaBypass>

>./gs2k_rftest <device> wrxtest <Channel> <BandWidth> <RxFrameTypeFilter>

<RxAddrFilter> <Antenna>

>./gs2k_rftest <device> wrxstop

>./gs2k_rftest <device> wtx99test <Channel> <BandWidth> <NumFrames> <FrameLen>

<TxRate> <TxPower> <DestAddr> <Bssid> <GuardInterval>

<GreenField> <Antenna> <Cca> <Agc> <ContPreambleMode>

<Spreader> <Scrambler> <Preamble> <PreambleType>

<TestPatternType> <PhyTestTxRate> <ModeSelect>

>./gs2k_rftest <device> wtx100test <Channel> <BandWidth> <TxPower> <Antenna>

<Cca> <Agc> <ContPreambleMode> <Spreader> <Scrambler>

<Preamble> <PreambleType> <TestPatternType> <PhyTestTxRate>

<ModeSelect>

Page 27: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 27 of 54 2018-02-13

Typical response:

Success case:

OK

Failure case:

ERROR

NOTE:

a) For the response of command 'wrxstop', refer S2W Adapter Command Reference Guide.

b) Additional error messages will be printed based on parameter validation:

./gs2k_rftest --help

7.2. Compiling and building the application

To build “gs2k_rftest”, just enter 'make'.

7.3. Build requirements

libnl >= libnl1

libnl-dev >= libnl-dev-1

pkg-config

libnl required while using rftest, the first working version is 1.0 pre8 as this release introduced “genl”, Generic Netlink which relies on nl80211.

If the “libnl” version is wrong then download and compile with the following steps:

Install libnl-dev using the following command:

sudo apt-get install libnl-dev

or

sudo apt-get install libnl-3-dev

7.4. Typical command sequence for RF TEST

1. Terminate wpa_supplicant (if its running)

>sudo killall wpa_supplicant

>sudo rfkill unblock wifi

2. Bring up GS2K Wi-Fi module

Go to the directory in which GS2K Wi-Fi driver installed (driver/gs2k/).

>sudo insmod gs2k_sdio.ko

3. RF Test Tx frame

Go to the directory in which RFTEST userapp installed.

>sudo ./gs2k_rftest wlan0 wrfteststart

Page 28: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 28 of 54 2018-02-13

>sudo ./gs2k_rftest wlan0 wframetxtest 1 0 50000 1000 11 16 00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 4 0 2 0 1

>sudo ./gs2k_rftest wlan0 wrfteststop

4. RF Test Rx Test

>sudo ./gs2k_rftest wlan0 wrfteststart

>sudo ./gs2k_rftest wlan0 wrxtest 6 0 0 00:1d:c9:17:8d:b1 0

>sudo ./gs2k_rftest wlan0 wrxstop

>sudo ./gs2k_rftest wlan0 wrfteststop

Page 29: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 29 of 54 2018-02-13

APPENDIX A: DOWNLOADING, BUILDING AND INSTALLING

LINUX KERNEL ON X86 UBUNTU

Refer the documentation of Linux for changes in the kernel source code or to verify the tool version to be used to build the kernel.

Ensure the correct version of GCC utility and linker is installed in Ubuntu system.

Check the kernel version by issuing the following command:

“uname -r”

A.1 Get the source code

1. Install the required packages before building the kernel

sudo apt-get install libncurses5 libncurses5-dev

2. Create a local directory “linux_kernel” which is a build directory

mkdir linux_kernel

3. Access the directory

cp ~/Downloads/linux-4.13.3.tar.gz ~/linux_kernel

cd ~/linux_kernel

4. Execute the following command to download the kernel:

wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.3.tar.gz

5. Extract the source code and move into “linux-4.13.3” directory.

tar -xvf linux-4.13.3.tar.gz cd linux-4.13.3

6. Each kernel comes with default configuration which is required for

maintenance. To create a default configuration issue the following command:

make defconfig

7. Now modify the basic configuration file to support the hardware present in the

system

Page 30: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 30 of 54 2018-02-13

make menuconfig

8. The following prompt appears:

9. Navigate to Networking support, click on Enter Key - this shows the Network

Modules.

Navigate to Wireless, click on Enter Key and include the “cfg80211”- wireless

configuration API by pressing "Y" on the Key board. Navigate back to Main

Meu by pressing <ESC> key four times.

Page 31: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 31 of 54 2018-02-13

10. Navigate to the Device drivers, enter and enable MMC/SD/SDIO support.

11. Save the configuration file.

Page 32: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 32 of 54 2018-02-13

Page 33: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 33 of 54 2018-02-13

A.2 Building the kernel

1. Compile the kernel using the following command:

make or make -jx (Where x = 2*no.of cores in your system) to speed up the build.

A.3 Installing and booting the kernel

1. Login as a super user using “sudo” or “su” command and install the kernel

module.

make modules_install

2. Install the new Kernel onto the system using the following command:

make install

“make install” command also executes an update-grub which will makes the grub (the Grand Unified Boot Loader) aware of the new kernel image available.

Reboot the system and press shift key to load the loader, the new kernel that is built will be displayed in the list.

Choose the new kernel and boot up.

To verify the new kernel is loaded or not, issue the following command:

“uname -r”.

It will display the kernel version number - 4.9.11.

Page 34: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 34 of 54 2018-02-13

APPENDIX B: BUILDING AND INSTALLING LINUX KERNEL

AND DRIVER ON NXP I MX6 EMBEDDED HOST

B.1 Bringing up the NXP IMX6 EVK Board:

Basic Requirements

1. Laptop or a desktop running a recent release of Debian, Fedora or Ubuntu; without OS virtualization software.

2. ARM Cross Compiler – Linaro: http://www.linaro.org

Linaro toolchain binaries: http://www.linaro.org/downloads/

3. Bootloader

Das U-Boot – the Universal Boot Loader: http://www.denx.de/wiki/U-Boot

Source: http://git.denx.de/?p=u-boot.git;a=summary

4. Linux Kernel – imx_4.9.11_1.0.0_ga from Freescale

5. ARM based rootfs

a. Debian: https://www.debian.org

b. Ubuntu: http://www.ubuntu.com

Steps to build

1. Create a directory “mcimx6sll -evk” and consider this as the build directory

mkdir ~/mcimx6sll-evk

cd ~/mcimx6sll-evk

2. Create directory boot, kernel_modules which would hold the final images and info

mkdir ~/mcimx6sll-evk/boot

mkdir ~/mcimx6sll-evk/kernel_modules

3. Download the pre-built (64bit) version of Linaro GCC for cross compilation

wget -c https://releases.linaro.org/components/toolchain/binaries/6.4-2017.11/arm-linux-gnueabihf/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz

tar xf gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf.tar.xz

4. Download the ARM based rootfs

wget -c https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-16.04.3-minimal-armhf-2017-12-09.tar.xz

tar xf ubuntu-16.04.3-minimal-armhf-2017-12-09.tar.xz

5. Download the Linux source code from Freescale server (Branch - imx_4.9.11_1.0.0_ga)

git clone -b imx_4.9.11_1.0.0_ga --single-branch git://git.freescale.com/imx/linux-imx.git

6. Download the u-boot - the Universal Boot Loader

wget -c ftp://ftp.denx.de/pub/u-boot/u-boot-2018.01.tar.bz2

tar xf u-boot-2018.01.tar.bz2

7. Apply the patch to u-boot, shared with the document

Page 35: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 35 of 54 2018-02-13

cp mcimx6sll-evk-fixes.patch ~/mcimx6sll-evk/u-boot-2018.01

cd ~/mcimx6sll-evk/u-boot-2018.01

patch -p1 < mcimx6sll-evk-fixes.patch

8. Set the environment variable with following command:

export ARCH=arm

export CROSS_COMPILE=~/mcimx6sll-evk/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-

9. Configure and build the u-boot. The image “u-boot-dtb.imx” should be ready

make mx6sllevk_defconfig

make -j4

10. Navigate to the Linux kernel source code directory using command:

cd ~/mcimx6sll-evk/linux-imx

11. Make the default config for i.mx series devices

make imx_v7_defconfig

12. Modify the kernel configuration for any required changes

make menuconfig

13. Build the kernel image. Install “lzop” before building the kernel.This step may take long time

make bzImage

14. Copy the image into the boot directory

cp arch/arm/boot/zImage ~/mcimx6sll-evk/boot/zImage

15. Build the dtb files

make dtbs

16. Build the modules and copy it to the “kernel_modules” directory

make modules

make modules_install INSTALL_MOD_PATH=~/mcimx6sll-evk/kernel_modules

17. Create an environment variable using the folder name "4.X.Y-Z" exactly as shown in the folder” ~/mcimx6sll-evk/kernel_modules/lib/modules/ “.

export kernel_version=4.X.Y-Z

18. Navigate to the GS2K driver, the project directory

cd ~/telit/gs2k_wifi_nic/drv

19. Build the driver using the following command:

make ARCH=arm CROSS_COMPILE=~/imx6sl-evk/gcc-linaro-6.4.1-2017.11-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- KERNELDIR=~/mcimx6sll-evk/linux-imx

Page 36: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 36 of 54 2018-02-13

B.2 Setting up the SD card

Insert the SD card into the laptop

1. Assume “DISK=/dev/mmcblk0, lsblk” is used for determining the device id.

export DISK=/dev/mmcblk0

2. To erase the partition table/labels on microSD card, execute the following command:

sudo dd if=/dev/zero of=${DISK} bs=1M count=50

Now remove and re-insert the MMC card.

3. Install the bootloader

sudo dd if=~/mcimx6sll-evk/u-boot-2018.01/u-boot-dtb.imx of=${DISK} seek=2 bs=512

4. Create Partition Layout

util-linux v2.26, sfdisk is rewritten and is based on libfdisk.

sudo sfdisk -version

If sfdisk >= 2.26.x

sudo sfdisk ${DISK} <<-__EOF__

1M,,L,*

__EOF__

If sfdisk <= 2.25.x

sudo sfdisk –UNIT M ${DISK} <<-__EOF__

1,,L,*

__EOF__

5. Format Partition

sudo mkfs.ext4 -V

for: DISK=/dev/mmcblk0

sudo mkfs.ext4 -L rootfs ${DISK}p1

for: DISK=/dev/sdX

sudo mkfs.ext4 -L rootfs ${DISK}1

6. Mount Partition

Most systems have the partitions auto mounted.

sudo mkdir -p /media/rootfs/

for: DISK=/dev/mmcblk0

sudo mount ${DISK}p1 /media/rootfs/

for: DISK=/dev/sdX

sudo mount ${DISK}1 /media/rootfs/

Page 37: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 37 of 54 2018-02-13

7. Copy the root file system

sudo tar xfvp ~/mcimx6sll-evk/ubuntu-16.04.3-minimal-armhf-2017-12-09/armhf-rootfs-ubuntu-xenial.tar -C /media/rootfs

sudo chown root:root /media/rootfs/

sudo chmod 755 /media/rootfs/

8. Set uname_r in /boot/uEnv.txt

sudo sh -c "echo 'uname_r=${kernel_version}' >> /media/rootfs/boot/uEnv.txt"

9. Copy the kernel image

sudo cp -v ~/mcimx6sll-evk/boot/zImage /media/rootfs/boot/vmlinuz-${kernel_version}

10. Copy the device tree binaries

sudo mkdir -p /media/rootfs/boot/dtbs/${kernel_version}/

sudo cp -v ~/mcimx6sll-evk/linux-imx/arch/arm/boot/dts/imx6sll*.dtb /media/rootfs/boot/dtbs/${kernel_version}/

11. Copy the kernel modules

sudo cp -rv ~/mcimx6sll-evk/kernel_modules/lib/ /media/rootfs/

12. Copy the cross compiled driver files to the SD card

sudo cp -rv ~/telit/gs2k_wifi_nic/drv/ /media/rootfs/home/ubuntu/

13. Create static information about filesystem

sudo sh -c "echo '/dev/mmcblk1p1 / auto errors=remount-ro 0 1' >> /media/rootfs/etc/fstab"

14. Unmount the SD card

sync

sudo umount /media/rootfs

Page 38: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 38 of 54 2018-02-13

APPENDIX C: RF TEST COMMAND AND ARGUMENT

DESCRIPTION

C.1 Regulatory and Transmit Tests using RF Test Commands

C.1.1 Regulatory Testing

The lowest data rate of each standards (802.11b, 802.11g, and 802,11n) is used, as the transmit power is highest at these rates.

The RF commands already include the Gain Control Table limits. If the data rate field is changed in any of the commands, then check for the gain field in the command is as per the GCT value in “C.1.3 Gain Control Table”

Regulatory testing does not provide Packet Error Rate (PER). If PER is to be measured, then the displayed number of packets is the number of packets received. It does not include the packets with errors.

PER = No. of Packets received/No. of packets sent by the signal generator

C.1.2 Transmit Testing

For transmit testing, the RF commands allow the user to specify the gain value from 0 to 27.

C.1.3 Gain Control Table

Data

Rate

1

Mbps

2

Mbps

5.5

Mbps

11

Mbps

6

Mbps

9 Mbps 12

Mbps

18

Mbps

24 Mbps 36

Mbps

GCT 18 8 14 11 27 27 27 27 26 25

Data

Rate

48

Mbps

54

Mbps

MCS0 MCS1 MCS2 MCS3 MCS4 MCS5 MCS6 MCS7

GCT 24 19 27 27 27 27 25 24 20 16

C.1.4. Start RF Test

This command is used to enable the radio test mode.

Command Syntax: /gs2k_rftest <device> wrfteststart

C.1.5. Stop RF Test

This command is used to disable the radio test mode.

Command Syntax: /gs2k_rftest <device> wrfteststop

C.1.6. Asynchronous Frame Transmission

This command is used to enable the frame transmission. It enables the asynchronous data transmission with the configured parameters.

After the issue of this command, the transmission occurs with the default payload.

Command Syntax:

./gs2k_rftest <device> wframetxtest <Channel> <BandWidth> <NumFrames> <FrameLen> <TxRate> <TxPower> <DestAddr> <Bssid> <HtEnable> <GuardInterval>

Page 39: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 39 of 54 2018-02-13

<GreenField> <PreambleType> <QosEnable> <AckPolicy> <Scrambler> <AifsnVal> <Antenna> <ccaBypass>

Parameter Description:

The following table provides the Asynchronous Frame Transmission parameters.

Parameter Optional/Mandatory Value Description

device Mandatory wlan0-n Use iw dev command to find the

device ID.

Channel Mandatory 1-14 The channel on which the data to be

sent (1-14).

BandWidth Mandatory 0 The values of 0 is 20MHz.

Note: The GS node currently supports 20MHz operation.

NumFrames Mandatory 1-65535 The number of asynchronous frames

to be sent (1-65535).

Note: for continuous transmission, configure this parameter with the value 99. Once configured in continuous

transmission mode, to come out of this mode, stop the test mode and start the test mode again (i.e.,

WRFTESTSTOP, WRFTESTSTART).

FrameLen Mandatory 32 to 1500 The length of the payload.

TxRate Mandatory N/A The rate at which the data need to be

sent.

Note: This also depends on the HtEnable field. If HtEnable bit is set, the configured TxRate is taken as MCS

index, otherwise legacy rate.

TxPower Mandatory 0 to 27

The value of this parameter can range

from 0 to 27. Where 27 is the index

corresponding to the maximum

TxPower GS node will support.

DestAddr Mandatory N/A The MAC address of the node target

to reach.

BSSID Mandatory N/A

The MAC address of any arbitrary

AP, which will be the source MAC

address.

HtEnable Mandatory 0 High throughput disabled

1 High throughput enabled

GuardInterval Mandatory 1 Short guard interval

0 Long guard interval

GreenField Mandatory 0 11n disabled

1 11n only

PreambleType Mandatory 0 short

Page 40: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 40 of 54 2018-02-13

Parameter Optional/Mandatory Value Description

1 long

QosEnable Mandatory 0 Enable QoS

AckPolicy (Debug parameter) Mandatory 4 N/A

Scrambler (Debug parameter) Mandatory 0 OFF

1 ON

AifsnVal Mandatory N/A N/A

Antenna Mandatory N/A N/A

ccaBypass Mandatory N/A N/A

The following table describes the Asynchronous Frame Transmission Data Rates:

TxRate HtEnable Data Rate (Mbps)

1 0 1

2 0 2

5 0 5.5

11 0 11

6 0 6

9 0 9

12 0 12

18 0 18

24 0 24

36 0 36

48 0 48

54 0 54

0 1 MCS0

1 1 MCS1

2 1 MCS2

3 1 MCS3

4 1 MCS4

5 1 MCS5

Page 41: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 41 of 54 2018-02-13

TxRate HtEnable Data Rate (Mbps)

6 1 MCS6

7 1 MCS7

./gs2k_rftest wlan0 wframetxtest 1 0 50000 1000 11 16 00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 4 0 2 0 1

NOTE:

Check the wireless sniffer to see if the frames on air.

C.1.7 Start Asynchronous Frame Reception

The command is used to enable the asynchronous frame reception.

Command Syntax:

./gs2k_rftest wlan0 wrxtest <Channel> <BandWidth> <RxFrameTypeFilter> <RxAddrFilter> <Antenna>

Parameter Description:

The following table describes the Asynchronous Frame Reception Start parameters.

Parameter Optional/Mandatory Value Description

device Mandatory wlan0-n Use iw dev command to find the

device ID.

Channel Mandatory 1 to 14 The channel on which the data is to be

sent (1-14).

BandWidth Mandatory 0 The values of 0 is 20MHz.

Note: Currently GS node supports only 20MHz operation.

RxFrameTypeFilter Mandatory 32-bit

This is a 32-bit variable, where each

bit corresponds to one type of packet

filter.

RxAddrFilter Mandatory N/A The MAC address of the GS node is

same as the Destination address.

Note: The Rx filter is based on destination address. For PER test, transmit from another GS node or some other

source specifying the destination address and set up the receiver to receive frames only destined to its address.

Receiver can be set up to receive all frames by setting filter to zero but that’s not useful for PER because you don’t

know how many frames were sent. Source address based filtering is not supported.

Antenna N/A N/A Not supported

Page 42: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 42 of 54 2018-02-13

Example:

./gs2k_rftest wlan0 wrxteststart

OK

./gs2k_rftest wlan0 wrxtest 6 0 4294930106 00:1d:c9:17:8d:b1 0

Ok

./gs2k_rftest wlan0 wrxstop

No of packets recieved = 6988

No of byte recieved = 6988000

No of packets received with CRC Errors = 6933

No of packets received with Security Errors = 0

No of duplicate packets received = 0

No of header errors received = 237

Average RSSI of the received packets = -21

No of packets received at 1M and Long Preamble = 0

No of packets received at 2M and Long Preamble = 0

No of packets received at 5M and Long Preamble = 0

No of packets received at 11M and Long Preamble = 0

No of packets received at 2M and Short Preamble = 0

No of packets received at 5M and Short Preamble = 0

No of packets received at 11M and Short Preamble = 0

No of packets received at 6M = 0

No of packets received at 9M = 0

No of packets received at 12M = 0

No of packets received at 18M = 0

No of packets received at 24M = 0

No of packets received at 36M = 0

No of packets received at 48M = 0

No of packets received at 54M = 6988

No of packets received atrespective MCS Index with Short GI=00000000

No of packets received atrespective MCS Index with Long GI=00000000

NOTE:

1. Frames with MAC address - 00:1d:c9:17:8d:b1 is received. 2. RxFrameTypeFilter is set to 0xFFFF6EBA (42949301206) to

receive unicast directed management and data frames. This is setup to receive all kinds of frames destined to the receiver node.

Page 43: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 43 of 54 2018-02-13

From the Tx end, transmit frames with MAC address specified in Rx command. Use the following command:

./gs2k_rftest wlan0 wframetxtest 6 0 10000 1000 24 16 00:11:22:33:44:55 00:33:44:55:66:77 0 0 0 0 0 4 0 2 0 1

./gs2k_rftest wlan0 wrxtest 1 0 0 00:11:22:33:44:55 0

./gs2k_rftest wlan0 wrxtest 1 0 536870912 00:11:22:33:44:55 0 – To fliter FCS Fail packets

Issue the wrxstop to find the Rx statics details.

C.1.8 Stop Asynchronous Frame Reception

This command is used to stop RF reception.

Command Syntax:

./gs2k_rftest <device> wrxstop

Example:

When the command is executed it stops the frame reception and displays the PER stats:

./gs2k_rftest wlan0 wrxtest 6 0 4294930106 00:11:22:33:44:55 0

OK

./gs2k_rftest wlan0 wrxstop

No of packets received = 9613

No of bytes received = 9613000

No of packets received with CRC Errors = 1432

No of packets received with Security Errors = 0

No of duplicate packets received = 0

No of header errors received = 58

Average RSSI of the received packets = -49

No of packets received at 1M and Long Preamble = 0

No of packets received at 2M and Long Preamble = 0

No of packets received at 5M and Long Preamble = 0

No of packets received at 11M and Long Preamble = 0

No of packets received at 2M and Short Preamble = 0

No of packets received at 5M and Short Preamble = 0

No of packets received at 11M and Short Preamble = 0

No of packets received at 6M = 0

No of packets received at 9M = 0

No of packets received at 12M = 0

No of packets received at 18M = 0

No of packets received at 24M = 9613

Page 44: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 44 of 54 2018-02-13

No of packets received at 36M = 0

No of packets received at 48M = 0

No of packets received at 54M = 0

No of packets received atrespective MCS Index with Short GI=00000000

No of packets received atrespective MCS Index with Long GI=00000000

NOTE:

FCS and header errors are on all received frames. For PER calculation, compare the total filtered received frames with the total sent frames. FCS and header errors cannot be used for address filtering, since only good frames are considered.

C.1.9 Asynchronous Frame Transmission (TX99 mode)

This command is used to enable TX99 mode.

NOTE:

Issue wrfteststart command before issuing the FrameTX test or the TX99 test commands, to avoid the occurrence of WLAN exception/reset.

Command Syntax:

./gs2k_rftest <device> wtx99test <Channel> <BandWidth> <NumFrames> <FrameLen> <TxRate> <TxPower> <DestAddr> <Bssid> <GuardInterval> <GreenField> <Antenna> <Cca> <Agc> <ContPreambleMode> <Spreader> <Scrambler> <Preamble> <PreambleType> <TestPatternType> <PhyTestTxRate> <ModeSelect>

Usage:

This command enables the asynchronous data transmission with configured parameters.

Parameter Description:

The following table describes the Asynchronous Frame Transmission (TX99 mode) parameters.

Parameter Optional/Mandatory Value Description

device Mandatory wlan0-n Use iw dev command to find the

device ID.

Channel Mandatory 1 to 14 The channel on which the data is to

be sent (1-14).

BandWidth Mandatory 0 The values of 0 is 20MHz.

Note: Currently the GS node supports only 20MHz operation.

NumFrames Mandatory 1-65535 The number of asynchronous frames

to be sent (1-65535).

Page 45: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 45 of 54 2018-02-13

Parameter Optional/Mandatory Value Description

Note: For continuous transmission, configure this parameter with the value 99.

FrameLen Mandatory 32-1500 The length of the payload.

TxRate Mandatory 0 to 7 • Non HT Rates - 0

• Ht Rate - 0 to 7 (MCS Index)

Note: Use PhyTestTxRate and ModeSelect fields to change the transmission rate.

TxPower Mandatory 0 to 27

The value of this parameter can range

from 0 to 27. Where 27 is the index

corresponding to Maximum TxPower

GS node will support.

DestAddr Mandatory N/A The MAC address of the node

targeted to reach.

BSSID Mandatory N/A

The MAC address of any arbitrary

AP, which will be the source MAC

address.

GuardInterval Mandatory

0, 1

• 0 - Short guard interval

• 1 - Long guard interval

It specifies the guard interval.

GreenField Mandatory

0, 1

• 0 - 11n disabled

• 1 - 11n only

It specifies whether to enable or

disable 11n.

Antenna Optional N/A It specifies the antenna used.

Cca Optional

0,1

• 0 - Normal mode

• 1 - Removes the control

of CCA module on the

receiver state machine

in PHY

It specifies whether to enable normal

mode or remove the control of CCA

module on the receiver state machine

in PHY.

Agc Mandatory

0, 1

• 0 - Normal mode

• 1 - Removes the control

of AGC module on the

receiver state machine

in PHY

It allows to enable normal mode or

remove the control of ACG module

on the receiver state machine in

PHY.

ContpreambleMode Mandatory

0, 1

• 0 - Disable Continuous

Preamble Mode

• 1 - Enable Continuous

Preamble Mode

It allows to enable or disable the

continuous preamble mode.

Page 46: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 46 of 54 2018-02-13

Parameter Optional/Mandatory Value Description

Spreader Mandatory

0, 1

• 0 - Spreader is OFF

• 1 - Spreader is ON

It allows to enable or disable

Spreader.

Scrambler Mandatory

0, 1

• 0 - Scrambler is OFF

• 1 - Scrambler is ON

It allows to enable or disable

Scrambler.

Preamble Mandatory

0, 1

• 0 - Normal mode

• 1 - Disables short and

long preamble in the

transmitter

It allows to enable normal mode or

disable short and long preamble in

the transmitter.

PreambleType Mandatory

0, 1

• 0 - Short Preamble

• 1 - Long Preamble

It specifies the Preamble type.

TestPatternType Mandatory

• 000 (0)- All 1’s

• 001 (1)- All 0’s

• 010 (2)- Alternate 1’s

and 0’s

• 011 (3)- PN15 random

sequence

• 100 (4)- PN9 random

sequence

• 111 (7)- PN7 random

sequence

It specifies the type of test pattern to

be used.

PhyTestTxRate Mandatory 0 to 7

It specifies the PHY test transmission

rates.

The rates differ depending on the

ModeSelect parameter.

ModeSelect Mandatory

0, 1, 2

• 0 - 11g mode

• 1 - 11b mode

• 2 - 11n mode

It specifies the mode to be used.

The following table describes ModeSelect, TxRate, and PHY test transmit rates for corresponding Data Rates (TX99 mode).

Data Rate (Mbps) ModeSelect Mode TxRate PhyTestTxRate

1 1

802.11b

0 0

2 1 0 1

5.5 1 0 2

Page 47: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 47 of 54 2018-02-13

11 1 0 3

6 0

802.11g

0 3

9 0 0 7

12 0 0 2

18 0 0 6

24 0 0 1

36 0 0 5

48 0 0 0

54 0 0 4

MCS0 2

802.11n

0 0

MCS1 2 1 1

MCS2 2 2 2

MCS3 2 3 3

MCS4 2 4 4

MCS5 2 5 5

MCS6 2 6 6

MCS7 2 7 7

Example for Mode 802.11b

To support data rate of 11 Mbps, configure the ModeSelect parameter to 1, TxRate parameter to 0, and PhyTestTxRate to 3.

./gs2k_rftest wlan0 wtx99test 1 0 25000 1000 0 20 00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1 0 1 3 1

Check the wireless sniffer to see the frame is on air - some sniffers capture these packets, the best way to validate these packets is to use litepoint device.

Example for Mode 802.11g

To support data rate of 18 Mbps, configure the ModeSelect parameter to 0, TxRate parameter to 0, and PhyTestTxRate to 6.

./gs2k_rftest wlan0 wtx99test 1 0 25000 1000 0 20 00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1 0 1 3 1

Example for Mode 802.11n

To support data rate of MCS5, configure the ModeSelect parameter to 2, TxRate parameter to 5, and PhyTestTxRate to 5.

./gs2k_rftest wlan0 wtx99test 1 0 25000 1000 0 20 00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1 0 1 3 1

Page 48: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 48 of 54 2018-02-13

The following table provides examples of Tx99 mode command for corresponding Data rates.

Data Rate (Mbps) Example

1

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 18

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1

0 3 0 1

2

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 8

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1

0 3 1 1

5.5

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 14

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1

0 3 2 1

11

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 11

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 1 0 1 1 1

0 3 3 1

6

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 3 0

9

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 7 0

12

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 2 0

18

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 6 0

24

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 26

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 1 0

36

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 25

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 5 0

48

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 24

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 0 0

54

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 19

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 4 0

MCS0

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 0 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 0 2

Page 49: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 49 of 54 2018-02-13

Data Rate (Mbps) Example

MCS1

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 1 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 1 2

MCS2

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 2 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 2 2

MCS3

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 3 27

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 3 2

MCS4

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 4 25

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 4 2

MCS5

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 5 24

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 5 2

MCS6

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 6 20

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 6 2

MCS7

./gs2k_rftest wlan0 wtx99test 1 0 99 1000 7 16

00:11:22:33:44:55 00:50:c2:5e:10:99 0 0 0 0 0 0 0 0 0

0 3 7 2

C.1.10. Asynchronous Frame Transmission (TX100 mode)

This command is used to enable the TX100.

Command Syntax:

./gs2k_rftest <device> wtx100test <Channel> <BandWidth> <TxPower> <Antenna> <Cca> <Agc> <ContPreambleMode> <Spreader> <Scrambler> <Preamble> <PreambleType> <TestPatternType> <PhyTestTxRate> <ModeSelect>

Parameter Description:

The following table describes the Asynchronous Frame Transmission (TX100 mode) parameters.

Parameter Optional/Mandatory Value Description

device Mandatory wlan0-n Use iw dev command to find the device

ID.

Channel Mandatory 1-14 The channel on which the data is sent.

BandWidth Mandatory 0 The values of 0 is 20MHz.

Note: Currently the GS node supports only 20MHz operation.

Page 50: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 50 of 54 2018-02-13

Parameter Optional/Mandatory Value Description

TxPower Mandatory 0-27

The value of this parameter can range

from 0 to 27. Where 27 is the index

corresponding to Maximum TxPower

supported by GS node.

Antenna Optional 0 Antenna

Cca Mandatory 0 1

• 0 - Normal mode

• 1 - Removes the control CCA module on

the receiver state machine in PHY

Agc Mandatory 0 1

• 0 - Normal mode

• 1 - Removes the control of AGC module

on the receiver state machine in PHY

ContpreambleMode Mandatory 0 1 • 0 - Disable Continuous Preamble Mode

• 1 - Enable Continuous Preamble Mode

Spreader Mandatory 0 1 • 0 - Spreader is OFF

• 1 - Spreader is ON

Scrambler Mandatory 0 1 • 0 - Scrambler is OFF

• 1 - Scrambler is ON

Preamble Mandatory 0 1

• 0 - Normal mode

• 1 - Disables short and long preamble in

the transmitter

PreambleType Mandatory 0 1 • 0 - Short Preamble

• 1 - Long Preamble

TestPatternType Mandatory 0 1

Selects the test pattern to be

transmitted.

• 0 - All 1s

• 1 - All 0s

PhyTestTxRate Mandatory 0 to 7 The rate will differ depending on the

ModeSelect

ModeSelect Mandatory 0 to 2

• 0 - 11g mode

• 1 - 11b mode

• 2 - 11n mode

The following table describes the PHY Test Transmit Rates (TX100 mode).

Mode Select PhyTestTxRate Data Rate (Mbps)

1 0 1

1 1 2

1 2 5.5

Page 51: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 51 of 54 2018-02-13

1 3 11

0 3 6

0 7 9

0 2 12

0 6 18

0 1 24

0 5 36

0 0 48

0 4 54

2 0 MCS0

2 1 MCS1

2 2 MCS2

2 3 MCS3

2 4 MCS4

2 5 MCS5

2 6 MCS6

2 7 MCS7

./gs2k_rftest wlan0 wtx100test=1 0 16 0 0 1 0 0 1 1 0 1 3 1

NOTE:

To observe the signals, a special equipment may be required.

Page 52: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 52 of 54 2018-02-13

APPENDIX D: PROGRAMMING SETUP - GAINSPAN WAB

BOARD

Following is the steps to prepare the test setup with GainSpan WAB:

Step1: Plug GS2K WAB Board into SD card slot of the laptop.

Step2: Plug the mini-USB cable, one end of the USB port to GS2101MIP WAB Board USB0 and the other end of the USB port to the laptop.

Step 3: Turn the Mode Control Switch to PROGRAM/RUN mode by switch SW1 and S2 to ON mode on the WAB board and perform a power cycle.

Step 4: Open the GainSpan Serial Flash Programmer GUI application and select Serial-to-WiFi firmware using the UART interface and program the WAB board.

Step 5: Turn the Mode Control Switch to RUN Mode by selecting SW1 to ON mode and SW2 to OFF mode and perform a power cycle.

Page 53: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE

GS2K Wi-Fi Network Interface Card (NIC) User Guide

1VV0301491 Rev 2.0 Page 53 of 54 2018-02-13

DOCUMENT HISTORY

Revision Date Changes

1 2018-01-29 First issue

2 2018-02-13 Updated Appendix B: Building and Installing Linux Kernel and Driver on NXP i MX6 Embedded Host

Page 54: GS2K Wi-Fi Network Interface Card (NIC) User Guide · 2018-04-03 · GS2K Wi-Fi Network Interface Card (NIC) User Guide 1VV0301491 Rev 2.0 Page 3 of 54 2018-02-13 USAGE AND DISCLOSURE