Software Architecture#
Overview#
The RS9116 WiSeConnect module includes Wi-Fi, TCP/IP and BT 5 stacks embedded in its internal flash memory. This module requires a separate application processor which acts as a host. Host can communicate with RS9116 module using one of the interfaces listed below.
RS9116W Block Diagram
RS9116 supports following interfaces for interacting with host.
SPI
UART
SDIO
The host can use either Simple APIs or AT Commands for configuring the module.
There are two modes for host interaction:
AT Mode (ASCII)
In this mode, host should use AT Commands for interacting with RS9116 Module. This mode can be used only with UART / USB-CDC interface. Section 'AT Command Mode' provides more details about this mode. Section 'WLAN Commands' describes all commands and other required details.
Binary Mode
In this mode, the host should use Binary Commands for interacting with RS9116 Module. This mode can be used with UART, SPI and SDIO interfaces. Section 'Binary Command Mode' provides more details about this mode. Section 'WLAN Commands' describes all commands and other required details.
Host Interface block diagram is shown below,
WLAN Architecture#
The following figure depicts the WLAN software architecture of the RS9116-WiSeConnect.
Application#
The application layer invokes simple APIs or AT commands provided by host interface. The application developer can use these APIs to build wireless applications.
SPI#
The SPI interface on the RS9116-WiSeConnect works in slave mode. It is a 4-wire interface. In addition to the SPI interface, the module provides additional interrupt pin to signal events to the host.
The interrupt is raised by the module in SPI mode for the following condition.
When the module has data in its output buffer, it indicates host by raising active high signal on the interrupt pin.
The interrupt from module is active high and host has to configure the interrupt in level trigger mode.
UART#
The UART interface on the RS9116-WiSeConnect transmits/receives data to/from the Host in UART mode.
SDIO#
The SDIO interface on the RS9116-WiSeConnect transmits/receives data to/from the Host in SDIO mode.
Host Abstraction Layer (HAL)#
The HAL abstracts the lower layers in the Host interface to which the RS9116-WiSeConnect is connected. The HAL interacts with the Wireless Control Block layer for the processing of the frames obtained from or destined to the Host.
Wireless Control Block (WCB)#
The data from/to the Host is classified as Wi-Fi specific frames or TCP/IP specific frames. The functionality of the WCB module depends on the type and direction of the frames.
Wi-Fi Control Frames (WCF)#
The WCB interprets the Wi-Fi control information from the Host and interacts with the SME (Station Management Entity) or APME (Access Point Management Entity) based on operating mode of RS9116- WiSeConnect. Configuration of the RS9116-WiSeConnect from the Host for Wi-Fi access is through AT commands or Binary commands.
TCP/IP Control Frames#
TCP/IP networking protocol provides end-to-end connectivity specifying how data should be formatted, addressed, transmitted, routed and received at the destination.
If the packets received from the Host by WCB during transmission is interpreted as TCP/IP frames then the WCB interacts with TCP/IP stack for further processing before passing the packets to MAC layer.
Similarly if the packets are received from the TCP/IP stack by WCB during reception, WCB processes before passing these packets to host.
Station Management Entity (SME)#
The SME is the core layer which manages the Wi-Fi connectivity in Station mode. The SME maintains the state machine to detect the activity on the Wi-Fi network and indicates to the user accordingly. It interacts with the WPA supplicant if security is enabled in the Wi-Fi network.
Access Point Management Entity (APME)#
The APME is the core layer which manages the connectivity in Access Point group owner modes. The APME maintains the state machine to handle multiple clients connected to the module. It interacts with WPA supplicant if security is enabled in the Wi-Fi network.
WPA Supplicant#
The main functionality of WPA supplicant is to support the key negotiation between Wi-Fi devices in a secure mode. This functionality depends on the mode in which RS9116-WiSeConnect operates in Station mode, Access point mode. The WPA supplicant is used to initiate the 802.1x/E Access Point authentication if WPA/WPA2-PSK is used as the security parameter. It also plays a major part in performing the 4-way handshake to derive the PTK in WPA/WPA2-PSK modes.