Skip to content

Commit

Permalink
WiSeConnect release: 2.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wifi-ci-agent committed Mar 7, 2024
1 parent c95f054 commit a8f1647
Show file tree
Hide file tree
Showing 50 changed files with 6,875 additions and 4,048 deletions.
2,749 changes: 2,749 additions & 0 deletions docs/release_notes/release_notes.md

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions examples/snippets/ble/unified_ae_coex_app/inc/rsi_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@
//! Tx power level
#define RSI_CONFIG_AP_TX_POWER RSI_POWER_LEVEL_HIGH
//! AP SSID
#define RSI_CONFIG_AP_SSID "REDPINE_AP"
#define RSI_CONFIG_AP_SSID "SILABS_AP"
//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND
#define RSI_CONFIG_AP_BAND RSI_BAND_2P4GHZ
//! To configure AP channle number
Expand Down Expand Up @@ -602,7 +602,7 @@
//! To configure listen interval
#define RSI_CONFIG_CLIENT_LISTEN_INTERVAL 0
//! To configure SSID
#define RSI_CONFIG_CLIENT_SSID "REDPINE_AP"
#define RSI_CONFIG_CLIENT_SSID "SILABS_AP"
//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND
#define RSI_CONFIG_CLIENT_BAND RSI_BAND_2P4GHZ
//! To configure channel number
Expand Down Expand Up @@ -661,7 +661,7 @@
//! scan channle bit map in 5GHz band ,valid if given channel to scan is 0
#define RSI_CONFIG_EAP_SCAN_CHAN_BITMAP_5_0_GHZ 0
//! To configure SSID
#define RSI_CONFIG_EAP_SSID "REDPINE_AP"
#define RSI_CONFIG_EAP_SSID "SILABS_AP"
//! RSI_BAND_2P4GHZ(2.4GHz) or RSI_BAND_5GHZ(5GHz) or RSI_DUAL_BAND
#define RSI_CONFIG_EAP_BAND RSI_BAND_2P4GHZ
//! To set security type
Expand Down Expand Up @@ -716,7 +716,7 @@
//! Set SSID postfix
#define RSI_CONFIG_P2P_SSID_POSTFIX "WSC_1_0_0"
//! Set P2P join SSID
#define RSI_CONFIG_P2P_JOIN_SSID "REDPINE_AP"
#define RSI_CONFIG_P2P_JOIN_SSID "SILABS_AP"
//! Set psk key
#define RSI_CONFIG_P2P_PSK_KEY "12345678"
//! P2P Network parameters
Expand Down Expand Up @@ -765,4 +765,4 @@
#define FW_LOG_QUEUE_SIZE 2
#endif

#endif
#endif
150 changes: 70 additions & 80 deletions examples/snippets/ble/unified_ae_coex_app/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,67 @@

## 1. Purpose / Scope

This application demonstrates how to configure SiWx91x EVK as both Extended Advertiser(Peripheral) and Extended Scanner(Central) . It also has support for multiple connections(1 central + 1 peripheral) along with SMP feature and data transfer.
This application demonstrates how to configure RS9116W EVK as both Extended Advertiser(Peripheral) and Extended Scanner(Central) . It also has support for multiple connections(1 central + 1 peripheral) along with SMP feature and data transfer.

## 2. Prerequisites / Setup Requirements

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

### 2.1 Hardware Requirements

- Windows PC with Host interface(UART/ SPI/ SDIO).
- SiWx91x Wi-Fi Evaluation Kit. The SiWx91x supports multiple operating modes. See [Operating Modes]() for details.
- **SoC Mode**:
- Silicon Labs [BRD4325A](https://www.silabs.com/)
- **NCP Mode**:
- Silicon Labs [(BRD4180A, BRD4280B)](https://www.silabs.com/);
- Host MCU Eval Kit. This example has been tested with:
- Silicon Labs [WSTK + EFR32MG21](https://www.silabs.com/development-tools/wireless/efr32xg21-bluetooth-starter-kit)
- Silicon Labs [WSTK + EFM32GG11](https://www.silabs.com/development-tools/mcu/32-bit/efm32gg11-starter-kit)
- BLE Smart Phone with GATT client
- Windows PC with Host interface(UART/ SPI).
- Silicon Labs [RS9116 Wi-Fi Evaluation Kit](https://www.silabs.com/development-tools/wireless/wi-fi/rs9116x-sb-evk-development-kit)
- Host MCU Eval Kit. This example has been tested with:
- Silicon Labs [WSTK + EFR32MG21](https://www.silabs.com/development-tools/wireless/efr32xg21-bluetooth-starter-kit)
- [STM32F411 Nucleo](https://st.com/)
- BLE peripheral device with AE support
- BLE central device with AE support


![Setup Diagram of Unified AE CoEx Example](resources/readme/ae_unified_setup.png)
### 2.2 Software Requirements

- [WiSeConnect SDK](https://github.com/SiliconLabs/wiseconnect-wifi-bt-sdk/)

- Embedded Development Environment
- For Silicon Labs EFx32, use the latest version of [Simplicity Studio](https://www.silabs.com/developers/simplicity-studio)

- Download and install the Silicon Labs [EFR Connect App](https://www.silabs.com/developers/efr-connect-mobile-app) in the android smart phones for testing BLE applications. Users can also use their choice of BLE apps available in Android/iOS smart phones.
- For STM32, use licensed [Keil IDE](https://www.keil.com/demo/eval/arm.htm)

### 2.3 Setup Diagram:
**SoC Mode :**
![](resources/readme/ae_unified_soc.png)

**NCP Mode :**
- For Silicon Labs EFx32, use the latest version of [Simplicity Studio](https://www.silabs.com/developers/simplicity-studio)

![](resources/readme/ae_unified_ncp.png)
- Download and install the Silicon Labs [EFR Connect App](https://www.silabs.com/developers/efr-connect-mobile-app) in the android smart phones for testing BLE applications. Users can also use their choice of BLE apps available in Android/iOS smart phones.

## 3. Application Build Environment
The Application can be built and executed on below Host platforms
* [STM32F411 Nucleo](https://st.com/)
* [WSTK + EFR32MG21](https://www.silabs.com/development-tools/wireless/efr32xg21-bluetooth-starter-kit)

### 3.1 Project Setup
### 3.2 Host Interface

- **SoC Mode**
- **Silicon Labs SiWx91x SoC**. Follow the [Getting Started with SiWx91x SoC](https://docs.silabs.com/) to setup the example to work with SiWx91x SoC and Simplicity Studio.
- **NCP Mode**
- **Silicon Labs EFx32 Host**. Follow the [Getting Started with EFx32](https://docs.silabs.com/rs9116-wiseconnect/latest/wifibt-wc-getting-started-with-efx32/) to setup the example to work with EFx32 and Simplicity Studio.
* 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.2 NCP Mode - Host Interface
### 3.3 Project Configuration

By default, the application is configured to use the SPI bus for interfacing between Host platforms(EFR32MG21) and the SiWx91x EVK.
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/ble/unified_ae_coex_app/projects/unified_ae_coex_app-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/ble/unified_ae_coex_app/projects/unified_ae_coex_app-brd4180a-mg21.slsproj`
- If the Radio Board is **BRD4180B** or **BRD4181B**, then access the path `<SDK>/examples/snippets/ble/unified_ae_coex_app/projects/unified_ae_coex_app-brd4180b-mg21.slsproj`
- User can find the Radio Board version as given below

![EFR Radio Boards](resources/readme/image79b.png)


### 3.4 RTOS Support

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

## 4. Application Configuration Parameters

Expand Down Expand Up @@ -89,7 +106,7 @@ set below macro to receive 'gatt notifications' from remote device

**Power save configuration**

- By default, The Application is configured without power save.
- By default, The Application is configured with power save.

#define ENABLE_POWER_SAVE 0
Expand Down Expand Up @@ -243,83 +260,56 @@ Phy rate bits:

## 5. Testing the Application

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

### 5.1 Loading the SiWx91x Firmware
Refer [Getting started with a PC](https://docs.silabs.com/rs9116/latest/wiseconnect-getting-started) to load the firmware into SiWx91x EVK. The firmware file is located in `<SDK>/connectivity_firmware/`
### 5.1 Loading the RS9116W Firmware

### 5.2 Creating the Project and builing the Application

- Refer [Getting started with EFX32](https://docs.silabs.com/rs9116-wiseconnect/latest/wifibt-wc-getting-started-with-efx32/), for settin-up EFR & EFM host platforms
Refer [Getting started with PC ](https://docs.silabs.com/rs9116/latest/wiseconnect-getting-started) to load the firmware into RS9116W EVK. The firmware binary is located in `<SDK>/firmware/`

#### 5.2.1 Project Creation - SoC Mode :
### 5.2 Building the Application on the Host Platform

- Connect your board. The Si917 compatible SoC board is **BRD4325A**.
- Studio should detect your board. Your board will be shown here.

![](resources/readme/socboarddetection111.png)
#### 5.2.2 Project Creation - NCP Mode :
### 5.2.1 Using STM32

- Connect your board. The supported NCP boards are: **BRD4180A,BRD4280B**
- Studio should detect your board. Your board will be shown here.

![](resources/readme/ncpboarddetection112.png)
#### 5.2.3 Selecting an example application and generate project
Refer [STM32 Getting Started](https://docs.silabs.com/rs9116-wiseconnect/latest/wifibt-wc-getting-started-with-efx32/)

- Go to the 'EXAMPLE PROJECT & DEMOS' tab and select your desired example application
- Click 'Create'. The "New Project Wizard" window appears. Click 'Finish'.
![](resources/readme/unified_ae_coex_app_selection.png)
#### 5.2.4 Build Project - SoC Mode
- Open the project `<SDK>/examples/snippets/ble/unified_ae_coex_app/projects/unified_ae_coex_app-nucleo-f411re.uvprojx` in Keil IDE.
- 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 RS9116W EVK, then user need to press the RESET button on RS9116W EVK before free run.
- Free run the project

- Once the project is created, right click on project and go to properties → C/C++ Build → Settings → Build Steps
- Add post_build_script_SimplicityStudio.bat file path (SI917_COMBO_SDK.X.X.X.XX\utilities\isp_scripts_common_flash) in build steps settings as shown in below image.

![](resources/readme/image359.png)
- Check for M4 projects macros in preprocessor settings(RSI_M4_INTERFACE=1)
- Check for 9117 macro in preprocessor settings(CHIP_917=1).
- Click on the build icon (hammer) to build the project

- Successful build output will shown
#### 5.2.5 Build Project - NCP Mode :
#### 5.2.2 Using EFX32

- Check for 9117 macro in preprocessor settings(CHIP_917=1).
- If expansion board is used add the macro (EXP_BOARD=1) to preprocessor settings
- Click on the build icon (hammer) to build the project

- Successful build output will show as below.
Refer [EFx32 Getting Started](https://docs.silabs.com/rs9116-wiseconnect/latest/wifibt-wc-getting-started-with-efx32/)

- Import the project from `<SDK>/examples/snippets/ble/unified_ae_coex_app/projects`
- Select the appropriate .slsproj as per 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 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
- Free run the project

## 6. Program the device

- Once the build was successfull, right click on project and click on Debug As->Silicon Labs ARM Program as shown in below image.

### NCP Mode :

![](resources/readme/unified_ae_coex_app_ncp_build.png)
![](resources/readme/unified_ae_coex_app_build.png)
**Note:** Simillarly, Choose the **Run As** option fo one shot execution.

## 6.1 Running the SiWx91x Application
## 6.1 Running the RS9116W Application

### 6.1.1 Steps to be followed to verify BLE AE Unified CoEx App
1. Set all the configurations necessary refering to section 4.
2. If extended advertsing is enabled by default SiWx91x would be visible on air
2. If extended advertsing is enabled by default RS9116W would be visible on air
3. If extended scanning is enabled it will scan in the given interval and window
4. To make remote central connection scan from any BLE scanner search for the device(if no random address is set it will advertise with the public address)click on connect , if SMP is enabled for this connection the process is started and after successful bonding if data transfer is enabled it is started .
**Note:** To see the services on client end need to issue discover services after bonding from remote
5. To make a remote peripheral connection advertise the remote with the particuler name specified in RSI_REMOTE_DEVICE_NAME1 macro,if SMP is enabled for this connection the process is started and after successful bonding if data transfer is enabled it is started .

## 7. Observing the output prints on serial terminal

### 7.1 SoC Mode:
- Connect USB to UART connector Tx and GND pins to WSTK radio board.

- Connect Tx(Pin-6) to P27 on WSTK
- Connect GND(Pin 8 or 10) to GND on WSTK
![](resources/readme/ftdiprints118.png)
- Prints can see as below in any Console terminal
![](resources/readme/unified_ae_coex_app_prints.png)
### 7.2 NCP Mode:
- Prints can see as below in any Console terminal
![](resources/readme/unified_ae_coex_app_prints.png)

Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
5 changes: 2 additions & 3 deletions examples/snippets/wlan/access_point/rsi_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@
#define RSI_HT_CAPS_SUPPORT_CH_WIDTH BIT(1)

//! HT caps bit map.
#define RSI_HT_CAPS_BIT_MAP \
(RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN | RSI_HT_CAPS_SUPPORT_CH_WIDTH)
#define RSI_HT_CAPS_BIT_MAP (RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN)

/*=======================================================================*/

Expand Down Expand Up @@ -622,4 +621,4 @@
#define FW_LOG_QUEUE_SIZE 2
#endif

#endif
#endif
5 changes: 2 additions & 3 deletions examples/snippets/wlan/access_point_v6/rsi_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,7 @@
#define RSI_HT_CAPS_SUPPORT_CH_WIDTH BIT(1)

//! HT caps bit map.
#define RSI_HT_CAPS_BIT_MAP \
(RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN | RSI_HT_CAPS_SUPPORT_CH_WIDTH)
#define RSI_HT_CAPS_BIT_MAP (RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN)

/*=======================================================================*/

Expand Down Expand Up @@ -739,4 +738,4 @@
#define FW_LOG_QUEUE_SIZE 2
#endif

#endif
#endif
5 changes: 2 additions & 3 deletions examples/snippets/wlan/concurrent_mode/rsi_wlan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@
//! HT caps supported

//! HT caps bit map.
#define RSI_HT_CAPS_BIT_MAP \
(RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN | RSI_HT_CAPS_SUPPORT_CH_WIDTH)
#define RSI_HT_CAPS_BIT_MAP (RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN)

/*=======================================================================*/

Expand Down Expand Up @@ -662,4 +661,4 @@
#define FW_LOG_QUEUE_SIZE 2
#endif

#endif
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,7 @@
//! HT caps supported

//! HT caps bit map.
#define RSI_HT_CAPS_BIT_MAP \
(RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN | RSI_HT_CAPS_SUPPORT_CH_WIDTH)
#define RSI_HT_CAPS_BIT_MAP (RSI_HT_CAPS_NUM_RX_STBC | RSI_HT_CAPS_SHORT_GI_20MHZ | RSI_HT_CAPS_GREENFIELD_EN)

/*=======================================================================*/

Expand Down Expand Up @@ -661,4 +660,4 @@
#define FW_LOG_QUEUE_SIZE 2
#endif

#endif
#endif
20 changes: 19 additions & 1 deletion examples/snippets/wlan/mqtt_client/rsi_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,8 @@ int32_t rsi_mqtt_client_app()
status = rsi_mqtt_connect(rsi_mqtt_client, 0, clientID, NULL, NULL);
if (status != RSI_SUCCESS) {
LOG_PRINT("\r\nConnect to the MQTT broker/server Failed, Error Code : 0x%lX\r\n", status);
//! Shut Down the port
mqtt_disconnect(rsi_mqtt_client->mqtt_client.ipstack);
return status;
} else {
LOG_PRINT("\r\nConnect to the MQTT broker/server Success\r\n");
Expand All @@ -447,6 +449,9 @@ int32_t rsi_mqtt_client_app()
//! Subscribe to the topic given
status = rsi_mqtt_subscribe(rsi_mqtt_client, QOS, (int8_t *)RSI_MQTT_TOPIC, rsi_message_received);
if (status != RSI_SUCCESS) {
if (rsi_wlan_get_status() != RSI_SUCCESS) {
status = rsi_wlan_socket_get_status(rsi_mqtt_client->mqtt_client.ipstack->my_socket);
}
LOG_PRINT("\r\nSubscription to Topic Failed, Error Code : 0x%lX\r\n", status);
return status;
} else {
Expand Down Expand Up @@ -483,7 +488,9 @@ int32_t rsi_mqtt_client_app()
//! Publish message on the topic
status = rsi_mqtt_publish(rsi_mqtt_client, (int8_t *)RSI_MQTT_TOPIC, &publish_msg);
if (status != RSI_SUCCESS) {
status = rsi_wlan_socket_get_status(rsi_mqtt_client->mqtt_client.ipstack->my_socket);
if (rsi_wlan_get_status() != RSI_SUCCESS) {
status = rsi_wlan_socket_get_status(rsi_mqtt_client->mqtt_client.ipstack->my_socket);
}
LOG_PRINT("\r\nPublish to Topic Failed, Error Code : 0x%lX\r\n", status);
return status;
} else {
Expand All @@ -494,6 +501,9 @@ int32_t rsi_mqtt_client_app()
//! Recv data published on the subscribed topic
status = rsi_mqtt_poll_for_recv_data(rsi_mqtt_client, 60000);
if (status != RSI_SUCCESS) {
if (rsi_wlan_get_status() != RSI_SUCCESS) {
status = rsi_wlan_socket_get_status(rsi_mqtt_client->mqtt_client.ipstack->my_socket);
}
//! Error in receiving
LOG_PRINT("\r\nReceive Data Failed, Error Code : 0x%lX\r\n", status);
return status;
Expand All @@ -506,6 +516,9 @@ int32_t rsi_mqtt_client_app()
//! UnSubscribe to the topic given
status = rsi_mqtt_unsubscribe(rsi_mqtt_client, (int8_t *)RSI_MQTT_TOPIC);
if (status != RSI_SUCCESS) {
if (rsi_wlan_get_status() != RSI_SUCCESS) {
status = rsi_wlan_socket_get_status(rsi_mqtt_client->mqtt_client.ipstack->my_socket);
}
LOG_PRINT("\r\nUnsubscription to Topic Failed, Error Code : 0x%lX\r\n", status);
return status;
} else {
Expand All @@ -515,7 +528,12 @@ int32_t rsi_mqtt_client_app()
//! Disconnect to the MQTT broker
status = rsi_mqtt_disconnect(rsi_mqtt_client);
if (status != RSI_SUCCESS) {
if (rsi_wlan_get_status() != RSI_SUCCESS) {
status = rsi_wlan_socket_get_status(rsi_mqtt_client->mqtt_client.ipstack->my_socket);
}
LOG_PRINT("\r\nDisconnect to the MQTT broker Failed, Error Code : 0x%lX\r\n", status);
// Shut Down the port
mqtt_disconnect(rsi_mqtt_client->mqtt_client.ipstack);
return status;
} else {
LOG_PRINT("\r\nDisconnect to the MQTT broker Success\r\n");
Expand Down
Loading

0 comments on commit a8f1647

Please sign in to comment.