From bd9e4c2c297ccf64c67cfb9c38ad93a06592b332 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Fri, 1 Mar 2024 17:25:05 -0500 Subject: [PATCH 1/8] Fix build issues on Darwin. (#32394) NSUinteger is different sizes on different Darwin targets, so we have to be a bit careful when logging it. --- .github/workflows/darwin.yaml | 5 +++++ src/darwin/Framework/CHIP/MTRDevice.mm | 4 ++-- src/darwin/Framework/CHIP/MTRDeviceController.mm | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index 0602b735d36b88..088c541495665b 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -49,6 +49,11 @@ jobs: - name: Validate zap-cli is NOT available # run_in_build_env.sh is used to ensure PATH is set to something that would otherwise find zap-cli run: scripts/run_in_build_env.sh '(zap-cli --version && exit 1) || exit 0' + - name: Run watchOS Build Debug + working-directory: src/darwin/Framework + # Disable availability annotations, since we are not building a system + # Matter.framework. + run: xcodebuild -target "Matter" -sdk watchos -configuration Debug GCC_PREPROCESSOR_DEFINITIONS='${inherited} MTR_NO_AVAILABILITY=1' - name: Run iOS Build Debug working-directory: src/darwin/Framework # Disable availability annotations, since we are not building a system diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index 2fe8032ce294a0..fa6b524fb6fab6 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -939,7 +939,7 @@ - (void)_handleEventReport:(NSArray *> *)eventRepor } } } - MTR_LOG_INFO("%@ _getCachedDataVersions dataVersions count: %lu readCache count: %lu", self, dataVersions.count, _readCache.count); + MTR_LOG_INFO("%@ _getCachedDataVersions dataVersions count: %lu readCache count: %lu", self, static_cast(dataVersions.count), static_cast(_readCache.count)); os_unfair_lock_unlock(&self->_lock); return dataVersions; @@ -1996,7 +1996,7 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray *)attributeValues reportChanges:(BOOL)reportChanges { - MTR_LOG_INFO("%@ setAttributeValues count: %lu reportChanges: %d", self, attributeValues.count, reportChanges); + MTR_LOG_INFO("%@ setAttributeValues count: %lu reportChanges: %d", self, static_cast(attributeValues.count), reportChanges); os_unfair_lock_lock(&self->_lock); if (reportChanges) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 8b7c1a3a231a2f..fa90eb2f542831 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -887,7 +887,7 @@ - (MTRDevice *)deviceForNodeID:(NSNumber *)nodeID // Load persisted attributes if they exist. NSArray * attributesFromCache = [_controllerDataStore getStoredAttributesForNodeID:nodeID]; - MTR_LOG_INFO("Loaded %lu attributes from storage for %@", attributesFromCache.count, deviceToReturn); + MTR_LOG_INFO("Loaded %lu attributes from storage for %@", static_cast(attributesFromCache.count), deviceToReturn); if (attributesFromCache.count) { [deviceToReturn setAttributeValues:attributesFromCache reportChanges:NO]; } From bbf5f753fef85b02669da3fa46cff0b291759dfc Mon Sep 17 00:00:00 2001 From: chrisdecenzo <61757564+chrisdecenzo@users.noreply.github.com> Date: Fri, 1 Mar 2024 14:34:46 -0800 Subject: [PATCH 2/8] TV: Add sample app tools for triggering client commands (#32365) * Add sample app tools for triggering test cases * Fix locking when obtaining passcode from content app * Fix messages test case * fix ci * Restyle TV: Add sample app tools for triggering client commands (#32366) * Restyled by whitespace * Restyled by google-java-format --------- Co-authored-by: Restyled.io * fix ci, address comments * fix ci * address comments * address comments --------- Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io --- .../tv/server/fragments/TerminalFragment.java | 2 + examples/tv-app/android/java/AppImpl.cpp | 19 ++- .../tv/server/tvapp/MessagesManagerStub.java | 7 -- .../tv-common/shell/AppTvShellCommands.cpp | 62 ++++++++++ examples/tv-app/tv-common/src/AppTv.cpp | 18 ++- .../chip/casting/app/CertTestFragment.java | 7 ++ .../jni/com/chip/casting/TvCastingApp.java | 3 + .../App/app/src/main/jni/cpp/Constants.h | 1 + .../app/src/main/jni/cpp/TvCastingApp-JNI.cpp | 30 +++++ .../tv-casting-app/tv-casting-common/BUILD.gn | 2 + .../tv-casting-common/include/CastingServer.h | 12 ++ .../tv-casting-common/include/Messages.h | 36 ++++++ .../tv-casting-common/src/CastingServer.cpp | 10 ++ .../tv-casting-common/src/Messages.cpp | 38 ++++++ src/app/app-platform/ContentApp.cpp | 109 ++++++++++++++++++ src/app/app-platform/ContentApp.h | 54 +++++++++ src/app/app-platform/ContentAppPlatform.cpp | 7 ++ .../CommissionerDiscoveryController.cpp | 17 +++ .../CommissionerDiscoveryController.h | 1 + 19 files changed, 416 insertions(+), 19 deletions(-) create mode 100644 examples/tv-casting-app/tv-casting-common/include/Messages.h create mode 100644 examples/tv-casting-app/tv-casting-common/src/Messages.cpp diff --git a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/TerminalFragment.java b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/TerminalFragment.java index 660025e76c2a83..30faf145b5b97b 100644 --- a/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/TerminalFragment.java +++ b/examples/tv-app/android/App/platform-app/src/main/java/com/matter/tv/server/fragments/TerminalFragment.java @@ -24,6 +24,8 @@ public class TerminalFragment extends Fragment { private static String TERMINAL_INSTRUCTIONS = "add [] Add app with given vendor ID [1, 2, 9050]. Usage: add 9050\r\n" + "remove Remove app at given endpoint [6, 7, etc]. Usage: remove 6\r\n" + + "appobserver Send app observer command to client node of the given app endpoint. Usage: appobserver 4 0 data hint\r\n" + + "printclients Print list of client nodes for the given app endpoint. Usage: printclients 4\r\n" + "setpin Set pincode for app with given endpoint ID. Usage: setpin 6 34567890\r\n" + "commission Commission given udc-entry using given pincode from corresponding app. Usage:" + "commission 0\r\n" diff --git a/examples/tv-app/android/java/AppImpl.cpp b/examples/tv-app/android/java/AppImpl.cpp index 3c50d759d6900f..1dfae0f8afd3f2 100644 --- a/examples/tv-app/android/java/AppImpl.cpp +++ b/examples/tv-app/android/java/AppImpl.cpp @@ -324,6 +324,7 @@ ContentApp * ContentAppFactoryImpl::LoadContentApp(const CatalogVendorApp & vend ChipLogProgress(DeviceLayer, " Looking next=%s ", app->GetApplicationBasicDelegate()->GetCatalogVendorApp()->applicationId); if (app->GetApplicationBasicDelegate()->GetCatalogVendorApp()->Matches(vendorApp)) { + // need to think about loading apk here? ContentAppPlatform::GetInstance().AddContentApp(app, &contentAppEndpoint, Span(gDataVersions[i]), Span(gContentAppDeviceType)); return app; @@ -422,11 +423,16 @@ std::list ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi ChipLogProgress(DeviceLayer, "ContentAppFactoryImpl GetAllowedClusterListForStaticEndpoint priviledged vendor accessible clusters " "being returned."); - return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, - chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, - chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, - chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id, - chip::app::Clusters::ApplicationLauncher::Id }; + return { chip::app::Clusters::Descriptor::Id, + chip::app::Clusters::OnOff::Id, + chip::app::Clusters::WakeOnLan::Id, + chip::app::Clusters::MediaPlayback::Id, + chip::app::Clusters::LowPower::Id, + chip::app::Clusters::KeypadInput::Id, + chip::app::Clusters::ContentLauncher::Id, + chip::app::Clusters::AudioOutput::Id, + chip::app::Clusters::ApplicationLauncher::Id, + chip::app::Clusters::Messages::Id }; } ChipLogProgress( DeviceLayer, @@ -434,7 +440,8 @@ std::list ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, - chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id }; + chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id, + chip::app::Clusters::Messages::Id }; } return {}; } diff --git a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java index b31f14a112304b..4f115c5130e25d 100644 --- a/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java +++ b/examples/tv-app/android/java/src/com/matter/tv/server/tvapp/MessagesManagerStub.java @@ -31,13 +31,6 @@ public class MessagesManagerStub implements MessagesManager { public MessagesManagerStub(int endpoint) { this.endpoint = endpoint; Log.d(TAG, "MessagesManagerStub: at " + this.endpoint); - - HashMap responseOptions = new HashMap(); - responseOptions.put(new Long(1), "Yes"); - responseOptions.put(new Long(2), "No"); - presentMessages( - "31323334353637383930313233343536", 1, 1, 30, 60000, "TestMessage", responseOptions); - Log.d(TAG, "MessagesManagerStub: added dummy message"); } @Override diff --git a/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp b/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp index c66beb94e1dd7f..6b946766fae60a 100644 --- a/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp +++ b/examples/tv-app/tv-common/shell/AppTvShellCommands.cpp @@ -193,6 +193,11 @@ static CHIP_ERROR PrintAllCommands() #if CHIP_DEVICE_CONFIG_APP_PLATFORM_ENABLED streamer_printf(sout, " add [] Add app with given vendor ID [1, 2, 9050]. Usage: app add 9050\r\n"); streamer_printf(sout, " remove Remove app at given endpoint [6, 7, etc]. Usage: app remove 6\r\n"); + streamer_printf(sout, + " appobserver Send app observer command to client node of " + "the given app endpoint. Usage: appobserver 4 0 data hint\r\n"); + streamer_printf( + sout, " printclients Print list of client nodes for the given app endpoint. Usage: printclients 4\r\n"); streamer_printf( sout, " setpin Set pincode for app with given endpoint ID. Usage: app setpin 6 34567890\r\n"); streamer_printf(sout, @@ -277,6 +282,63 @@ static CHIP_ERROR AppPlatformHandler(int argc, char ** argv) return CHIP_NO_ERROR; } + else if (strcmp(argv[0], "printclients") == 0) + { + if (argc < 2) + { + return PrintAllCommands(); + } + char * eptr; + + uint16_t endpoint = (uint16_t) strtol(argv[1], &eptr, 10); + ContentApp * app = ContentAppPlatform::GetInstance().GetContentApp(endpoint); + if (app == nullptr) + { + ChipLogProgress(DeviceLayer, "app not found"); + return CHIP_ERROR_BAD_REQUEST; + } + uint8_t count = app->GetClientNodeCount(); + ChipLogProgress(DeviceLayer, " node count: %d", count); + for (uint8_t i = 0; i < count; i++) + { + NodeId node = app->GetClientNode(i); + ChipLogProgress(DeviceLayer, " node[%d] " ChipLogFormatX64, i, ChipLogValueX64(node)); + } + } +#if CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE + else if (strcmp(argv[0], "appobserver") == 0) + { + if (argc < 5) + { + return PrintAllCommands(); + } + char * eptr; + + uint16_t endpoint = (uint16_t) strtol(argv[1], &eptr, 10); + ContentApp * app = ContentAppPlatform::GetInstance().GetContentApp(endpoint); + if (app == nullptr) + { + ChipLogProgress(DeviceLayer, "app not found"); + return CHIP_ERROR_BAD_REQUEST; + } + uint8_t clientNodeIndex = (uint8_t) strtol(argv[2], &eptr, 10); + if (clientNodeIndex >= app->GetClientNodeCount()) + { + ChipLogProgress(DeviceLayer, "illegal client node index"); + return CHIP_ERROR_BAD_REQUEST; + } + NodeId clientNode = app->GetClientNode(clientNodeIndex); + + char * data = argv[3]; + char * encodingHint = argv[4]; + + app->SendAppObserverCommand(GetDeviceCommissioner(), clientNode, data, encodingHint); + + ChipLogProgress(DeviceLayer, "sent appobserver command"); + + return CHIP_NO_ERROR; + } +#endif // CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE else if (strcmp(argv[0], "setpin") == 0) { if (argc < 3) diff --git a/examples/tv-app/tv-common/src/AppTv.cpp b/examples/tv-app/tv-common/src/AppTv.cpp index 939e14be5315cc..8fd076b227b882 100644 --- a/examples/tv-app/tv-common/src/AppTv.cpp +++ b/examples/tv-app/tv-common/src/AppTv.cpp @@ -549,11 +549,16 @@ std::list ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi ChipLogProgress(DeviceLayer, "ContentAppFactoryImpl GetAllowedClusterListForStaticEndpoint priviledged vendor accessible clusters " "being returned."); - return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, - chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, - chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, - chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id, - chip::app::Clusters::ApplicationLauncher::Id }; + return { chip::app::Clusters::Descriptor::Id, + chip::app::Clusters::OnOff::Id, + chip::app::Clusters::WakeOnLan::Id, + chip::app::Clusters::MediaPlayback::Id, + chip::app::Clusters::LowPower::Id, + chip::app::Clusters::KeypadInput::Id, + chip::app::Clusters::ContentLauncher::Id, + chip::app::Clusters::AudioOutput::Id, + chip::app::Clusters::ApplicationLauncher::Id, + chip::app::Clusters::Messages::Id }; // TODO: messages? } ChipLogProgress( DeviceLayer, @@ -561,7 +566,8 @@ std::list ContentAppFactoryImpl::GetAllowedClusterListForStaticEndpoi return { chip::app::Clusters::Descriptor::Id, chip::app::Clusters::OnOff::Id, chip::app::Clusters::WakeOnLan::Id, chip::app::Clusters::MediaPlayback::Id, chip::app::Clusters::LowPower::Id, chip::app::Clusters::KeypadInput::Id, - chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id }; + chip::app::Clusters::ContentLauncher::Id, chip::app::Clusters::AudioOutput::Id, + chip::app::Clusters::Messages::Id }; } return {}; } diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java index 340563c28b322c..7ee9fa3c46a0ae 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/CertTestFragment.java @@ -309,6 +309,13 @@ private void runCertTests(Activity activity) { kContentApp, successCallbackInteger, failureCallback); }); + runAndWait( + "messages_presentMessages", + successFailureCallback, + () -> { + tvCastingApp.messages_presentMessages(kTVApp, "CastingAppTestMessage", callback); + }); + runAndWait( "mediaPlayback_subscribeToCurrentState", successFailureCallback, diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java index 24852986768e7c..9dd0fa500d9e2b 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java @@ -599,6 +599,9 @@ public native boolean applicationBasic_readApplicationVersion( public native boolean onOff_toggle(ContentApp contentApp, Object responseHandler); + public native boolean messages_presentMessages( + ContentApp contentApp, String messageText, Object responseHandler); + static { System.loadLibrary("TvCastingApp"); } diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h index b1947541c9c9b7..735cabf2375f51 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/Constants.h @@ -37,6 +37,7 @@ enum MediaCommandName MediaPlayback_Seek, MediaPlayback_SkipForward, MediaPlayback_SkipBackward, + Messages_PresentMessagesRequest, ApplicationLauncher_LaunchApp, ApplicationLauncher_StopApp, ApplicationLauncher_HideApp, diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index 0cbfab8b5864b8..6dbdfba9c83449 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -865,6 +865,36 @@ JNI_METHOD(jboolean, onOff_1toggle) return (err == CHIP_NO_ERROR); } +JNI_METHOD(jboolean, messages_1presentMessages) +(JNIEnv * env, jobject, jobject contentApp, jstring messageText, jobject jResponseHandler) +{ + chip::DeviceLayer::StackLock lock; + + ChipLogProgress(AppServer, "JNI_METHOD messages_presentMessages called"); + const char * nativeMessageText = env->GetStringUTFChars(messageText, 0); + + TargetEndpointInfo endpoint; + CHIP_ERROR err = convertJContentAppToTargetEndpointInfo(contentApp, endpoint); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(AppServer, "Conversion from jobject contentApp to TargetEndpointInfo * failed: %" CHIP_ERROR_FORMAT, + err.Format())); + + err = TvCastingAppJNIMgr().getMediaCommandResponseHandler(Messages_PresentMessagesRequest).SetUp(env, jResponseHandler); + VerifyOrExit(CHIP_NO_ERROR == err, + ChipLogError(AppServer, "MatterCallbackHandlerJNI.SetUp failed %" CHIP_ERROR_FORMAT, err.Format())); + + err = CastingServer::GetInstance()->Messages_PresentMessagesRequest(&endpoint, nativeMessageText, [](CHIP_ERROR err) { + TvCastingAppJNIMgr().getMediaCommandResponseHandler(Messages_PresentMessagesRequest).Handle(err); + }); + VerifyOrExit(CHIP_NO_ERROR == err, + ChipLogError(AppServer, "CastingServer.Messages_PresentMessagesRequest failed %" CHIP_ERROR_FORMAT, err.Format())); + + env->ReleaseStringUTFChars(messageText, nativeMessageText); + +exit: + return (err == CHIP_NO_ERROR); +} + JNI_METHOD(jboolean, mediaPlayback_1play) (JNIEnv * env, jobject, jobject contentApp, jobject jResponseHandler) { diff --git a/examples/tv-casting-app/tv-casting-common/BUILD.gn b/examples/tv-casting-app/tv-casting-common/BUILD.gn index ea6607a724b5cb..72f14fb7bffeee 100644 --- a/examples/tv-casting-app/tv-casting-common/BUILD.gn +++ b/examples/tv-casting-app/tv-casting-common/BUILD.gn @@ -68,6 +68,7 @@ chip_data_model("tv-casting-common") { "include/MediaPlayback.h", "include/MediaReadBase.h", "include/MediaSubscriptionBase.h", + "include/Messages.h", "include/OnOff.h", "include/PersistenceManager.h", "include/TargetEndpointInfo.h", @@ -83,6 +84,7 @@ chip_data_model("tv-casting-common") { "src/KeypadInput.cpp", "src/LevelControl.cpp", "src/MediaPlayback.cpp", + "src/Messages.cpp", "src/OnOff.cpp", "src/PersistenceManager.cpp", "src/TargetEndpointInfo.cpp", diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index 349edaefb31a79..d64f5049df1a8f 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -27,6 +27,7 @@ #include "KeypadInput.h" #include "LevelControl.h" #include "MediaPlayback.h" +#include "Messages.h" #include "OnOff.h" #include "PersistenceManager.h" #include "TargetEndpointInfo.h" @@ -186,6 +187,12 @@ class CastingServer : public AppDelegate CHIP_ERROR OnOff_Off(TargetEndpointInfo * endpoint, std::function responseCallback); CHIP_ERROR OnOff_Toggle(TargetEndpointInfo * endpoint, std::function responseCallback); + /** + * @brief Messages cluster + */ + CHIP_ERROR Messages_PresentMessagesRequest(TargetEndpointInfo * endpoint, const char * messageText, + std::function responseCallback); + /** * @brief Media Playback cluster */ @@ -510,6 +517,11 @@ class CastingServer : public AppDelegate OffCommand mOffCommand; ToggleCommand mToggleCommand; + /** + * @brief OnOff cluster + */ + PresentMessagesRequestCommand mPresentMessagesRequestCommand; + /** * @brief Media Playback cluster */ diff --git a/examples/tv-casting-app/tv-casting-common/include/Messages.h b/examples/tv-casting-app/tv-casting-common/include/Messages.h new file mode 100644 index 00000000000000..623ede9e914074 --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/include/Messages.h @@ -0,0 +1,36 @@ +/* + * + * Copyright (c) 2024 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 "MediaCommandBase.h" +#include "MediaSubscriptionBase.h" + +#include +#include + +#include + +// COMMAND CLASSES +class PresentMessagesRequestCommand : public MediaCommandBase +{ +public: + PresentMessagesRequestCommand() : MediaCommandBase(chip::app::Clusters::Messages::Id) {} + + CHIP_ERROR + Invoke(const char * messageText, std::function responseCallback); +}; diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index a3de0a263c3efe..4cb72732292a2e 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -869,6 +869,16 @@ CHIP_ERROR CastingServer::OnOff_Toggle(TargetEndpointInfo * endpoint, std::funct return mToggleCommand.Invoke(responseCallback); } +/** + * @brief Messages cluster + */ +CHIP_ERROR CastingServer::Messages_PresentMessagesRequest(TargetEndpointInfo * endpoint, const char * messageText, + std::function responseCallback) +{ + ReturnErrorOnFailure(mPresentMessagesRequestCommand.SetTarget(mActiveTargetVideoPlayerInfo, endpoint->GetEndpointId())); + return mPresentMessagesRequestCommand.Invoke(messageText, responseCallback); +} + /** * @brief Media Playback cluster */ diff --git a/examples/tv-casting-app/tv-casting-common/src/Messages.cpp b/examples/tv-casting-app/tv-casting-common/src/Messages.cpp new file mode 100644 index 00000000000000..ea6176fd93405e --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/src/Messages.cpp @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2024 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 "Messages.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::Messages; + +CHIP_ERROR PresentMessagesRequestCommand::Invoke(const char * messageText, std::function responseCallback) +{ + Messages::Commands::PresentMessagesRequest::Type request; + uint8_t buf[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5 }; + + request.messageID = ByteSpan(buf, sizeof(buf)); + request.messageText = CharSpan::fromCharString(messageText); + request.priority = MessagePriorityEnum(static_cast(0)); + request.startTime = DataModel::Nullable(static_cast(0)); + request.duration = DataModel::Nullable(static_cast(60 * 1000)); + + return MediaCommandBase::Invoke(request, responseCallback); +} diff --git a/src/app/app-platform/ContentApp.cpp b/src/app/app-platform/ContentApp.cpp index 3bc16e9555ced5..9a6b4ad6b5e317 100644 --- a/src/app/app-platform/ContentApp.cpp +++ b/src/app/app-platform/ContentApp.cpp @@ -44,6 +44,8 @@ namespace AppPlatform { #define ZCL_DESCRIPTOR_CLUSTER_REVISION (1u) #define ZCL_APPLICATION_BASIC_CLUSTER_REVISION (1u) +inline constexpr EndpointId kCastingVideoPlayerEndpointId = 1; + Status ContentApp::HandleReadAttribute(ClusterId clusterId, AttributeId attributeId, uint8_t * buffer, uint16_t maxReadLength) { ChipLogProgress(DeviceLayer, @@ -62,6 +64,113 @@ Status ContentApp::HandleWriteAttribute(ClusterId clusterId, AttributeId attribu return Status::Failure; } +void ContentApp::AddClientNode(NodeId subjectNodeId) +{ + mClientNodes[mNextClientNodeIndex++] = subjectNodeId; + if (mClientNodeCount < kMaxClientNodes) + { + mClientNodeCount++; + } + if (mNextClientNodeIndex >= kMaxClientNodes) + { + // if we exceed the max number, then overwrite the oldest entry + mNextClientNodeIndex = 0; + } +} + +void ContentApp::SendAppObserverCommand(chip::Controller::DeviceCommissioner * commissioner, NodeId clientNodeId, char * data, + char * encodingHint) +{ + ChipLogProgress(Controller, "Attempting to send AppObserver command"); + if (mContentAppClientCommandSender.IsBusy()) + { + ChipLogProgress(Controller, "SendAppObserverCommand busy"); + return; + } + + mContentAppClientCommandSender.SendContentAppMessage(commissioner, clientNodeId, kCastingVideoPlayerEndpointId, data, + encodingHint); + + ChipLogProgress(Controller, "Completed send of AppObserver command"); +} + +CHIP_ERROR ContentAppClientCommandSender::SendContentAppMessage(chip::Controller::DeviceCommissioner * commissioner, + chip::NodeId destinationId, chip::EndpointId endPointId, + char * data, char * encodingHint) +{ + if (mIsBusy) + { + return CHIP_ERROR_INCORRECT_STATE; + } + mIsBusy = true; + mDestinationId = destinationId; + mEndPointId = endPointId; + mData = std::string(data); + mEncodingHint = std::string(encodingHint); + + ChipLogProgress(Controller, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mDestinationId)); + + return commissioner->GetConnectedDevice(mDestinationId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); +} + +void ContentAppClientCommandSender::OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, + const chip::SessionHandle & sessionHandle) +{ + ChipLogProgress(Controller, "ContentAppClientCommandSender::OnDeviceConnectedFn"); + ContentAppClientCommandSender * sender = reinterpret_cast(context); + VerifyOrReturn(sender != nullptr, ChipLogError(chipTool, "OnDeviceConnectedFn: context is null")); + + sender->SendMessage(exchangeMgr, sessionHandle); +} + +CHIP_ERROR ContentAppClientCommandSender::SendMessage(chip::Messaging::ExchangeManager & exchangeMgr, + const chip::SessionHandle & sessionHandle) +{ + ChipLogProgress(Controller, "ContentAppClientCommandSender::SendMessage"); + + chip::Controller::ClusterBase cluster(exchangeMgr, sessionHandle, mEndPointId); + + chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessage::Type request; + request.data = Optional(CharSpan::fromCharString(mData.c_str())); + request.encodingHint = CharSpan::fromCharString(mEncodingHint.c_str()); + CHIP_ERROR err = cluster.InvokeCommand(request, nullptr, OnCommandResponse, OnCommandFailure); + if (err != CHIP_NO_ERROR) + { + ChipLogDetail(Controller, "ContentAppClientCommandSender SendMessage error err %s", ErrorStr(err)); + } + + mIsBusy = false; + ChipLogProgress(Controller, "ContentAppClientCommandSender: Completed send of AppObserver command"); + + return CHIP_NO_ERROR; +} + +void ContentAppClientCommandSender::OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR err) +{ + ChipLogProgress(Controller, "ContentAppClientCommandSender::OnDeviceConnectedFn error err %s", ErrorStr(err)); + + ContentAppClientCommandSender * sender = reinterpret_cast(context); + VerifyOrReturn(sender != nullptr, ChipLogError(chipTool, "OnDeviceConnectionFailureFn: context is null")); + + sender->Cleanup(); +} + +void ContentAppClientCommandSender::Cleanup() +{ + ChipLogProgress(Controller, "ContentAppClientCommandSender::Cleanup"); + mIsBusy = false; +} + +void ContentAppClientCommandSender::OnCommandResponse(void * context, const ContentAppMessageResponseDecodableType & response) +{ + ChipLogProgress(Controller, "ContentAppClientCommandSender::OnCommandResponse"); +} + +void ContentAppClientCommandSender::OnCommandFailure(void * context, CHIP_ERROR error) +{ + ChipLogProgress(Controller, "ContentAppClientCommandSender::OnCommandFailure error err %s", ErrorStr(error)); +} + } // namespace AppPlatform } // namespace chip diff --git a/src/app/app-platform/ContentApp.h b/src/app/app-platform/ContentApp.h index d3b7d1fb2b2187..34b1dd5ef41893 100644 --- a/src/app/app-platform/ContentApp.h +++ b/src/app/app-platform/ContentApp.h @@ -33,6 +33,7 @@ #include #include #include +#include #include namespace chip { @@ -48,6 +49,46 @@ using KeypadInputDelegate = app::Clusters::KeypadInput::Delegate; using MediaPlaybackDelegate = app::Clusters::MediaPlayback::Delegate; using TargetNavigatorDelegate = app::Clusters::TargetNavigator::Delegate; +inline constexpr uint8_t kMaxClientNodes = 8; + +class ContentAppClientCommandSender +{ +public: + ContentAppClientCommandSender() : + mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this) + {} + + bool IsBusy() const { return mIsBusy; } + CHIP_ERROR SendContentAppMessage(chip::Controller::DeviceCommissioner * commissioner, chip::NodeId destinationId, + chip::EndpointId endPointId, char * data, char * encodingHint); + +protected: + CHIP_ERROR SendMessage(chip::Messaging::ExchangeManager & exchangeMgr, const chip::SessionHandle & sessionHandle); + + void Cleanup(); + +private: + static void OnDeviceConnectedFn(void * context, chip::Messaging::ExchangeManager & exchangeMgr, + const chip::SessionHandle & sessionHandle); + static void OnDeviceConnectionFailureFn(void * context, const chip::ScopedNodeId & peerId, CHIP_ERROR error); + + using ContentAppMessageResponseDecodableType = + chip::app::Clusters::ContentAppObserver::Commands::ContentAppMessageResponse::DecodableType; + + static void OnCommandResponse(void * context, const ContentAppMessageResponseDecodableType & response); + static void OnCommandFailure(void * context, CHIP_ERROR error); + + chip::Callback::Callback mOnDeviceConnectedCallback; + chip::Callback::Callback mOnDeviceConnectionFailureCallback; + + bool mIsBusy = false; + chip::NodeId mDestinationId = 0; + chip::EndpointId mEndPointId = 0; + + std::string mData; + std::string mEncodingHint; +}; + class DLL_EXPORT ContentApp { public: @@ -70,8 +111,21 @@ class DLL_EXPORT ContentApp uint16_t maxReadLength); Protocols::InteractionModel::Status HandleWriteAttribute(ClusterId clusterId, AttributeId attributeId, uint8_t * buffer); + void AddClientNode(NodeId clientNodeId); + uint8_t GetClientNodeCount() const { return mClientNodeCount; } + NodeId GetClientNode(uint8_t index) const { return mClientNodes[index]; } + + void SendAppObserverCommand(chip::Controller::DeviceCommissioner * commissioner, NodeId clientNodeId, char * data, + char * encodingHint); + protected: EndpointId mEndpointId = 0; + + uint8_t mClientNodeCount = 0; + uint8_t mNextClientNodeIndex = 0; + NodeId mClientNodes[kMaxClientNodes]; + + ContentAppClientCommandSender mContentAppClientCommandSender; }; } // namespace AppPlatform diff --git a/src/app/app-platform/ContentAppPlatform.cpp b/src/app/app-platform/ContentAppPlatform.cpp index 09d6c55b14454d..3d17a521996b65 100644 --- a/src/app/app-platform/ContentAppPlatform.cpp +++ b/src/app/app-platform/ContentAppPlatform.cpp @@ -716,6 +716,7 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(Messaging::ExchangeManager & e continue; } + bool accessAllowed = false; for (const auto & allowedVendor : app->GetApplicationBasicDelegate()->GetAllowedVendorList()) { if (allowedVendor == targetVendorId) @@ -732,6 +733,12 @@ CHIP_ERROR ContentAppPlatform::ManageClientAccess(Messaging::ExchangeManager & e .fabricIndex = kUndefinedFabricIndex, }); } + accessAllowed = true; + } + if (accessAllowed) + { + // notify content app about this nodeId + app->AddClientNode(subjectNodeId); } } } diff --git a/src/controller/CommissionerDiscoveryController.cpp b/src/controller/CommissionerDiscoveryController.cpp index 86849a32f91271..ee94bc87b92670 100644 --- a/src/controller/CommissionerDiscoveryController.cpp +++ b/src/controller/CommissionerDiscoveryController.cpp @@ -110,8 +110,25 @@ void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClie ChipLogDetail(Controller, "------Via Shell Enter: controller ux ok|cancel"); } +/// Callback for getting execution into the main chip thread +void CallbackOk(System::Layer * aSystemLayer, void * aAppState) +{ + ChipLogDetail(AppServer, "UX Ok: now on main thread"); + CommissionerDiscoveryController * cdc = static_cast(aAppState); + cdc->InternalOk(); +} + void CommissionerDiscoveryController::Ok() { + ChipLogDetail(AppServer, "UX Ok: moving to main thread"); + // need to ensure callback is on main chip thread + assertChipStackLockedByCurrentThread(); + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(0), CallbackOk, this); +} + +void CommissionerDiscoveryController::InternalOk() +{ + ChipLogDetail(AppServer, "UX InternalOk"); if (!mPendingConsent) { ChipLogError(AppServer, "UX Ok: no current instance"); diff --git a/src/controller/CommissionerDiscoveryController.h b/src/controller/CommissionerDiscoveryController.h index 42a0bb6f327fc9..f0dcf6d5f95869 100644 --- a/src/controller/CommissionerDiscoveryController.h +++ b/src/controller/CommissionerDiscoveryController.h @@ -273,6 +273,7 @@ class CommissionerDiscoveryController : public chip::Protocols::UserDirectedComm * indicated in the UserPrompter's PromptForCommissionOKPermission callback */ void Ok(); + void InternalOk(); /** * This method should be called after the user has declined to give consent for commissioning of the client From 00227dcedb82fb035a465b2138f5f10dc74cdd44 Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Fri, 1 Mar 2024 17:43:54 -0500 Subject: [PATCH 3/8] Encode an empty list as now ActiveNetworkFault are tracked for the thread network (#32391) --- .../thread-network-diagnostics-provider.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp index 26a988b1c51450..69ec2a5e13a65e 100644 --- a/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp +++ b/src/app/clusters/thread-network-diagnostics-server/thread-network-diagnostics-provider.cpp @@ -670,16 +670,9 @@ CHIP_ERROR WriteThreadNetworkDiagnosticAttributeToTlv(AttributeId attributeId, a break; case Attributes::ActiveNetworkFaultsList::Id: { - err = encoder.EncodeList([](const auto & aEncoder) -> CHIP_ERROR { - // TODO activeNetworkFaultsList isn't tracked. Encode the list of 4 entries at 0 none the less - NetworkFaultEnum activeNetworkFaultsList[4] = { NetworkFaultEnum(0) }; - for (auto fault : activeNetworkFaultsList) - { - ReturnErrorOnFailure(aEncoder.Encode(fault)); - } - - return CHIP_NO_ERROR; - }); + // activeNetworkFaults are not tracked by the thread stack nor the ThreadStackManager. + // Encode an emptyList to indicate there are currently no active faults. + err = encoder.EncodeEmptyList(); } break; From 9e8a77fd83ca7e05ae990f84e6eea53d7e685d6f Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Fri, 1 Mar 2024 20:02:29 -0500 Subject: [PATCH 4/8] Fix gendiag network interface attribute (#32390) --- .../GenericConfigurationManagerImpl.ipp | 2 +- .../silabs/DiagnosticDataProviderImpl.cpp | 31 +++++++++++++++---- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp index ad463a8eba9eea..24c6a28113906d 100644 --- a/src/include/platform/internal/GenericConfigurationManagerImpl.ipp +++ b/src/include/platform/internal/GenericConfigurationManagerImpl.ipp @@ -397,7 +397,7 @@ template CHIP_ERROR GenericConfigurationManagerImpl::GetPrimary802154MACAddress(uint8_t * buf) { #if CHIP_DEVICE_CONFIG_ENABLE_THREAD - return ThreadStackManager().GetPrimary802154MACAddress(buf); + return ThreadStackMgr().GetPrimary802154MACAddress(buf); #else return CHIP_DEVICE_ERROR_CONFIG_NOT_FOUND; #endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD diff --git a/src/platform/silabs/DiagnosticDataProviderImpl.cpp b/src/platform/silabs/DiagnosticDataProviderImpl.cpp index 4322f0641d3928..03afa5efe29487 100644 --- a/src/platform/silabs/DiagnosticDataProviderImpl.cpp +++ b/src/platform/silabs/DiagnosticDataProviderImpl.cpp @@ -31,6 +31,7 @@ #include "AppConfig.h" #include "FreeRTOS.h" #include "heap_4_silabs.h" +#include #include using namespace ::chip::app::Clusters::GeneralDiagnostics; @@ -249,13 +250,32 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** #if CHIP_DEVICE_CONFIG_ENABLE_THREAD const char * threadNetworkName = otThreadGetNetworkName(ThreadStackMgrImpl().OTInstance()); ifp->name = Span(threadNetworkName, strlen(threadNetworkName)); - ifp->isOperational = true; + ifp->type = InterfaceTypeEnum::kThread; + ifp->isOperational = ThreadStackMgrImpl().IsThreadAttached(); ifp->offPremiseServicesReachableIPv4.SetNull(); ifp->offPremiseServicesReachableIPv6.SetNull(); - ifp->type = InterfaceTypeEnum::kThread; - uint8_t macBuffer[ConfigurationManager::kPrimaryMACAddressLength]; - ConfigurationMgr().GetPrimary802154MACAddress(macBuffer); - ifp->hardwareAddress = ByteSpan(macBuffer, ConfigurationManager::kPrimaryMACAddressLength); + + ThreadStackMgrImpl().GetPrimary802154MACAddress(ifp->MacAddress); + ifp->hardwareAddress = ByteSpan(ifp->MacAddress, kMaxHardwareAddrSize); + + // The Thread implementation has only 1 interface and is IPv6-only + Inet::InterfaceAddressIterator interfaceAddressIterator; + uint8_t ipv6AddressesCount = 0; + while (interfaceAddressIterator.HasCurrent() && ipv6AddressesCount < kMaxIPv6AddrCount) + { + Inet::IPAddress ipv6Address; + if (interfaceAddressIterator.GetAddress(ipv6Address) == CHIP_NO_ERROR) + { + memcpy(ifp->Ipv6AddressesBuffer[ipv6AddressesCount], ipv6Address.Addr, kMaxIPv6AddrSize); + ifp->Ipv6AddressSpans[ipv6AddressesCount] = ByteSpan(ifp->Ipv6AddressesBuffer[ipv6AddressesCount]); + ipv6AddressesCount++; + } + interfaceAddressIterator.Next(); + } + + ifp->IPv6Addresses = app::DataModel::List(ifp->Ipv6AddressSpans, ipv6AddressesCount); + + *netifpp = ifp; #else NetworkInterface * head = NULL; for (Inet::InterfaceIterator interfaceIterator; interfaceIterator.HasCurrent(); interfaceIterator.Next()) @@ -331,7 +351,6 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** *netifpp = head; #endif - *netifpp = ifp; return CHIP_NO_ERROR; } From d8f5bf1a41d1cfb19a5a1fdd342b85c4dfb842ea Mon Sep 17 00:00:00 2001 From: zhhyu7 Date: Sat, 2 Mar 2024 23:54:48 +0800 Subject: [PATCH 5/8] Add dockerfile for NuttX platform compile (#31341) Signed-off-by: zhanghongyu Co-authored-by: Andrei Litvin --- .../docker/images/base/chip-build/version | 2 +- .../stage-2/chip-build-nuttx/Dockerfile | 41 +++++++++++++++++++ .../images/stage-2/chip-build-nuttx/build.sh | 1 + .../images/stage-2/chip-build-nuttx/run.sh | 1 + .../images/stage-2/chip-build-nuttx/version | 1 + .../vscode/chip-build-vscode/Dockerfile | 3 ++ 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 integrations/docker/images/stage-2/chip-build-nuttx/Dockerfile create mode 120000 integrations/docker/images/stage-2/chip-build-nuttx/build.sh create mode 120000 integrations/docker/images/stage-2/chip-build-nuttx/run.sh create mode 120000 integrations/docker/images/stage-2/chip-build-nuttx/version diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index bfe684b756a04d..498993f769c75d 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -39 : [Python] Add ruff Python linter to chip-build +40 : [NuttX] Add support for NuttX SDK diff --git a/integrations/docker/images/stage-2/chip-build-nuttx/Dockerfile b/integrations/docker/images/stage-2/chip-build-nuttx/Dockerfile new file mode 100644 index 00000000000000..0912ea49f15477 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nuttx/Dockerfile @@ -0,0 +1,41 @@ +ARG VERSION=1 +FROM ghcr.io/project-chip/chip-build:${VERSION} +LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip + +# ------------------------------------------------------------------------------ +# Install prerequisites +RUN set -x \ + && dpkg --add-architecture i386 \ + && apt update -y \ + && apt install -y genromfs xxd libgmp-dev libmpfr-dev libmpc-dev \ + && : # last line + +# ------------------------------------------------------------------------------ +# Download and build g++-13 +RUN set -x \ + && ! test -d /opt/nuttx/gcc-13 \ + && wget -P gcc_build https://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-13.1.0/gcc-13.1.0.tar.gz \ + && cd gcc_build \ + && tar xzf gcc-13.1.0.tar.gz \ + && cd gcc-13.1.0 \ + && ./configure --prefix=/opt/nuttx/gcc-13 --disable-multilib \ + && make -j8 \ + && make install-strip \ + && rm -rf ../../gcc_build \ + && : # last line + +# ------------------------------------------------------------------------------ +# Download NuttX SDK +RUN set -x \ + && cd /opt/nuttx \ + && wget -q -O nuttx.zip https://codeload.github.com/apache/nuttx/zip/b8e0423 \ + && unzip -q nuttx.zip \ + && mv nuttx-b8e0423 nuttx \ + && rm nuttx.zip + +RUN set -x \ + && cd /opt/nuttx \ + && wget -q -O nuttx_app.zip https://codeload.github.com/apache/nuttx-apps/zip/9c48a8d \ + && unzip -q nuttx_app.zip \ + && mv nuttx-apps-9c48a8d apps \ + && rm nuttx_app.zip diff --git a/integrations/docker/images/stage-2/chip-build-nuttx/build.sh b/integrations/docker/images/stage-2/chip-build-nuttx/build.sh new file mode 120000 index 00000000000000..46b20313461454 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nuttx/build.sh @@ -0,0 +1 @@ +../../../build.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-nuttx/run.sh b/integrations/docker/images/stage-2/chip-build-nuttx/run.sh new file mode 120000 index 00000000000000..9bbfad86d46e50 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nuttx/run.sh @@ -0,0 +1 @@ +../../../run.sh \ No newline at end of file diff --git a/integrations/docker/images/stage-2/chip-build-nuttx/version b/integrations/docker/images/stage-2/chip-build-nuttx/version new file mode 120000 index 00000000000000..a40ba48b0188a8 --- /dev/null +++ b/integrations/docker/images/stage-2/chip-build-nuttx/version @@ -0,0 +1 @@ +../../base/chip-build/version \ No newline at end of file diff --git a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile index 91e9a9b5036158..83556ee8ef6d0e 100644 --- a/integrations/docker/images/vscode/chip-build-vscode/Dockerfile +++ b/integrations/docker/images/vscode/chip-build-vscode/Dockerfile @@ -17,6 +17,7 @@ FROM ghcr.io/project-chip/chip-build-ti:${VERSION} AS ti FROM ghcr.io/project-chip/chip-build-openiotsdk:${VERSION} AS openiotsdk FROM ghcr.io/project-chip/chip-build-bouffalolab:${VERSION} AS bouffalolab FROM ghcr.io/project-chip/chip-build-asr:${VERSION} AS asr +FROM ghcr.io/project-chip/chip-build-nuttx:${VERSION} AS nuttx FROM ghcr.io/project-chip/chip-build:${VERSION} LABEL org.opencontainers.image.source https://github.com/project-chip/connectedhomeip @@ -67,6 +68,8 @@ COPY --from=efr32 /opt/silabs/gecko_sdk /opt/silabs/gecko_sdk COPY --from=efr32 /opt/silabs/wiseconnect-wifi-bt-sdk /opt/silabs/wiseconnect-wifi-bt-sdk COPY --from=efr32 /opt/silabs/wifi_sdk /opt/silabs/wifi_sdk +COPY --from=nuttx /opt/nuttx /opt/nuttx + # Android license file "acceping" is done by writing license hashes # into the 'licenses' subfolder. This allows any user (in particular # 'vscode' to accept licenses) From c1ae85cc53352ad79a15bc38a2a8602e9d7c1d9b Mon Sep 17 00:00:00 2001 From: Junior Martinez <67972863+jmartinez-silabs@users.noreply.github.com> Date: Sun, 3 Mar 2024 15:25:41 -0500 Subject: [PATCH 6/8] [Silabs] remove lwipopts-thread.h. (#32002) * remove lwipopts-thread.h. LWIP is not using with our thread implementation * Fix to build efr32 test driver with openthread Inet endpoint instead of lwip (so it uses the same config as our sample apps). Add to implement additional InetInterface method that were missing for the openthread inet endpoint interface. Make TestInetAddress.cpp work for CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT --- src/inet/InetInterface.cpp | 35 +++++ src/inet/tests/TestInetAddress.cpp | 55 +++++-- src/lwip/BUILD.gn | 1 - src/lwip/silabs/lwipopts-thread.h | 182 ------------------------ src/lwip/silabs/lwipopts.h | 2 - src/test_driver/efr32/args.gni | 5 - third_party/silabs/silabs_lwip/BUILD.gn | 1 - 7 files changed, 79 insertions(+), 202 deletions(-) delete mode 100644 src/lwip/silabs/lwipopts-thread.h diff --git a/src/inet/InetInterface.cpp b/src/inet/InetInterface.cpp index 4a404a29db177c..a893f80f4d605b 100644 --- a/src/inet/InetInterface.cpp +++ b/src/inet/InetInterface.cpp @@ -113,6 +113,23 @@ bool InterfaceIterator::Next() return false; } +CHIP_ERROR InterfaceIterator::GetInterfaceName(char * nameBuf, size_t nameBufSize) +{ + VerifyOrReturnError(HasCurrent(), CHIP_ERROR_INCORRECT_STATE); + return InterfaceId(1).GetInterfaceName(nameBuf, nameBufSize); +} + +InterfaceId InterfaceIterator::GetInterfaceId() +{ + // only 1 interface is supported + return HasCurrent() ? InterfaceId(1) : InterfaceId::Null(); +} + +bool InterfaceIterator::IsUp() +{ + return HasCurrent() && (otThreadGetDeviceRole(Inet::globalOtInstance) != OT_DEVICE_ROLE_DISABLED); +} + InterfaceAddressIterator::InterfaceAddressIterator() { mNetifAddrList = nullptr; @@ -128,6 +145,8 @@ bool InterfaceAddressIterator::Next() { if (mNetifAddrList == nullptr) { + if (Inet::globalOtInstance == nullptr) + return false; mNetifAddrList = otIp6GetUnicastAddresses(Inet::globalOtInstance); mCurAddr = mNetifAddrList; } @@ -155,6 +174,22 @@ uint8_t InterfaceAddressIterator::GetPrefixLength() return 64; } +bool InterfaceAddressIterator::IsUp() +{ + return HasCurrent() && (otThreadGetDeviceRole(Inet::globalOtInstance) != OT_DEVICE_ROLE_DISABLED); +} + +InterfaceId InterfaceAddressIterator::GetInterfaceId() +{ + // only 1 interface is supported + return HasCurrent() ? InterfaceId(1) : InterfaceId::Null(); +} + +bool InterfaceAddressIterator::HasBroadcastAddress() +{ + return HasCurrent() && (otIp6GetMulticastAddresses(Inet::globalOtInstance) != nullptr); +} + #endif #if CHIP_SYSTEM_CONFIG_USE_LWIP && !CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT diff --git a/src/inet/tests/TestInetAddress.cpp b/src/inet/tests/TestInetAddress.cpp index 7e796ca05fc340..426d6b7141753c 100644 --- a/src/inet/tests/TestInetAddress.cpp +++ b/src/inet/tests/TestInetAddress.cpp @@ -35,6 +35,11 @@ #include +#elif CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT +#include +#include +#include + #else #include #include @@ -718,12 +723,6 @@ void CheckAddress(nlTestSuite * inSuite, const IPAddressContext & inContext, con CheckAddressQuartets(inSuite, inContext, inAddress); - // Convert the address to a string and compare it to the control string. - - inAddress.ToString(lAddressBuffer); - - CheckAddressString(inSuite, lAddressBuffer, inContext.mAddrString); - // Convert the control string to an address and compare the parsed address to the created address. lResult = IPAddress::FromString(inContext.mAddrString, lParsedAddress); @@ -735,6 +734,21 @@ void CheckAddress(nlTestSuite * inSuite, const IPAddressContext & inContext, con { fprintf(stdout, "Address parse mismatch for %s\n", inContext.mAddrString); } + + // Convert the address to a string and compare it to the control string. + + inAddress.ToString(lAddressBuffer); +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT + // Embedded openthread stack otIp6AddressFromString format the string as a uncompressed IPV6 + // example ff01::1 is formatted has ff01:0:0:0:0:0:0:1 + // But the IPV6 address From string API (otIp6AddressFromString) handle both compressed and uncompressed format. + char uncompressedAddrStr[INET6_ADDRSTRLEN]; + // Reconvert the previously parsed control string to an uncompressed string format + lParsedAddress.ToString(uncompressedAddrStr); + CheckAddressString(inSuite, lAddressBuffer, uncompressedAddrStr); +#else + CheckAddressString(inSuite, lAddressBuffer, inContext.mAddrString); +#endif } // Test functions invoked from the suite. @@ -786,9 +800,22 @@ void CheckToString(nlTestSuite * inSuite, void * inContext) SetupIPAddress(lAddress, lCurrent); lAddress.ToString(lAddressBuffer); - +#if CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT + // Embedded openthread stack otIp6AddressFromString format the string as a uncompressed IPV6 + // So ff01::1 is formatted has ff01:0:0:0:0:0:0:1 + // But the IPV6 address From string API (otIp6AddressFromString) handle both compressed and uncompressed format. + // For this test, pass the expected, compressed, string throught the opentread stack address format API + // so the final check evaluates uncompressed IPV6 strings. + char uncompressedAddrStr[INET6_ADDRSTRLEN]; + IPAddress tempIpAddr; + // Set Expected compressed IPV6 String as otIpv6 Address + IPAddress::FromString(lCurrent->mAddr.mAddrString, strlen(lCurrent->mAddr.mAddrString), tempIpAddr); + // Reconvert the expected IPV6 String to an uncompressed string format + tempIpAddr.ToString(uncompressedAddrStr); + CheckAddressString(inSuite, lAddressBuffer, uncompressedAddrStr); +#else CheckAddressString(inSuite, lAddressBuffer, lCurrent->mAddr.mAddrString); - +#endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT ++lCurrent; } } @@ -1015,6 +1042,9 @@ void CheckToIPv6(nlTestSuite * inSuite, void * inContext) #if LWIP_IPV6_SCOPES ip_addr_1.zone = 0; #endif +#elif CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT + otIp6Address ip_addr_1 = { 0 }, ip_addr_2 = { 0 }; + memcpy(ip_addr_1.mFields.m32, addr, sizeof(addr)); #else struct in6_addr ip_addr_1, ip_addr_2; ip_addr_1 = *reinterpret_cast(addr); @@ -1052,6 +1082,9 @@ void CheckFromIPv6(nlTestSuite * inSuite, void * inContext) #if CHIP_SYSTEM_CONFIG_USE_LWIP ip6_addr_t ip_addr; memcpy(ip_addr.addr, addr, sizeof(addr)); +#elif CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT + otIp6Address ip_addr; + memcpy(ip_addr.mFields.m32, addr, sizeof(addr)); #else struct in6_addr ip_addr; ip_addr = *reinterpret_cast(addr); @@ -1203,9 +1236,9 @@ void CheckFromIPv4(nlTestSuite * inSuite, void * inContext) */ void CheckFromSocket(nlTestSuite * inSuite, void * inContext) { -#if CHIP_SYSTEM_CONFIG_USE_LWIP +#if CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT (void) inSuite; - // This test is only supported for non LWIP stack. + // This test is not supported LWIP or OPEN_THREAD_ENDPOINT stacks. #else // CHIP_SYSTEM_CONFIG_USE_LWIP const struct TestContext * lContext = static_cast(inContext); IPAddressExpandedContextIterator lCurrent = lContext->mIPAddressExpandedContextRange.mBegin; @@ -1261,7 +1294,7 @@ void CheckFromSocket(nlTestSuite * inSuite, void * inContext) ++lCurrent; } -#endif // CHIP_SYSTEM_CONFIG_USE_LWIP +#endif // CHIP_SYSTEM_CONFIG_USE_LWIP || CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_ENDPOINT } /** diff --git a/src/lwip/BUILD.gn b/src/lwip/BUILD.gn index c51383a944dc80..98e94def25fb84 100644 --- a/src/lwip/BUILD.gn +++ b/src/lwip/BUILD.gn @@ -226,7 +226,6 @@ if (current_os == "zephyr" || current_os == "mbed") { sources += [ "${lwip_platform}/lwipopts-rs911x.h", - "${lwip_platform}/lwipopts-thread.h", "${lwip_platform}/lwipopts-wf200.h", ] } else if (lwip_platform == "standalone") { diff --git a/src/lwip/silabs/lwipopts-thread.h b/src/lwip/silabs/lwipopts-thread.h deleted file mode 100644 index f667e5bb3a8f27..00000000000000 --- a/src/lwip/silabs/lwipopts-thread.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Nest Labs, Inc. - * - * 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 - * Compile-time configuration for LwIP on EFR32 platforms using the - * Silicon Labs EFR32 SDK. - * - */ - -#ifndef __LWIPOPTS_H__ -#define __LWIPOPTS_H__ - -#if CHIP_HAVE_CONFIG_H -#include -#endif - -#include - -#define NO_SYS 0 -#define MEM_ALIGNMENT (4) -#define MEMP_NUM_TCP_SEG (TCP_SND_QUEUELEN + 1) -#define LWIP_TIMEVAL_PRIVATE (0) -#define MEM_LIBC_MALLOC (0) -#define LWIP_COMPAT_MUTEX (0) -#define SYS_LIGHTWEIGHT_PROT (1) -#define LWIP_AUTOIP (0) -#define LWIP_DHCP_AUTOIP_COOP (0) -#define LWIP_SOCKET_SET_ERRNO 0 -#define IP_REASS_MAX_PBUFS 0 -#define IP_REASSEMBLY 0 -#define MEMP_NUM_REASSDATA 0 -#define LWIP_SO_RCVTIMEO 0 -#define SO_REUSE (1) -#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS (1) -#define LWIP_STATS (0) -#define LWIP_TCPIP_CORE_LOCKING 1 -#define TCP_QUEUE_OOSEQ 0 -#define ARP_QUEUEING (0) -#define TCPIP_THREAD_NAME "LWIP" - -#define LWIP_SOCKET 0 - -#define LWIP_FREERTOS_USE_STATIC_TCPIP_TASK 1 - -#define LWIP_RAW 1 -#define MEMP_NUM_RAW_PCB (4) - -#define MEMP_NUM_UDP_PCB (5) - -#define LWIP_HAVE_LOOPIF (0) - -// TODO: not sure why this is disabled -#define LWIP_NETIF_LOOPBACK (0) - -#define MEMP_NUM_NETCONN (0) - -#define LWIP_IPV4 0 - -#define LWIP_IPV6 1 -#define LWIP_IPV6_ROUTE_TABLE_SUPPORT 1 -#define LWIP_ARP (0) -#define LWIP_DNS (0) -#define LWIP_ICMP (0) -#define LWIP_IGMP (0) -#define LWIP_DHCP (0) -#define LWIP_IPV6_REASS (0) -#define LWIP_IPV6_DHCP6 0 -#define LWIP_IPV6_AUTOCONFIG (0) -#define LWIP_IPV6_ROUTER_SUPPORT 0 -#define LWIP_ND6_LISTEN_RA 0 - -#define LWIP_ND6_NUM_NEIGHBORS (0) -#define LWIP_ND6_NUM_DESTINATIONS (0) -#define LWIP_ND6_NUM_PREFIXES (0) -#define LWIP_ND6_NUM_ROUTERS (0) -#define LWIP_ND6_MAX_MULTICAST_SOLICIT (0) -#define LWIP_ND6_MAX_UNICAST_SOLICIT (0) -#define LWIP_ND6_MAX_NEIGHBOR_ADVERTISEMENT (0) -#define LWIP_ND6_TCP_REACHABILITY_HINTS (0) - -#if defined(EFR32MG21) -#define MEMP_SEPARATE_POOLS (1) -#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) -#define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (5) -#define PBUF_POOL_BUFSIZE (1280) -#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) -#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) -#else -#define MEMP_SEPARATE_POOLS (1) -#define LWIP_PBUF_FROM_CUSTOM_POOLS (0) -#define MEMP_USE_CUSTOM_POOLS (0) -#define PBUF_POOL_SIZE (8) -#define PBUF_POOL_BUFSIZE (1280) -#define PBUF_CUSTOM_POOL_IDX_START (MEMP_PBUF_POOL_SMALL) -#define PBUF_CUSTOM_POOL_IDX_END (MEMP_PBUF_POOL_LARGE) -#endif - -#define TCP_MSS (1152) -#define TCP_SND_BUF (2 * TCP_MSS) -#define TCP_LISTEN_BACKLOG (1) - -#define ETH_PAD_SIZE (0) -#define SUB_ETHERNET_HEADER_SPACE (0) -#define PBUF_LINK_HLEN (0) - -#if defined(EFR32MG21) -#define TCPIP_THREAD_STACKSIZE (1536) -#else -#define TCPIP_THREAD_STACKSIZE (2048) -#endif - -#define TCPIP_THREAD_PRIO (2) - -#define NETIF_MAX_HWADDR_LEN 8U - -#define LWIP_IPV6_NUM_ADDRESSES 5 - -#define LWIP_IPV6_ND 0 -#define LWIP_ND6_QUEUEING 0 - -#define LWIP_MULTICAST_PING 0 - -#define TCPIP_MBOX_SIZE 6 -#define DEFAULT_RAW_RECVMBOX_SIZE 6 -#define DEFAULT_UDP_RECVMBOX_SIZE 6 -#define DEFAULT_TCP_RECVMBOX_SIZE 6 - -#ifdef LWIP_DEBUG - -#define MEMP_OVERFLOW_CHECK (0) -#define MEMP_SANITY_CHECK (0) -#define MEM_DEBUG (LWIP_DBG_OFF) -#define MEMP_DEBUG (LWIP_DBG_OFF) -#define PBUF_DEBUG (LWIP_DBG_OFF) -#define API_LIB_DEBUG (LWIP_DBG_OFF) -#define API_MSG_DEBUG (LWIP_DBG_OFF) -#define TCPIP_DEBUG (LWIP_DBG_OFF) -#define NETIF_DEBUG (LWIP_DBG_OFF) -#define SOCKETS_DEBUG (LWIP_DBG_OFF) -#define DEMO_DEBUG (LWIP_DBG_OFF) -#define DHCP_DEBUG (LWIP_DBG_OFF) -#define AUTOIP_DEBUG (LWIP_DBG_OFF) -#define ETHARP_DEBUG (LWIP_DBG_OFF) -#define IP_DEBUG (LWIP_DBG_OFF) -#define IP_REASS_DEBUG (LWIP_DBG_OFF) -#define IP6_DEBUG (LWIP_DBG_OFF) -#define RAW_DEBUG (LWIP_DBG_OFF) -#define ICMP_DEBUG (LWIP_DBG_OFF) -#define UDP_DEBUG (LWIP_DBG_OFF) -#define TCP_DEBUG (LWIP_DBG_OFF) -#define TCP_INPUT_DEBUG (LWIP_DBG_OFF) -#define TCP_OUTPUT_DEBUG (LWIP_DBG_OFF) -#define TCP_RTO_DEBUG (LWIP_DBG_OFF) -#define TCP_CWND_DEBUG (LWIP_DBG_OFF) -#define TCP_WND_DEBUG (LWIP_DBG_OFF) -#define TCP_FR_DEBUG (LWIP_DBG_OFF) -#define TCP_QLEN_DEBUG (LWIP_DBG_OFF) -#define TCP_RST_DEBUG (LWIP_DBG_OFF) -#define PPP_DEBUG (LWIP_DBG_OFF) -#endif - -#define LWIP_DBG_TYPES_ON \ - (LWIP_DBG_ON | LWIP_DBG_TRACE) /* (LWIP_DBG_ON|LWIP_DBG_TRACE|LWIP_DBG_STATE|LWIP_DBG_FRESH|LWIP_DBG_HALT) */ - -#endif /* __LWIPOPTS_H__ */ diff --git a/src/lwip/silabs/lwipopts.h b/src/lwip/silabs/lwipopts.h index 499e11d4700c19..722134514eb864 100644 --- a/src/lwip/silabs/lwipopts.h +++ b/src/lwip/silabs/lwipopts.h @@ -2,6 +2,4 @@ #include "lwipopts-wf200.h" #elif defined(RS911X_WIFI) #include "lwipopts-rs911x.h" -#else -#include "lwipopts-thread.h" #endif diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index a8d442d5c2140e..eaace30f8c3d75 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -29,9 +29,4 @@ chip_monolithic_tests = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" -#Fix me : Test driver should use same config as examples -# Problem : Linker issue if set to true -chip_system_config_use_open_thread_inet_endpoints = false -chip_with_lwip = true - pw_rpc_CONFIG = "$dir_pw_rpc:disable_global_mutex" diff --git a/third_party/silabs/silabs_lwip/BUILD.gn b/third_party/silabs/silabs_lwip/BUILD.gn index dd05ec4cf319c6..e148763a9ca70d 100644 --- a/third_party/silabs/silabs_lwip/BUILD.gn +++ b/third_party/silabs/silabs_lwip/BUILD.gn @@ -36,7 +36,6 @@ lwip_target("silabs_lwip") { sources = [ "${chip_root}/src/lwip/freertos/sys_arch.c", "${chip_root}/src/lwip/silabs/lwipopts-rs911x.h", - "${chip_root}/src/lwip/silabs/lwipopts-thread.h", "${chip_root}/src/lwip/silabs/lwipopts-wf200.h", ] From ed288db2ed0ff7d2ed68f448a59bdbecdf5e1d51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 12:57:18 +0000 Subject: [PATCH 7/8] Bump third_party/nanopb/repo from `41319af` to `671672b` (#32400) Bumps [third_party/nanopb/repo](https://github.com/nanopb/nanopb) from `41319af` to `671672b`. - [Commits](https://github.com/nanopb/nanopb/compare/41319af88e569d4af31ea28a08fd2580a1f6655c...671672b4d7994a9b07a307ae654885c7202ae886) --- updated-dependencies: - dependency-name: third_party/nanopb/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/nanopb/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/nanopb/repo b/third_party/nanopb/repo index 41319af88e569d..671672b4d7994a 160000 --- a/third_party/nanopb/repo +++ b/third_party/nanopb/repo @@ -1 +1 @@ -Subproject commit 41319af88e569d4af31ea28a08fd2580a1f6655c +Subproject commit 671672b4d7994a9b07a307ae654885c7202ae886 From 33a2c5f86e2c0203e23fd5831ba0f8fb6f3eacf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 14:20:19 +0000 Subject: [PATCH 8/8] Bump third_party/mbedtls/repo from `36e6bd6` to `cb086af` (#32405) Bumps [third_party/mbedtls/repo](https://github.com/ARMmbed/mbedtls) from `36e6bd6` to `cb086af`. - [Release notes](https://github.com/ARMmbed/mbedtls/releases) - [Commits](https://github.com/ARMmbed/mbedtls/compare/36e6bd6926560933583dc04a7f92f69bdbafe8bd...cb086af4bca85d378ab1cfc31189c455aa7425f0) --- updated-dependencies: - dependency-name: third_party/mbedtls/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/mbedtls/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/mbedtls/repo b/third_party/mbedtls/repo index 36e6bd69265609..cb086af4bca85d 160000 --- a/third_party/mbedtls/repo +++ b/third_party/mbedtls/repo @@ -1 +1 @@ -Subproject commit 36e6bd6926560933583dc04a7f92f69bdbafe8bd +Subproject commit cb086af4bca85d378ab1cfc31189c455aa7425f0