Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ESP32] Fixed build failure in lighting-app and readme update #19762

Merged
merged 1 commit into from
Jun 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/lighting-app/esp32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ make sure the IDF_PATH has been exported(See the manual setup steps above).
export PATH=$PATH:path/to/connectedhomeip/out/host
```

- To erase flash of the chip.

$ idf.py -p /dev/tty.SLAB_USBtoUART erase-flash

Below mentioned command generates the nvs image with test DAC with
VID:0xFFF2 and PID:8001

Expand Down Expand Up @@ -171,6 +175,9 @@ make sure the IDF_PATH has been exported(See the manual setup steps above).

$ idf.py -p /dev/tty.SLAB_USBtoUART monitor

- Commissioning over ble after flashing script, change the passcode, replace
`20202021` with `99663300`.

jadhavrohit924 marked this conversation as resolved.
Show resolved Hide resolved
## Commissioning over BLE using chip-tool

- Please build the standalone chip-tool as described [here](../../chip-tool)
Expand Down
11 changes: 10 additions & 1 deletion examples/lighting-app/esp32/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@
#include <app/server/Dnssd.h>
#include <app/server/OnboardingCodesUtil.h>

#if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER
#include <platform/ESP32/ESP32FactoryDataProvider.h>
#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER

using namespace ::chip;
using namespace ::chip::DeviceManager;
using namespace ::chip::DeviceLayer;
Expand All @@ -39,6 +43,12 @@ static const char * TAG = "light-app";

static AppDeviceCallbacks EchoCallbacks;

namespace {
#if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER
ESP32FactoryDataProvider sFactoryDataProvider;
#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER
} // namespace

static void InitServer(intptr_t context)
{
// Print QR Code URL
Expand Down Expand Up @@ -68,7 +78,6 @@ extern "C" void app_main()
#if CONFIG_ENABLE_CHIP_SHELL
chip::LaunchShell();
#endif

CHIPDeviceManager & deviceMgr = CHIPDeviceManager::GetInstance();

CHIP_ERROR error = deviceMgr.Init(&EchoCallbacks);
Expand Down
2 changes: 1 addition & 1 deletion examples/platform/esp32/common/Esp32AppServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

namespace Esp32AppServer {
void Init(AppDelegate * context = nullptr);
}
} // namespace Esp32AppServer