Access Point#

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 and the RS9116W EVK.

  • The SAPI driver provides APIs to enable other host interfaces if SPI is not suitable for your needs.

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/projects/access_point-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/projects/access_point-brd4180a-mg21.slsproj

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

      • User can find the Radio Board version as given below

EFR Radio BoardsEFR Radio Boards

3.4 Bare Metal Support#

This application supports only bare metal 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

IP address to be configured to the device should be in long format and in little endian byte order.

Example: To configure "192.168.10.1" as IP address, update the macro DEVICE_IP as 0x010AA8C0.

#define DEVICE_IP                            0X010AA8C0

IP address of the gateway should also be in long format and in little endian byte order

Example: To configure "192.168.10.1" as Gateway, update the macro GATEWAY as 0x010AA8C0

#define GATEWAY                              0x010AA8C0

IP address of the network mask should also be in long format and in little endian byte order

Example: To configure "255.255.255.0" as network mask, update the macro NETMASK as 0x00FFFFFF

#define NETMASK                              0x00FFFFFF

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_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/projects/access_point-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.

  • Free run the project

  • Then continue the common steps from 5.3

5.2.2 Using EFX32#

Refer Getting started with EFX32

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

  • Select the appropriate .slsproj as per the Radio Board type mentioned in Section 3.3

  • Compile and flash the project in to Host MCU

  • 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 Rs9116W EVK, then user need to press the RESET button on RS9116W EVK before free run

  • 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> -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