Skip to content

Commit

Permalink
Upload wifi-connection-manager 3.4.0.2261 [2455]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed May 31, 2024
1 parent 90accf3 commit 0b4fc24
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 24 deletions.
22 changes: 16 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The current implementation has the following features and functionality:
- Support for WPS - Enrollee role
- Exposes Wi-Fi APIs to scan, join, and leave the Wi-Fi network
- Connection monitoring: Monitors active connections and link events. Automatically reconnects to the AP if the connection with the AP is lost intermittently. Notifies the connection state change through the event notification registration mechanism.
- Part of the AnyCloud framework that supports connectivity applications based on FreeRTOS, lwIP, and mbed TLS
- Built on top of the abstraction-rtos library that provides the RTOS abstraction API for FreeRTOS
- Supports connectivity applications based on either FreeRTOS, lwIP, mbed TLS combination or ThreadX, NetX Duo, NetX Secure combination(Currently only supported on CYW955913EVK-01)
- Built on top of the abstraction-rtos library that provides the RTOS abstraction API for FreeRTOS and ThreadX
- Supports multi-core architecture by providing the following APIs as virtual APIs:
- `cy_wcm_is_connected_to_ap`
- `cy_wcm_register_event_callback`
Expand Down Expand Up @@ -52,6 +52,8 @@ This library and its features are supported on the following Infineon platforms:

- [PSoC™ 62S2 evaluation kit (CY8CEVAL-062S2-CYW43022CUB)](https://www.infineon.com/cms/en/product/evaluation-boards/cy8ceval-062s2/)

- [CYW955913EVK-01 Wi-Fi Bluetooth® Prototyping Kit (CYW955913EVK-01)](https://www.infineon.com/CYW955913EVK-01)

**Note**: Virtual APIs are supported on all PSoC 62 devices, but they have only been tested on the CY8CEVAL-062S2-MUR-43439M2 kit.

## Dependent libraries
Expand All @@ -60,21 +62,29 @@ This library depends on the following:

- [wifi-core-freertos-lwip-mbedtls]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls )

- [wifi-core-threadx-cat5]( https://github.com/Infineon/wifi-core-threadx-cat5 ) - For CYW955913EVK-01

- [Wi-Fi Host Driver]( https://github.com/Infineon/wifi-host-driver )

If virtual APIs are to be used, it additionally depends on the [Virtual Connectivity Manager]( https://github.com/Infineon/virtual-connectivity-manager ).

## Quick start

1. To use wifi-connection-manager library for FreeRTOS, lwIP, and mbed TLS, the application should pull the [wifi-core-freertos-lwip-mbedtls]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls ) library which will internally pull wifi-connection-manager, FreeRTOS, lwIP, mbed TLS, and other dependent modules.
1. To use wifi-connection-manager library for FreeRTOS, lwIP, mbed TLS combination, the application should pull the [wifi-core-freertos-lwip-mbedtls]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls ) library which will internally pull wifi-connection-manager, FreeRTOS, lwIP, mbed TLS, and other dependent modules.

To pull [wifi-core-freertos-lwip-mbedtls]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/wifi-core-freertos-lwip-mbedtls/latest-v1.X ), create the *wifi-core-freertos-lwip-mbedtls.mtb* file.

2. To use wifi-connection-manager library for ThreadX, NetX Duo, NetX Secure combination, the application should pull the [wifi-core-threadx-cat5]( https://github.com/Infineon/wifi-core-threadx-cat5 ) library which will internally pull wifi-connection-manager and other dependent modules.

2. To pull [wifi-core-freertos-lwip-mbedtls]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/wifi-core-freertos-lwip-mbedtls/latest-v1.X ), create the *wifi-core-freertos-lwip-mbedtls.mtb* file.
To pull [wifi-core-threadx-cat5]( https://github.com/Infineon/wifi-core-threadx-cat5#latest-v1.X#$$ASSET_REPO$$/wifi-core-threadx-cat5/latest-v1.X ), create the *wifi-core-threadx-cat5.mtb* file.

3. For existing Wi-Fi Connection Manager version 2.x users, a [porting guide]( https://github.com/Infineon/wifi-connection-manager/blob/master/porting_guide.md ) is available to migrate to Wi-Fi Connection Manager version 3.0.

4. Review the pre-defined configuration files bundled with the wifi-core-freertos-lwip-mbedtls library for FreeRTOS, lwIP, and mbed TLS and make adjustments. See the "Quick start" section in [README.md]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls/blob/master/README.md ).

5. Define a set of COMPONENTS in the code example project's Makefile for this library. See the "Quick start" section in [README.md]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls/blob/master/README.md ).
5. Define a set of COMPONENTS in the code example project's Makefile for this library.
- For FreeRTOS, lwIP, Mbed TLS combination see the "Quick start" section in [README.md]( https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls/blob/master/README.md )
- For ThreadX, NetX Duo, NetX Secure combination see the "Quick start" section in [README.md]( https://github.com/Infineon/wifi-core-threadx-cat5/blob/master/README.md )

6. WPS is disabled by default. WPS uses Mbed TLS security stack. Enable the following components for WPS:
```
Expand Down Expand Up @@ -129,4 +139,4 @@ If virtual APIs are to be used, it additionally depends on the [Virtual Connecti
- [Wi-Fi Connection Manager version]( ./version.xml )
- [ModusToolbox™ any cloud code examples]( https://github.com/Infineon?q=mtb-example-anycloud%20NOT%20Deprecated )
- [ModusToolbox™ code examples]( https://github.com/Infineon/Code-Examples-for-ModusToolbox-Software )
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ See the [README.md](./README.md) for a complete description of the Wi-Fi Connect

## Changelog

### v3.4.0

- Added support for CYW955913EVK-01 kit

### v3.3.1

- Minor bug fixes
Expand Down
24 changes: 18 additions & 6 deletions docs/api_reference_manual/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ <h1><a class="anchor" id="section_features"></a>
<li>Support for Wi-Fi Protected Setup (WPS) - Enrollee role</li>
<li>Exposes Wi-Fi APIs to scan, join, and leave the Wi-Fi network</li>
<li>Connection monitoring: Monitors active connections and link events. Automatically reconnects to the AP if the connection with the AP is lost intermittently. Notifies the connection state change through event the notification registration mechanism.</li>
<li>Part of the ModusToolbox&trade; environment that supports connectivity applications based on FreeRTOS, lwIP, and mbed TLS</li>
<li>The library is built on top of the abstraction-rtos library that provides RTOS abstraction API for FreeRTOS</li>
<li>Supports connectivity applications based on either FreeRTOS, lwIP, mbed TLS combination or ThreadX, NetX Duo, NetX Secure combination(Currently only supported on CYW955913EVK-01)</li>
<li>The library is built on top of the abstraction-rtos library that provides RTOS abstraction API for FreeRTOS and ThreadX</li>
<li>Supports multi-core architecture by providing the following APIs as virtual APIs which can be invoked from another core:<ul>
<li>cy_wcm_is_connected_to_ap</li>
<li>cy_wcm_register_event_callback</li>
Expand All @@ -119,24 +119,36 @@ <h1><a class="anchor" id="section_supported_platforms"></a>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/cyw943907aeval1f/">CYW943907AEVAL1F Evaluation Kit(CYW943907AEVAL1F)</a></li>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/cy8ceval-062s2/">PSoC&trade; 62S2 evaluation kit (CY8CEVAL-062S2-MUR-43439M2)</a></li>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc72_evk/">XMC7200D-E272K8384 kit (KIT_XMC72_EVK_MUR_43439M2)</a></li>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/cy8ceval-062s2/">PSoC&trade; 62S2 evaluation kit (CY8CEVAL-062S2-CYW43022CUB)</a> <dl class="section note"><dt>Note</dt><dd>Virtual APIs are supported on all PSoC 62 devices, but they have only been tested on the CY8CEVAL-062S2-MUR-43439M2 kit.</dd></dl>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/cy8ceval-062s2/">PSoC&trade; 62S2 evaluation kit (CY8CEVAL-062S2-CYW43022CUB)</a></li>
<li><a href="https://www.infineon.com/CYW955913EVK-01">CYW955913EVK-01 Wi-Fi Bluetooth&reg; Prototyping Kit (CYW955913EVK-01)</a> <dl class="section note"><dt>Note</dt><dd>Virtual APIs are supported on all PSoC 62 devices, but they have only been tested on the CY8CEVAL-062S2-MUR-43439M2 kit.</dd></dl>
</li>
</ul>
<h1><a class="anchor" id="section_dependencies"></a>
Dependent libraries</h1>
<p >This library is bundled in <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls">wifi-core-freertos-lwip-mbedtls</a> by default. The wifi-core-freertos-lwip-mbedtls library helps code examples to fetch all the components needed to enable Wi-Fi connectivity.</p>
<p >This library is bundled in <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls">wifi-core-freertos-lwip-mbedtls</a> by default. The wifi-core-freertos-lwip-mbedtls library helps code examples to fetch all the components needed to enable Wi-Fi connectivity.</p><ul>
<li>For CYW955913EVK-01 this library will be bundled in <a href="https://github.com/Infineon/wifi-core-threadx-cat5">wifi-core-threadx-cat5</a>.</li>
</ul>
<p >If virtual APIs are to be used, it additionally depends on <a href="https://github.com/Infineon/virtual-connectivity-manager">Virtual Connectivity Manager</a> library.</p>
<h1><a class="anchor" id="section_integration"></a>
Quick start</h1>
<ul>
<li>To use wifi-connection-manager library for FreeRTOS, lwIP, and mbed TLS, the application should pull <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls">wifi-core-freertos-lwip-mbedtls</a> library which will internally pull wifi-connection-manager, FreeRTOS, lwIP, mbed TLS and other dependent modules.</li>
<li>To use wifi-connection-manager library for FreeRTOS, lwIP, mbed TLS combination, the application should pull the <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls">wifi-core-freertos-lwip-mbedtls</a> library which will internally pull wifi-connection-manager, FreeRTOS, lwIP, mbed TLS, and other dependent modules.</li>
<li>To pull wifi-core-freertos-lwip-mbedtls create the following .mtb file in deps folder.<ul>
<li>wifi-core-freertos-lwip-mbedtls.mtb: <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/wifi-core-freertos-lwip-mbedtls/latest-v1.X">https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/wifi-core-freertos-lwip-mbedtls/latest-v1.X</a></li>
</ul>
</li>
<li>To use wifi-connection-manager library for ThreadX, NetX Duo, NetX Secure combination, the application should pull the <a href="https://github.com/Infineon/wifi-core-threadx-cat5">wifi-core-threadx-cat5</a> library which will internally pull wifi-connection-manager and other dependent modules.</li>
<li>To pull wifi-core-threadx-cat5 create the following .mtb file in deps folder.<ul>
<li>wifi-core-threadx-cat5.mtb: <a href="https://github.com/Infineon/wifi-core-threadx-cat5#latest-v1.X#$$ASSET_REPO$$/wifi-core-threadx-cat5/latest-v1.X">https://github.com/Infineon/wifi-core-threadx-cat5#latest-v1.X#$$ASSET_REPO$$/wifi-core-threadx-cat5/latest-v1.X</a></li>
</ul>
</li>
<li>For existing Wi-Fi Connection Manager version 2.x users, a <a href="https://github.com/Infineon/wifi-connection-manager/blob/master/porting_guide.md">porting guide</a> is available to migrate to Wi-Fi Connection Manager version 3.0.</li>
<li>Review the pre-defined configuration files bundled with the wifi-core-freertos-lwip-mbedtls library for FreeRTOS, lwIP, and mbed TLS, and make adjustments. See the quick start section in <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls/blob/master/README.md">README.md</a>.</li>
<li>Define a set of COMPONENTS in the code example project's Makefile for this library. See the quick start section in <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls/blob/master/README.md">README.md</a>.</li>
<li>Define a set of COMPONENTS in the code example project's Makefile for this library.<ul>
<li>For FreeRTOS, lwIP, Mbed TLS combination see the quick start section in <a href="https://github.com/Infineon/wifi-core-freertos-lwip-mbedtls/blob/master/README.md">README.md</a>.</li>
<li>For ThreadX, NetX Duo, NetX Secure combination see the quick start section in <a href="https://github.com/Infineon/wifi-core-threadx-cat5/blob/master/README.md">README.md</a>.</li>
</ul>
</li>
<li>WPS is disabled by default. WPS uses Mbed TLS security stack. Enable the following components for WPS: <div class="fragment"><div class="line">COMPONENTS+=WPS MBEDTLS</div>
</div><!-- fragment --></li>
<li>The WCM library disables all the debug log messages by default. To enable log messages, the application must perform the following:<ol type="1">
Expand Down
47 changes: 36 additions & 11 deletions source/cy_wcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,13 @@ cy_rslt_t cy_wcm_connect_ap(cy_wcm_connect_params_t *connect_params, cy_wcm_ip_a
}
}

/* Call Offload init after connect to AP */
if ((is_olm_initialized == false) && ( olm_instance != NULL))
{
cy_olm_init_ols(olm_instance, whd_ifs[CY_WCM_INTERFACE_TYPE_STA], NULL);
is_olm_initialized = true;
}

/* Register for Link events*/
res = whd_management_set_event_handler(whd_ifs[CY_WCM_INTERFACE_TYPE_STA], sta_link_events, link_events_handler, NULL, &sta_event_handler_index);
if(res != CY_RSLT_SUCCESS)
Expand Down Expand Up @@ -1618,13 +1625,6 @@ cy_rslt_t cy_wcm_connect_ap(cy_wcm_connect_params_t *connect_params, cy_wcm_ip_a
goto exit;
}
}

/* Call Offload init after connect to AP */
if ((is_olm_initialized == false) && ( olm_instance != NULL))
{
cy_olm_init_ols(olm_instance, whd_ifs[CY_WCM_INTERFACE_TYPE_STA], NULL);
is_olm_initialized = true;
}
}
else
{
Expand Down Expand Up @@ -2550,9 +2550,9 @@ cy_rslt_t cy_wcm_get_gateway_mac_address(cy_wcm_mac_t *mac_addr)
return CY_RSLT_WCM_INTERFACE_NOT_SUPPORTED;
}

if(!nw_sta_if_ctx->is_initialized)
if(!is_sta_network_up)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "network interface is NULL \r\n");
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "Network is not up, call cy_wcm_connect_ap API to bring network up \r\n");
return CY_RSLT_WCM_NETIF_DOES_NOT_EXIST;
}

Expand Down Expand Up @@ -3647,10 +3647,23 @@ static void sta_link_up_handler(void* arg)
{
UNUSED_PARAMETER(arg);
cy_rslt_t res = CY_RSLT_SUCCESS;

if(cy_rtos_get_mutex(&wcm_mutex, CY_WCM_MAX_MUTEX_WAIT_TIME_MS) != CY_RSLT_SUCCESS)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "Link UP: Unable to acquire WCM mutex \n");
return;
}
res = cy_network_ip_up(nw_sta_if_ctx);
if(res == CY_RSLT_SUCCESS)
{
is_sta_network_up = true;
}
if(cy_rtos_set_mutex(&wcm_mutex) != CY_RSLT_SUCCESS)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "Link UP: Unable to Release WCM mutex \n");
}
if(res == CY_RSLT_SUCCESS)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_INFO, "Notify application that network is connected again!\n");
invoke_app_callbacks(CY_WCM_EVENT_RECONNECTED, NULL);
}
Expand Down Expand Up @@ -3690,15 +3703,27 @@ static void sta_link_down_handler(void* arg)
cy_rslt_t res = CY_RSLT_SUCCESS;
cy_wcm_event_data_t event_data;

if(cy_rtos_get_mutex(&wcm_mutex, CY_WCM_MAX_MUTEX_WAIT_TIME_MS) != CY_RSLT_SUCCESS)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "Link Down: Unable to acquire WCM mutex \n");
return;
}
res = cy_network_ip_down(nw_sta_if_ctx);
if(res == CY_RSLT_SUCCESS)
{
is_sta_network_up = false;
}
if(cy_rtos_set_mutex(&wcm_mutex) != CY_RSLT_SUCCESS)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_ERR, "Link Down: Unable to Release WCM mutex \n");
}
if(res == CY_RSLT_SUCCESS)
{
cy_wcm_log_msg(CYLF_MIDDLEWARE, CY_LOG_INFO, "Notify application that network is down!\n");
/* Store the reason for disconnection as received from WHD */
event_data.reason = (cy_wcm_reason_code)arg;
invoke_app_callbacks(CY_WCM_EVENT_DISCONNECTED, &event_data);
}
is_sta_network_up = false;
}
static void hanshake_retry_timer(cy_timer_callback_arg_t arg)
{
Expand Down Expand Up @@ -3950,7 +3975,7 @@ void notify_ip_change(void *arg)
}
}
}
}
}


static bool check_if_platform_supports_band(whd_interface_t interface, cy_wcm_wifi_band_t requested_band)
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<version>3.3.1.2233</version>
<version>3.4.0.2261</version>

0 comments on commit 0b4fc24

Please sign in to comment.