Skip to content

Commit

Permalink
Print onboarding codes in esp32 ota-requestor/provider apps. (#23863)
Browse files Browse the repository at this point in the history
We're not printing them now, which makes it hard to commission them.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Jul 26, 2023
1 parent 42d3e77 commit 68fae86
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/ota-provider-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "esp_spi_flash.h"
#include "esp_spiffs.h"
#include "nvs_flash.h"
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <common/CHIPDeviceManager.h>
#include <common/Esp32AppServer.h>
Expand Down Expand Up @@ -75,6 +76,9 @@ chip::Callback::Callback<OnBdxTransferFailed> onTransferFailedCallback(OnTransfe

static void InitServer(intptr_t context)
{
// Print QR Code URL
PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE));

Esp32AppServer::Init(); // Init ZCL Data Model and CHIP App Server AND Initialize device attestation config

BdxOtaSender * bdxOtaSender = otaProvider.GetBdxOtaSender();
Expand Down
4 changes: 4 additions & 0 deletions examples/ota-requestor-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "nvs_flash.h"
#include <app/server/OnboardingCodesUtil.h>
#include <common/CHIPDeviceManager.h>
#include <common/Esp32AppServer.h>
#include <credentials/DeviceAttestationCredsProvider.h>
Expand Down Expand Up @@ -65,6 +66,9 @@ constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE;

static void InitServer(intptr_t context)
{
// Print QR Code URL
PrintOnboardingCodes(chip::RendezvousInformationFlags(CONFIG_RENDEZVOUS_MODE));

Esp32AppServer::Init(); // Init ZCL Data Model and CHIP App Server AND Initialize device attestation config

// We only have network commissioning on endpoint 0.
Expand Down

0 comments on commit 68fae86

Please sign in to comment.