From 7585370e5fc80fec4e48356890b668bffdf1e279 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Fri, 5 Jan 2024 22:48:22 +0800 Subject: [PATCH] [Ameba] Update ci to version 30, and update wifi and LwIP API (#31253) * [Ameba] Update ci to version 30 * [Ameba] LwIP and wifi API update --- .github/workflows/examples-ameba.yaml | 2 +- examples/all-clusters-app/ameba/README.md | 4 ++-- examples/all-clusters-minimal-app/ameba/README.md | 4 ++-- examples/light-switch-app/ameba/README.md | 4 ++-- examples/lighting-app/ameba/README.md | 4 ++-- examples/ota-requestor-app/ameba/README.md | 4 ++-- examples/pigweed-app/ameba/README.md | 4 ++-- src/platform/Ameba/DiagnosticDataProviderImpl.cpp | 4 ++-- src/platform/Ameba/NetworkCommissioningDriver.h | 1 - src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp | 2 +- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index ac1e6d01fde353..ac83fee00247aa 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -36,7 +36,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-ameba:26 + image: ghcr.io/project-chip/chip-build-ameba:30 options: --user root steps: diff --git a/examples/all-clusters-app/ameba/README.md b/examples/all-clusters-app/ameba/README.md index 0ccc472986ed53..8b29a7ba3d542f 100644 --- a/examples/all-clusters-app/ameba/README.md +++ b/examples/all-clusters-app/ameba/README.md @@ -27,11 +27,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:26 + $ docker pull ghcr.io/project-chip/chip-build-ameba:30 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:30 - Setup build environment: diff --git a/examples/all-clusters-minimal-app/ameba/README.md b/examples/all-clusters-minimal-app/ameba/README.md index b7189f9931a11c..a2826c4410072a 100644 --- a/examples/all-clusters-minimal-app/ameba/README.md +++ b/examples/all-clusters-minimal-app/ameba/README.md @@ -27,13 +27,13 @@ The CHIP demo application is supported on - Pull docker image: ``` - $ docker pull ghcr.io/project-chip/chip-build-ameba:26 + $ docker pull ghcr.io/project-chip/chip-build-ameba:30 ``` - Run docker container: ``` - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:30 ``` - Setup build environment: diff --git a/examples/light-switch-app/ameba/README.md b/examples/light-switch-app/ameba/README.md index 15c034ee6f270d..1ddf427b75964e 100644 --- a/examples/light-switch-app/ameba/README.md +++ b/examples/light-switch-app/ameba/README.md @@ -26,11 +26,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:26 + $ docker pull ghcr.io/project-chip/chip-build-ameba:30 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:30 - Setup build environment: diff --git a/examples/lighting-app/ameba/README.md b/examples/lighting-app/ameba/README.md index b17498ce331e79..1cafd3a7a3d306 100644 --- a/examples/lighting-app/ameba/README.md +++ b/examples/lighting-app/ameba/README.md @@ -23,11 +23,11 @@ The CHIP demo application is supported on - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:26 + $ docker pull ghcr.io/project-chip/chip-build-ameba:30 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:30 - Setup build environment: diff --git a/examples/ota-requestor-app/ameba/README.md b/examples/ota-requestor-app/ameba/README.md index 327a987dd2df5e..ba1c4ad80414ba 100644 --- a/examples/ota-requestor-app/ameba/README.md +++ b/examples/ota-requestor-app/ameba/README.md @@ -6,11 +6,11 @@ A prototype application that demonstrates OTA Requestor capabilities. - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:26 + $ docker pull ghcr.io/project-chip/chip-build-ameba:30 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:30 - Setup build environment: diff --git a/examples/pigweed-app/ameba/README.md b/examples/pigweed-app/ameba/README.md index e997d895b40030..920f9d71b01ac0 100644 --- a/examples/pigweed-app/ameba/README.md +++ b/examples/pigweed-app/ameba/README.md @@ -31,11 +31,11 @@ following features are available: - Pull docker image: - $ docker pull ghcr.io/project-chip/chip-build-ameba:26 + $ docker pull ghcr.io/project-chip/chip-build-ameba:30 - Run docker container: - $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:26 + $ docker run -it -v ${CHIP_DIR}:/root/chip ghcr.io/project-chip/chip-build-ameba:30 - Setup build environment: diff --git a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp index 99d1928ef9c52f..e250cb2f3f5050 100644 --- a/src/platform/Ameba/DiagnosticDataProviderImpl.cpp +++ b/src/platform/Ameba/DiagnosticDataProviderImpl.cpp @@ -291,7 +291,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiSecurityType(app::Clusters::WiFiNe unsigned short security = 0; rtw_wifi_setting_t setting; - error = matter_wifi_get_security_type("wlan0", &security, &setting.key_idx, setting.password); + error = matter_wifi_get_security_type(WLAN0_IDX, &security, &setting.key_idx, setting.password); err = AmebaUtils::MapError(error, AmebaErrorType::kWiFiError); if (err != CHIP_NO_ERROR) { @@ -360,7 +360,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiChannelNumber(uint16_t & channelNu int32_t error; unsigned char channel; - error = matter_wifi_get_wifi_channel_number("wlan0", &channel); + error = matter_wifi_get_wifi_channel_number(WLAN0_IDX, &channel); err = AmebaUtils::MapError(error, AmebaErrorType::kWiFiError); if (err != CHIP_NO_ERROR) channelNumber = 0; diff --git a/src/platform/Ameba/NetworkCommissioningDriver.h b/src/platform/Ameba/NetworkCommissioningDriver.h index 0525ac4910f5ec..dd88d3364d89b0 100644 --- a/src/platform/Ameba/NetworkCommissioningDriver.h +++ b/src/platform/Ameba/NetworkCommissioningDriver.h @@ -18,7 +18,6 @@ #pragma once #include "chip_porting.h" #include -#include namespace chip { namespace DeviceLayer { diff --git a/src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp b/src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp index 7d7b1ade12847d..778ec76198e1b1 100644 --- a/src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Ameba/NetworkCommissioningWiFiDriver.cpp @@ -259,7 +259,7 @@ void AmebaWiFiDriver::OnScanWiFiNetworkDone() CHIP_ERROR GetConfiguredNetwork(Network & network) { rtw_wifi_setting_t wifi_setting; - wifi_get_setting(WLAN0_NAME, &wifi_setting); + matter_wifi_get_setting(WLAN0_IDX, &wifi_setting); uint8_t length = strnlen(reinterpret_cast(wifi_setting.ssid), DeviceLayer::Internal::kMaxWiFiSSIDLength); if (length > sizeof(network.networkID))