diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 7dffee02ff57ac..0c8a96c0b1aea0 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -91,6 +91,15 @@ jobs: examples/pigweed-app/mbed/build-CY8CPROTO_062_4343W/release/chip-mbed-pigweed-app-example.elf \ /tmp/bloat_reports/ + - name: Build all-clusters-app example + timeout-minutes: 10 + run: | + scripts/examples/mbed_example.sh -a=all-clusters-app -b=$APP_TARGET -p=$APP_PROFILE + .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ + mbed $APP_TARGET+$APP_PROFILE all-clusters-app \ + examples/all-clusters-app/mbed/build-CY8CPROTO_062_4343W/release/chip-mbed-all-clusters-app-example.elf \ + /tmp/bloat_reports/ + - name: Build unit tests timeout-minutes: 10 run: scripts/tests/mbed/mbed_unit_tests.sh -b=$APP_TARGET -p=$APP_PROFILE @@ -102,6 +111,8 @@ jobs: /tmp/output_binaries/$BUILD_TYPE-build/lock-app-$APP_TARGET-$APP_PROFILE.hex cp examples/lighting-app/mbed/build-$APP_TARGET/$APP_PROFILE/chip-mbed-lighting-app-example.hex \ /tmp/output_binaries/$BUILD_TYPE-build/lighting-app-$APP_TARGET-$APP_PROFILE.hex + cp examples/all-clusters-app/mbed/build-$APP_TARGET/$APP_PROFILE/chip-mbed-all-clusters-app-example.hex \ + /tmp/output_binaries/$BUILD_TYPE-build/all-clusters-app-$APP_TARGET-$APP_PROFILE.hex - name: Binary artifacts suffix id: outsuffix diff --git a/.vscode/launch.json b/.vscode/launch.json index 525199c828b670..ac398fc811a801 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -310,7 +310,12 @@ "type": "pickString", "id": "mbedApp", "description": "What mbed application do you want to use?", - "options": ["lock-app", "lighting-app", "pigweed-app"], + "options": [ + "lock-app", + "lighting-app", + "pigweed-app", + "all-clusters-app" + ], "default": "lock-app" }, { diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9e88311c5dce57..f8bdee88c8a4cc 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -184,7 +184,12 @@ "type": "pickString", "id": "mbedApp", "description": "What mbed application do you want to use?", - "options": ["lock-app", "lighting-app", "pigweed-app"], + "options": [ + "lock-app", + "lighting-app", + "pigweed-app", + "all-clusters-app" + ], "default": "lock-app" }, { diff --git a/examples/all-clusters-app/mbed/.gitignore b/examples/all-clusters-app/mbed/.gitignore new file mode 100644 index 00000000000000..58f6e14fd6f5b2 --- /dev/null +++ b/examples/all-clusters-app/mbed/.gitignore @@ -0,0 +1,2 @@ +config/ +build-*/ diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt new file mode 100644 index 00000000000000..4922a534d6bc39 --- /dev/null +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -0,0 +1,144 @@ +# Copyright (c) 2021 ARM Limited. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 + +cmake_minimum_required(VERSION 3.19.0) + +get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) +get_filename_component(APP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/.. REALPATH) +get_filename_component(MBED_COMMON ${CHIP_ROOT}/examples/platform/mbed REALPATH) +get_filename_component(APP_UTIL ${CHIP_ROOT}/src/app/util REALPATH) +get_filename_component(APP_CLUSTERS ${CHIP_ROOT}/src/app/clusters REALPATH) +get_filename_component(GEN_DIR ${CHIP_ROOT}/zzz_generated/ REALPATH) + +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/config.in + ${CMAKE_CURRENT_BINARY_DIR}/chip_build/config + @ONLY +) + +set(MBED_PATH $ENV{MBED_OS_PATH} CACHE INTERNAL "") +set(MBED_CONFIG_PATH ${CMAKE_CURRENT_BINARY_DIR} CACHE INTERNAL "") +set(APP_TARGET chip-mbed-all-clusters-app-example) + +include(${MBED_PATH}/tools/cmake/app.cmake) + +project(${APP_TARGET}) + +add_subdirectory(${MBED_PATH} ./mbed_build) +add_subdirectory($ENV{MBED_OS_POSIX_SOCKET_PATH} ./mbed_os_posix_socket_build) + +add_executable(${APP_TARGET}) + +add_subdirectory(${CHIP_ROOT}/config/mbed ./chip_build) + +mbed_configure_app_target(${APP_TARGET}) + +target_include_directories(${APP_TARGET} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_SOURCE_DIR}/main/include/ + ${APP_ROOT}/all-clusters-common + ${MBED_COMMON}/util/include + ${CHIP_ROOT}/src/app + ${CHIP_ROOT}/third_party/nlio/repo/include + ${GEN_DIR}/all-clusters-app + ${GEN_DIR}/ota-provider-app + ${GEN_DIR}/app-common +) + +target_sources(${APP_TARGET} PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/main/main.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/main/AppTask.cpp + ${CMAKE_CURRENT_SOURCE_DIR}/main/LowPowerManager.cpp + + ${MBED_COMMON}/util/LEDWidget.cpp + + ${GEN_DIR}/all-clusters-app/zap-generated/attribute-size.cpp + ${GEN_DIR}/all-clusters-app/zap-generated/callback-stub.cpp + ${GEN_DIR}/all-clusters-app/zap-generated/CHIPClientCallbacks.cpp + ${GEN_DIR}/all-clusters-app/zap-generated/CHIPClusters.cpp + ${GEN_DIR}/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp + ${GEN_DIR}/app-common/app-common/zap-generated/attributes/Accessors.cpp + ${GEN_DIR}/app-common/app-common/zap-generated/cluster-objects.cpp + + ${CHIP_ROOT}/src/app/server/EchoHandler.cpp + ${CHIP_ROOT}/src/app/server/Dnssd.cpp + ${CHIP_ROOT}/src/app/server/OnboardingCodesUtil.cpp + ${CHIP_ROOT}/src/app/server/Server.cpp + ${CHIP_ROOT}/src/app/server/CommissioningWindowManager.cpp + + ${APP_UTIL}/DataModelHandler.cpp + ${APP_UTIL}/af-event.cpp + ${APP_UTIL}/af-main-common.cpp + ${APP_UTIL}/attribute-storage.cpp + ${APP_UTIL}/attribute-table.cpp + ${APP_UTIL}/attribute-size-util.cpp + ${APP_UTIL}/attribute-list-byte-span.cpp + ${APP_UTIL}/binding-table.cpp + ${APP_UTIL}/chip-message-send.cpp + ${APP_UTIL}/client-api.cpp + ${APP_UTIL}/ember-print.cpp + ${APP_UTIL}/ember-compatibility-functions.cpp + ${APP_UTIL}/message.cpp + ${APP_UTIL}/process-cluster-message.cpp + ${APP_UTIL}/process-global-message.cpp + ${APP_UTIL}/util.cpp + ${APP_UTIL}/error-mapping.cpp + + ${APP_CLUSTERS}/basic/basic.cpp + ${APP_CLUSTERS}/bindings/bindings.cpp + ${APP_CLUSTERS}/on-off-server/on-off-server.cpp + ${APP_CLUSTERS}/account-login-server/account-login-server.cpp + ${APP_CLUSTERS}/application-launcher-server/application-launcher-server.cpp + ${APP_CLUSTERS}/audio-output-server/audio-output-server.cpp + ${APP_CLUSTERS}/barrier-control-server/barrier-control-server.cpp + ${APP_CLUSTERS}/basic/basic.cpp + ${APP_CLUSTERS}/bindings/bindings.cpp + ${APP_CLUSTERS}/color-control-server/color-control-server.cpp + ${APP_CLUSTERS}/content-launch-server/content-launch-server.cpp + ${APP_CLUSTERS}/descriptor/descriptor.cpp + ${APP_CLUSTERS}/door-lock-server/door-lock-server-core.cpp + ${APP_CLUSTERS}/door-lock-server/door-lock-server-logging.cpp + ${APP_CLUSTERS}/door-lock-server/door-lock-server-schedule.cpp + ${APP_CLUSTERS}/door-lock-server/door-lock-server-user.cpp + ${APP_CLUSTERS}/general-commissioning-server/general-commissioning-server.cpp + ${APP_CLUSTERS}/groups-server/groups-server.cpp + ${APP_CLUSTERS}/ias-zone-server/ias-zone-server.cpp + ${APP_CLUSTERS}/keypad-input-server/keypad-input-server.cpp + ${APP_CLUSTERS}/level-control/level-control.cpp + ${APP_CLUSTERS}/low-power-server/low-power-server.cpp + ${APP_CLUSTERS}/media-input-server/media-input-server.cpp + ${APP_CLUSTERS}/media-playback-server/media-playback-server.cpp + ${APP_CLUSTERS}/network-commissioning/network-commissioning-ember.cpp + ${APP_CLUSTERS}/network-commissioning/network-commissioning.cpp + ${APP_CLUSTERS}/on-off-server/on-off-server.cpp + ${APP_CLUSTERS}/ota-provider/ota-provider.cpp + ${APP_CLUSTERS}/scenes/scenes.cpp + ${APP_CLUSTERS}/target-navigator-server/target-navigator-server.cpp + ${APP_CLUSTERS}/tv-channel-server/tv-channel-server.cpp + ${APP_CLUSTERS}/operational-credentials-server/operational-credentials-server.cpp + ${APP_CLUSTERS}/test-cluster-server/test-cluster-server.cpp + ${APP_CLUSTERS}/occupancy-sensor-server/occupancy-sensor-server.cpp + ${APP_CLUSTERS}/diagnostic-logs-server/diagnostic-logs-server.cpp + ${APP_CLUSTERS}/ethernet_network_diagnostics_server/ethernet_network_diagnostics_server.cpp + ${APP_CLUSTERS}/software_diagnostics_server/software_diagnostics_server.cpp + ${APP_CLUSTERS}/thread_network_diagnostics_server/thread_network_diagnostics_server.cpp + ${APP_CLUSTERS}/wifi_network_diagnostics_server/wifi_network_diagnostics_server.cpp + ${APP_CLUSTERS}/pump-configuration-and-control-server/pump-configuration-and-control-server.cpp + ${APP_CLUSTERS}/administrator-commissioning-server/administrator-commissioning-server.cpp + ${APP_CLUSTERS}/identify-server/identify-server.cpp + ${APP_CLUSTERS}/window-covering-server/window-covering-server.cpp + ${APP_CLUSTERS}/general_diagnostics_server/general_diagnostics_server.cpp +) + +target_link_libraries(${APP_TARGET} mbed-os-posix-socket mbed-os mbed-ble mbed-events mbed-netsocket mbed-storage mbed-storage-kv-global-api mbed-mbedtls mbed-emac chip) + +if(MBED_TARGET STREQUAL "CY8CPROTO_062_4343W") + target_link_libraries(${APP_TARGET} mbed-cy-psoc6-common-network) +endif() + +mbed_set_post_build(${APP_TARGET}) + +option(VERBOSE_BUILD "Have a verbose build process") +if(VERBOSE_BUILD) + set(CMAKE_VERBOSE_MAKEFILE ON) +endif() diff --git a/examples/all-clusters-app/mbed/config.in b/examples/all-clusters-app/mbed/config.in new file mode 100644 index 00000000000000..2542a38c16f4c3 --- /dev/null +++ b/examples/all-clusters-app/mbed/config.in @@ -0,0 +1,5 @@ +CONFIG_CHIP_BUILD_TESTS=n +CONFIG_CHIP_WITH_EXTERNAL_MBEDTLS=y +CONFIG_CHIP_PROJECT_CONFIG=main/include/CHIPProjectConfig.h +CONFIG_CHIP_BYPASS_RENDEZVOUS=n +CONFIG_MBED_BSD_SOCKET_TRACE=n \ No newline at end of file diff --git a/examples/all-clusters-app/mbed/main/AppTask.cpp b/examples/all-clusters-app/mbed/main/AppTask.cpp new file mode 100644 index 00000000000000..97946f86ab6326 --- /dev/null +++ b/examples/all-clusters-app/mbed/main/AppTask.cpp @@ -0,0 +1,143 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AppTask.h" +#include "LEDWidget.h" +#include + +#include +#include +#include +#include + +#include + +static LEDWidget sStatusLED(MBED_CONF_APP_SYSTEM_STATE_LED); + +static bool sIsWiFiStationProvisioned = false; +static bool sIsWiFiStationEnabled = false; +static bool sIsWiFiStationConnected = false; +static bool sIsPairedToAccount = false; +static bool sHaveBLEConnections = false; + +static events::EventQueue sAppEventQueue; + +using namespace ::chip::DeviceLayer; +using namespace ::chip::Credentials; + +AppTask AppTask::sAppTask; + +int AppTask::Init() +{ + // Register the callback to init the MDNS server when connectivity is available + PlatformMgr().AddEventHandler( + [](const ChipDeviceEvent * event, intptr_t arg) { + // Restart the server whenever an ip address is renewed + if (event->Type == DeviceEventType::kInternetConnectivityChange) + { + if (event->InternetConnectivityChange.IPv4 == kConnectivity_Established || + event->InternetConnectivityChange.IPv6 == kConnectivity_Established) + { + chip::app::DnssdServer::Instance().StartServer(); + } + } + }, + 0); + + // Start BLE advertising if needed + if (!CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART) + { + ChipLogProgress(NotSpecified, "Enabling BLE advertising."); + ConnectivityMgr().SetBLEAdvertisingEnabled(true); + } + + chip::DeviceLayer::ConnectivityMgrImpl().StartWiFiManagement(); + + // Init ZCL Data Model and start server + chip::Server::GetInstance().Init(); + + // Initialize device attestation config + SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); + ConfigurationMgr().LogDeviceConfig(); + // QR code will be used with CHIP Tool + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + + return 0; +} + +int AppTask::StartApp() +{ + int ret = Init(); + if (ret) + { + ChipLogError(NotSpecified, "AppTask.Init() failed"); + return ret; + } + + ChipLogProgress(NotSpecified, "Mbed all-clusters-app example application run"); + + while (true) + { + sAppEventQueue.dispatch(100); + + // Collect connectivity and configuration state from the CHIP stack. Because the + // CHIP event loop is being run in a separate task, the stack must be locked + // while these values are queried. However we use a non-blocking lock request + // (TryLockChipStack()) to avoid blocking other UI activities when the CHIP + // task is busy (e.g. with a long crypto operation). + + if (PlatformMgr().TryLockChipStack()) + { + sIsWiFiStationProvisioned = ConnectivityMgr().IsWiFiStationProvisioned(); + sIsWiFiStationEnabled = ConnectivityMgr().IsWiFiStationEnabled(); + sIsWiFiStationConnected = ConnectivityMgr().IsWiFiStationConnected(); + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); + PlatformMgr().UnlockChipStack(); + } + + // Update the status LED + // + // If system is connected to Wi-Fi station, keep the LED On constantly. + // + // If Wi-Fi is provisioned, but not connected to Wi-Fi station yet + // THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink the LEDs at an even + // rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sIsWiFiStationConnected) + { + sStatusLED.Set(true); + } + else if (sIsWiFiStationProvisioned && sIsWiFiStationEnabled && sIsPairedToAccount && !sIsWiFiStationConnected) + { + sStatusLED.Blink(950, 50); + } + else if (sHaveBLEConnections) + { + sStatusLED.Blink(100, 100); + } + else + { + sStatusLED.Blink(50, 950); + } + + sStatusLED.Animate(); + } +} diff --git a/examples/all-clusters-app/mbed/main/LowPowerManager.cpp b/examples/all-clusters-app/mbed/main/LowPowerManager.cpp new file mode 100644 index 00000000000000..fc1a1f2b4dc950 --- /dev/null +++ b/examples/all-clusters-app/mbed/main/LowPowerManager.cpp @@ -0,0 +1,22 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +bool lowPowerClusterSleep() +{ + return true; +} diff --git a/examples/all-clusters-app/mbed/main/include/AppTask.h b/examples/all-clusters-app/mbed/main/include/AppTask.h new file mode 100644 index 00000000000000..a1ee9761ae6a2a --- /dev/null +++ b/examples/all-clusters-app/mbed/main/include/AppTask.h @@ -0,0 +1,37 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +class AppTask +{ +public: + int StartApp(); + +private: + friend AppTask & GetAppTask(void); + + int Init(); + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} diff --git a/examples/all-clusters-app/mbed/main/include/CHIPProjectConfig.h b/examples/all-clusters-app/mbed/main/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..896d53ec97a572 --- /dev/null +++ b/examples/all-clusters-app/mbed/main/include/CHIPProjectConfig.h @@ -0,0 +1,35 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 +#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 1 + +// Use a default pairing code if one hasn't been provisioned in flash. +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 +#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 diff --git a/examples/all-clusters-app/mbed/main/main.cpp b/examples/all-clusters-app/mbed/main/main.cpp new file mode 100644 index 00000000000000..f92a5faf85c5f0 --- /dev/null +++ b/examples/all-clusters-app/mbed/main/main.cpp @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AppTask.h" + +#include "mbedtls/platform.h" +#include +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::Inet; +using namespace ::chip::DeviceLayer; +using namespace ::chip::Logging::Platform; + +int main(int argc, char * argv[]) +{ + int ret = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + + mbed_logging_init(); + + ChipLogProgress(NotSpecified, "Mbed all-clusters-app example application start"); + + ret = mbedtls_platform_setup(NULL); + if (ret) + { + ChipLogError(NotSpecified, "Mbed TLS platform initialization failed [%d]", ret); + goto exit; + } + + err = chip::Platform::MemoryInit(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Memory initalization failed: %s", err.AsString()); + ret = EXIT_FAILURE; + goto exit; + } + + err = PlatformMgr().InitChipStack(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Chip stack initalization failed: %s", err.AsString()); + ret = EXIT_FAILURE; + goto exit; + } + +#ifdef MBED_CONF_APP_BLE_DEVICE_NAME + err = ConnectivityMgr().SetBLEDeviceName(MBED_CONF_APP_BLE_DEVICE_NAME); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Set BLE device name failed: %s", err.AsString()); + ret = EXIT_FAILURE; + goto exit; + } +#endif + + err = PlatformMgr().StartEventLoopTask(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Chip stack start failed: %s", err.AsString()); + ret = EXIT_FAILURE; + goto exit; + } + + ret = GetAppTask().StartApp(); + +exit: + ChipLogProgress(NotSpecified, "Exited with code %d", ret); + return ret; +} diff --git a/examples/all-clusters-app/mbed/mbed_app.json b/examples/all-clusters-app/mbed/mbed_app.json new file mode 100644 index 00000000000000..6271cbc091cf58 --- /dev/null +++ b/examples/all-clusters-app/mbed/mbed_app.json @@ -0,0 +1,43 @@ +{ + "macros": ["MBEDTLS_USER_CONFIG_FILE=\"chip_mbedtls_config.h\""], + "target_overrides": { + "*": { + "platform.stdio-baud-rate": 115200, + "lwip.ipv6-enabled": true, + "lwip.raw-socket-enabled": true, + "nsapi.default-wifi-security": "WPA_WPA2", + "nsapi.default-wifi-ssid": "\"YOUR_SSID\"", + "nsapi.default-wifi-password": "\"YOUR_PASSWORD\"", + "mbed-trace.max-level": "TRACE_LEVEL_DEBUG", + "mbed-trace.enable": true, + "target.printf_lib": "std" + }, + "CY8CPROTO_062_4343W": { + "target.network-default-interface-type": "WIFI", + "target.macros_add": [ + "MXCRYPTO_DISABLED", + "NL_ASSERT_LOG=NL_ASSERT_LOG_DEFAULT", + "NL_ASSERT_EXPECT_FLAGS=NL_ASSERT_FLAG_LOG", + "WHD_PRINT_DISABLE" + ] + } + }, + "config": { + "led-active-state": { + "help": "GPIO output to turn the LED on.", + "value": 0 + }, + "system-state-led": { + "help": "System status LED.", + "value": "LED1" + }, + "ble-device-name": { + "help": "Name used for BLE advertising.", + "value": "\"MBED-clusters\"" + }, + "use-gatt-indication-ack-hack": { + "help": "Fake a TX transfer confirmation. Send a 'kCHIPoBLEIndicateConfirm' event as soon as data is sent, without waiting for the actual ACK from the GATT client. This hack has to stay until we provide a fix in the Mbed OS repo.", + "value": 1 + } + } +} diff --git a/scripts/examples/mbed_example.sh b/scripts/examples/mbed_example.sh index a56fd81c5f4984..caf93e2ce2b636 100755 --- a/scripts/examples/mbed_example.sh +++ b/scripts/examples/mbed_example.sh @@ -22,7 +22,7 @@ cd "$CHIP_ROOT"/examples SUPPORTED_TOOLCHAIN=(GCC_ARM ARM) SUPPORTED_TARGET_BOARD=(CY8CPROTO_062_4343W) -SUPPORTED_APP=(lock-app lighting-app pigweed-app) +SUPPORTED_APP=(lock-app lighting-app pigweed-app all-clusters-app) SUPPORTED_PROFILES=(release develop debug) SUPPORTED_COMMAND=(build flash build-flash)