Skip to content
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
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Thread Border Router with ESP32

<img src="doc/images/thread_architecture_overview.webp" alt="thread architecture overview diagram" />


## Bullet points

- Supports single ESP32-S31 microcontroller setup
Expand Down Expand Up @@ -74,6 +77,8 @@ http://esp-ot-br.local

- ESP32-S31 single SoC (Function-CoreBoard-1, Korvo-1)

<img src="doc/images/esp32-s31-function-coreboard-1.webp" height="200" alt="ESP31-S31 dev board" />

### SoC with Co-Processor

(- ESP32-P4 with Radio Co-Processor (RCP) e.g. ESP32-C6, ESP32-H2, ESP32-C5 - not tested)
Expand Down
Binary file added doc/images/esp32-s31-function-coreboard-1.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/thread_architecture_overview.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions ot_br/components/ot_br_web_api/ot_br_web_api_setup_mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,18 @@ static void auto_open_commissioning(void)
esp_openthread_lock_release();
}

static void stop_commissioning(void)
{
otInstance *instance = esp_openthread_get_instance();
esp_openthread_lock_acquire(portMAX_DELAY);

otError err = otCommissionerStop(instance);
ESP_LOGI(TAG, "otCommissionerStop: %s (%d)",
otThreadErrorToString(err), err);

esp_openthread_lock_release();
}

static void button_task(void *arg)
{
gpio_config_t cfg = {
Expand Down Expand Up @@ -109,6 +121,7 @@ static void button_task(void *arg)
int64_t elapsed = (esp_timer_get_time() / 1000) - s_setup_mode_started_at;
if (elapsed > SETUP_WINDOW_MS) {
s_setup_mode_active = false;
stop_commissioning();
ESP_LOGI(TAG, "Setup-Modus is expired");
}
}
Expand Down