Access Point (IPv6)#

1. Purpose / Scope#

This application demonstrates how to configure the RS9116W EVK as a soft Access point and allows stations to connect to it and enables TCP data transmission from the connected Wi-Fi station to Silicon Labs Access Point.

2. Prerequisites / Setup Requirements#

Before running the application, the user will need the following things to setup.

2.1 Hardware Requirements#

Setup Diagram for Access Point Start ExampleSetup Diagram for Access Point Start Example

2.2 Software Requirements#

3. Application Build Environment#

3.1 Platform#

The Application can be built and executed on below Host platforms

3.2 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.

3.3 Project Configuration#

The Application is provided with the project folder containing Keil and Simplicity Studio project files.

  • Keil Project

    • The Keil project is used to evaluate the application on STM32.

    • Project path: <SDK>/examples/snippets/wlan/access_point_v6/projects/access_point_v6-nucleo-f411re.uvprojx

  • Simplicity Studio

    • The Simplicity Studio project is used to evaluate the application on EFR32MG21.

    • Project path:

      • If the Radio Board is BRD4180A or BRD4181A, then access the path <SDK>/examples/snippets/wlan/access_point_v6/projects/access_point_v6-brd4180a-mg21.slsproj

      • If the Radio Board is BRD4180B or BRD4181B, then access the path <SDK>examples/snippets/wlan/access_point_v6/projects/access_point_v6-brd4180b-mg21.slsproj

      • User can find the Radio Board version as given below

EFR Radio BoardsEFR Radio Boards

  • EFM32GG11 platform

    • The Simplicity Studio project is used to evaluate the application on EFM32GG11.

      • Project path:<SDK>examples/snippets/wlan/access_point_v6/projects/access_point_v6-brd2204a-gg11.slsproj

3.4 Bare Metal/RTOS Support#

This application supports bare metal and RTOS environment. By default, the application project files (Keil and Simplicity studio) are provided with bare metal configuration in the SDK.

4. Application Configuration Parameters#

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

4.1 Open rsi_ap_start.c file#

4.1.1 The desired parameters are provided below. User can also modify the parameters as per their needs and requirements.#

SSID refers to the name of the Access point to be created.

#define SSID "SILABS_AP"

CHANNEL_NO refers to the channel in which AP would be started

#define CHANNEL_NO 11

SECURITY_TYPE refers type of security. Access point supports Open, WPA, WPA2 securities.

Valid configurations are:

  • RSI_OPEN - For OPEN security mode

  • RSI_WPA - For WPA security mode

  • RSI_WPA2 - For WPA2 security mode

#define SECURITY_TYPE RSI_WPA2

ENCRYPTION_TYPE refers to the type of Encryption method. Access point supports OPEN, TKIP, CCMP encryption methods.

Valid configurations are:

  • RSI_CCMP - For CCMP encryption

  • RSI_TKIP - For TKIP encryption

  • RSI_NONE - For open encryption

#define ENCRYPTION_TYPE RSI_CCMP

PSK refers to the secret key if the Access point to be configured in WPA/WPA2 security modes.

#define PSK "1234567890"            

BEACON_INTERVAL refers to the time delay between two consecutive beacons in milliseconds. Allowed values are integers from 100 to 1000 which are multiples of 100.

#define BEACON_INTERVAL 100

DTIM_INTERVAL refers DTIM interval of the Access Point. Allowed values are from 1 to 255.

#define DTIM_INTERVAL 4

DEVICE_PORT port refers TCP server port number

#define DEVICE_PORT 5001

NUMEBR_OF_PACKETS refers how many packets to receive from remote TCP client.

#define NUMBER_OF_PACKETS 1000

GLOBAL_BUFF_LEN refers the memory length for driver

#define GLOBAL_BUFF_LEN 15000

RECV_BUFFER_SIZE refers receive data length

#define RECV_BUFFER_SIZE 1000

Note!

If the user wants to configure the STA IP address through DHCP then set DHCP_MODE to "1" and skip configuring the following DEVICE_IP6, and GATEWAY6 macros Otherwise set the DHCP_MODE macro to "0" and configure the following DEVICE_IP6 and GATEWAY6 macros.


IPv6 address to be configured to the device

Example: To configure "2001:db8:0:1::121" as IP address, update the macro DEVICE_IP6 as below

#define DEVICE_IP6 "2001:db8:0:1::121"

IP address of the gateway.

Example: To configure "2001:db8:0:1::121" as Gateway, update the macro GATEWAY6 as below

#define GATEWAY6 "2001:db8:0:1::121"

4.2 Open rsi_wlan_config.h file. User can also modify the below parameters as per their needs and requirements.#

#define CONCURRENT_MODE     RSI_DISABLE
#define RSI_FEATURE_BIT_MAP FEAT_SECURITY_PSK
#define RSI_TCP_IP_BYPASS   RSI_DISABLE
#define RSI_TCP_IP_FEATURE_BIT_MAP \
  (TCP_IP_FEAT_DHCPV4_CLIENT | TCP_IP_FEAT_DHCPV6_CLIENT | TCP_IP_FEAT_IPV6 | TCP_IP_FEAT_DHCPV6_SERVER)
#define RSI_BAND RSI_BAND_2P4GHZ

5. Testing the Application#

User has to follow the below steps for the successful execution of the application.

5.1 Loading the RS9116W Firmware#

Refer Getting started with a PC to load the firmware into RS9116W EVK. The firmware file is located in <SDK>/firmware/

5.2 Building the Application on Host Platform#

5.2.1 Using STM32#

Refer Getting started with STM32

  • Open the project <SDK>/examples/snippets/wlan/access_point_v6/projects/access_point_v6-nucleo-f411re.uvprojx

  • Build and Debug the project

  • Check for the RESET pin:

    • If RESET pin is connected from STM32 to RS9116W EVK, then user need not press the RESET button on RS9116W EVK before free run.

    • If RESET pin is not connected from STM32 to RS9116 , then user need to press the RESET button on RS9116W EVK before free run.

  • Add the macro RSI_CONFIGURE_IPV6=1 in the preprocessor settings (Project -> Options for Target -> C/C++ -> Preprosessor Symbols)

  • Free run the project

  • Then continue the common steps from 5.3

5.2.2 Using EFX32#

Refer Getting started with EFX32, for settin-up EFR & EFM host platforms

  • Open Simplicity Studio and import the EFR32/EFM32 project from <SDK>/examples/snippets/wlan/access_point_v6/projects

    • Select the appropriate .slsproj as per Radio Board type mentioned in Section 3.3 for EFR32 board. (or)

    • Select the *.brd2204a-gg11.slsproj for EFM32GG11 board.

  • Compile and flash the project in to Host MCU

  • Debug the project

  • Check for the RESET pin:

    • If RESET pin is connected from EFX32 to RS9116W EVK, then user need not press the RESET button on RS9116W EVK before free run

    • If RESET pin is not connected from EFX32 to Rs9116W EVK, then user need to press the RESET button on RS9116W EVK before free run

  • Add the macro RSI_CONFIGURE_IPV6=1 in the preprocessor settings to enable IPv6 (Project -> Properties -> C/C++ Build -> Settings ->GNU ARM C Compiler ->Preprosessor)

  • Free run the project

  • Then continue the common steps from 5.3

5.3 Common Steps#

  1. After program gets executed, RS9116W EVK will be created as an access point with configured SSID (Ex: "SILABS_AP") and opens TCP server socket on DEVICE_PORT and waits for TCP connection request from TCP client. Now scan and connect to device access point (Ex: "SILABS_AP" is the AP name) from laptop.

  2. After successful connection, open iperf application from remote PC command Prompt.

  3. Connect to TCP Server running on RS9116W EVK using below command

    iperf.exe -c <DEVICE_IP> -p <DEVICE_PORT> -V -i 1 -t 100

  4. The RS9116W EVK accepts connection request and receives data on the TCP server port and exit after receiving configured NUMBER_OF_PACKETS

Receiving data on the TCP server portReceiving data on the TCP server port

Compressed Debug Logging#

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