WLAN RF Test#

Introduction#

This application demonstrates how to configure the RS9116W to transmit Wi-Fi packets at varying data rates and power levels. The application can be used to assist with regulatory certification testing.

Setting Up#

To use this application, the following hardware, software and project setup is required.

Hardware Requirements#

Figure: Setup Diagram for Transmit Test Example

Software Requirements#

Project Setup#

Configuring the Application#

The application can be configured to suit your requirements and development environment. Read through the following sections and make any changes needed.

Host Interface#

  • By default, the application is configured to use the SPI bus for interfacing between Host platforms(STM32F411 Nucleo / EFR32MG21) and the RS9116W EVK.

  • This application is also configured to use the SDIO bus for interfacing between Host platforms(EFM32GG11) and the RS9116W EVK.

Bare Metal/RTOS Support#

To select a bare metal configuration, see Selecting bare metal.

Wi-Fi Radio Configuration#

Configure the following parameters in rsi_wlan_rf_test.c.

  #define RSI_TX_TEST_POWER    4               // Tx RF power in the range [2:18] dBm
  #define RSI_TX_TEST_RATE     RSI_RATE_1      // WLAN data rate, see sapi/include/rsi_wlan_apis.h for details
  #define RSI_TX_TEST_LENGTH   30              // Tx packet length in the range [24:1500] bytes in burst mode, 
                                               //                               [24:260 ] bytes in continuous mode
  #define RSI_TX_TEST_MODE     RSI_BURST_MODE  // Selects burst mode or continuous mode
  #define RSI_TX_TEST_CHANNEL  1               // Channel number in 2.4 or 5 GHz
  #define RSI_ANTENNA          1               // 0 = RF_OUT2, 1 = RF_OUT1
  #define RSI_ANTENNA_GAIN_2G  0               // Gain in 2.4 GHz band in the range [0:10]
  #define RSI_ANTENNA_GAIN_5G  0               // Gain in 5 GHz band in the range [0:10]

Configure the following parameters in rsi_wlan_config.h.

   #define RSI_TX_TEST_NUM_PKTS  0               // To configure number of packets to be sent.
                                                // If the macro is set as n, then n number of packets will be 
                                                // sent on-air, after that transmission will be stopped.
                                                // If this macro is set as 0 then packets will be sent 
                                                // continuously until user stops the transmission.
  #define RSI_TX_TEST_RATE_FLAGS   RSI_TX_IMMEDIATE_TRANSFER       // To transfer packets immediately by ignoring CCA, set RSI_TX_IMMEDIATE_TRANSFER flag.
                                                // Default value is '0',i.e., CCA is enabled by default.

RTOS Configuration#

The following parameters are configured if OS is used. Application task should be of low priority

#define RSI_APPLICATION_TASK_PRIORITY                   1

Driver task should have the highest priority among all threads

#define RSI_DRIVER_TASK_PRIORITY                 2

WLAN Task stack size is configured by this macro

#define RSI_APPLICATION_TASK_STACK_SIZE           500

Driver Task stack size is configured by this macro

#define RSI_DRIVER_TASK_STACK_SIZE         500

Run the Application#

After making any custom configuration changes required, build, download and run the application as described in the EFx32 Getting Started or STM32 Getting Started.

When the application runs, the RS9116W starts transmitting using the configuration settings. A power meter or spectrum analyzer may be used to monitor the RF output power and spectrum.

The following images provides example spectrums when the RS9116W is configured to transmit with the settings shown.

Transmit Spectrum Example : +4 dBm, 1 Mbit/s (DSSS)#

  #define RSI_TX_TEST_POWER    4                // 4 dBm
  #define RSI_TX_TEST_RATE     1                // 1 Mbit/s
  #define RSI_TX_TEST_LENGTH   30               // 30 bytes
  #define RSI_TX_TEST_MODE     RSI_BURST_MODE   // Burst mode
  #define RSI_TX_TEST_CHANNEL  1                // Channel 1 = 2412 MHz

Figure: Spectrum Analyzer speed 1Mbps

Transmit Spectrum Example : +12 dBm, 6 Mbit/s (OFDM)#

#define RSI_TX_TEST_POWER    12               // 12 dBm  
#define RSI_TX_TEST_RATE     6                // 6 Mbit/s 
#define RSI_TX_TEST_LENGTH   30               // 30 bytes 
#define RSI_TX_TEST_MODE     RSI_BURST_MODE   // Burst mode 
#define RSI_TX_TEST_CHANNEL  1                // Channel 1 = 2412 MHz

Figure: Spectrum Analyzer 6Mbps

Selecting Bare Metal#

The application has been designed to work with FreeRTOS and Bare Metal configurations. By default, the application project files (Keil and Simplicity studio) are configured with FreeRTOS enabled. The following steps demonstrate how to configure Simplicity Studio and Keil to test the application in a Bare Metal environment.

Bare Metal with Simplicity Studio#

  • Open the project in Simplicity Studio

  • Right click on the project and choose 'Properties'

  • Go to 'C/C++ Build' | 'Settings' | 'GNU ARM C Compiler' | 'Symbols' and remove macro 'RSI_WITH_OS=1'

  • Select 'Apply' and 'OK' to save the settings

Figure: project settings in Simplicity Studio

Figure: project settings in Simplicity Studio

Bare Metal with Keil#

  • Open the project in Keil and select 'Options for Target'

  • Go to the 'C/C++' tab and remove 'RSI_WITH_OS' macro present under Preprocessor Symbols

  • Select 'OK' to save the settings

Figure: project settings in Keil IDE

Compressed Debug Logging#

To enable the compressed debug logging feature please refer to Logging User Guide