diff --git a/examples/lighting-app/esp32/README.md b/examples/lighting-app/esp32/README.md index 84b0bd6ee69a02..2e8d1548db3570 100644 --- a/examples/lighting-app/esp32/README.md +++ b/examples/lighting-app/esp32/README.md @@ -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 @@ -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`. + ## Commissioning over BLE using chip-tool - Please build the standalone chip-tool as described [here](../../chip-tool) diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index 042db7a80eeae1..7e882d432006aa 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -31,6 +31,10 @@ #include #include +#if CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER +#include +#endif // CONFIG_ENABLE_ESP32_FACTORY_DATA_PROVIDER + using namespace ::chip; using namespace ::chip::DeviceManager; using namespace ::chip::DeviceLayer; @@ -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 @@ -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); diff --git a/examples/platform/esp32/common/Esp32AppServer.h b/examples/platform/esp32/common/Esp32AppServer.h index aa6fcc3974d1e1..7b1598cca5a57e 100644 --- a/examples/platform/esp32/common/Esp32AppServer.h +++ b/examples/platform/esp32/common/Esp32AppServer.h @@ -23,4 +23,4 @@ namespace Esp32AppServer { void Init(AppDelegate * context = nullptr); -} +} // namespace Esp32AppServer