From 2e10854201c8b1c0bdf8fba5d53a7b47b7e101c0 Mon Sep 17 00:00:00 2001
From: AlvinHsiao <Alvin.Hsiao@infineon.com>
Date: Wed, 10 Aug 2022 00:16:08 +0800
Subject: [PATCH] [Infineon] Add QR code URL for CYW30739 (#21743)

---
 examples/lighting-app/cyw30739/src/main.cpp | 4 +++-
 examples/lock-app/cyw30739/src/main.cpp     | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/examples/lighting-app/cyw30739/src/main.cpp b/examples/lighting-app/cyw30739/src/main.cpp
index 11b20a1f63048d..98b00955930817 100644
--- a/examples/lighting-app/cyw30739/src/main.cpp
+++ b/examples/lighting-app/cyw30739/src/main.cpp
@@ -27,6 +27,7 @@
 #include <OTAConfig.h>
 #endif
 #include <app/clusters/identify-server/identify-server.h>
+#include <app/server/OnboardingCodesUtil.h>
 #include <app/server/Server.h>
 #include <credentials/examples/DeviceAttestationCredsExample.h>
 #include <inet/EndPointStateOpenThread.h>
@@ -148,7 +149,8 @@ void InitApp(intptr_t args)
     ConfigurationMgr().LogDeviceConfig();
 
     PlatformMgrImpl().AddEventHandler(EventHandler, 0);
-
+    // Print QR Code URL
+    PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE));
     /* Start CHIP datamodel server */
     static chip::CommonCaseDeviceServerInitParams initParams;
     (void) initParams.InitializeStaticResourcesBeforeServerInit();
diff --git a/examples/lock-app/cyw30739/src/main.cpp b/examples/lock-app/cyw30739/src/main.cpp
index b7d29b446a3440..e63bb342e1be02 100644
--- a/examples/lock-app/cyw30739/src/main.cpp
+++ b/examples/lock-app/cyw30739/src/main.cpp
@@ -30,6 +30,7 @@
 #endif
 #include <app/clusters/door-lock-server/door-lock-server.h>
 #include <app/clusters/identify-server/identify-server.h>
+#include <app/server/OnboardingCodesUtil.h>
 #include <app/server/Server.h>
 #include <credentials/examples/DeviceAttestationCredsExample.h>
 #include <inet/EndPointStateOpenThread.h>
@@ -173,7 +174,8 @@ void InitApp(intptr_t args)
 {
     CHIP_ERROR err = CHIP_NO_ERROR;
     PlatformMgrImpl().AddEventHandler(EventHandler, 0);
-
+    // Print QR Code URL
+    PrintOnboardingCodes(chip::RendezvousInformationFlag(chip::RendezvousInformationFlag::kBLE));
     /* Start CHIP datamodel server */
     static chip::CommonCaseDeviceServerInitParams initParams;
     (void) initParams.InitializeStaticResourcesBeforeServerInit();