From 0b4fc24884025a92d4b8349e46146b6592850083 Mon Sep 17 00:00:00 2001 From: gitlab-runner Date: Fri, 31 May 2024 11:08:41 -0500 Subject: [PATCH] Upload wifi-connection-manager 3.4.0.2261 [2455] --- README.md | 22 ++++++++--- RELEASE.md | 4 ++ docs/api_reference_manual/html/index.html | 24 +++++++++--- source/cy_wcm.c | 47 +++++++++++++++++------ version.xml | 2 +- 5 files changed, 75 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 0564fc4..a5ee04a 100644 --- a/README.md +++ b/README.md @@ -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` @@ -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 @@ -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: ``` @@ -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 ) diff --git a/RELEASE.md b/RELEASE.md index 74a2e36..db5701c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -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 diff --git a/docs/api_reference_manual/html/index.html b/docs/api_reference_manual/html/index.html index 10cd437..ad12f2e 100644 --- a/docs/api_reference_manual/html/index.html +++ b/docs/api_reference_manual/html/index.html @@ -99,8 +99,8 @@

  • Support for Wi-Fi Protected Setup (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 event the notification registration mechanism.
  • -
  • Part of the ModusToolbox™ environment that supports connectivity applications based on FreeRTOS, lwIP, and mbed TLS
  • -
  • The library is built on top of the abstraction-rtos library that provides 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)
  • +
  • The library is built on top of the abstraction-rtos library that provides RTOS abstraction API for FreeRTOS and ThreadX
  • Supports multi-core architecture by providing the following APIs as virtual APIs which can be invoked from another core:

    Dependent libraries

    -

    This library is bundled in wifi-core-freertos-lwip-mbedtls by default. The wifi-core-freertos-lwip-mbedtls library helps code examples to fetch all the components needed to enable Wi-Fi connectivity.

    +

    This library is bundled in wifi-core-freertos-lwip-mbedtls by default. The wifi-core-freertos-lwip-mbedtls library helps code examples to fetch all the components needed to enable Wi-Fi connectivity.

    If virtual APIs are to be used, it additionally depends on Virtual Connectivity Manager library.

    Quick start

      -
    • To use wifi-connection-manager library for FreeRTOS, lwIP, and mbed TLS, the application should pull wifi-core-freertos-lwip-mbedtls library which will internally pull wifi-connection-manager, FreeRTOS, lwIP, mbed TLS and other dependent modules.
    • +
    • To use wifi-connection-manager library for FreeRTOS, lwIP, mbed TLS combination, the application should pull the 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 create the following .mtb file in deps folder.
    • +
    • To use wifi-connection-manager library for ThreadX, NetX Duo, NetX Secure combination, the application should pull the wifi-core-threadx-cat5 library which will internally pull wifi-connection-manager and other dependent modules.
    • +
    • To pull wifi-core-threadx-cat5 create the following .mtb file in deps folder. +
    • For existing Wi-Fi Connection Manager version 2.x users, a porting guide is available to migrate to Wi-Fi Connection Manager version 3.0.
    • 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.
    • -
    • Define a set of COMPONENTS in the code example project's Makefile for this library. See the quick start section in README.md.
    • +
    • 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.
      • +
      • For ThreadX, NetX Duo, NetX Secure combination see the quick start section in README.md.
      • +
      +
    • WPS is disabled by default. WPS uses Mbed TLS security stack. Enable the following components for WPS:
      COMPONENTS+=WPS MBEDTLS
    • The WCM library disables all the debug log messages by default. To enable log messages, the application must perform the following:
        diff --git a/source/cy_wcm.c b/source/cy_wcm.c index 0d37f7f..7087450 100644 --- a/source/cy_wcm.c +++ b/source/cy_wcm.c @@ -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) @@ -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 { @@ -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; } @@ -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); } @@ -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) { @@ -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) diff --git a/version.xml b/version.xml index 8b97fcd..28d7679 100644 --- a/version.xml +++ b/version.xml @@ -1 +1 @@ -3.3.1.2233 +3.4.0.2261