Skip to content

[SL-UP] Implement provisioning shell command - #1248

Closed
Michael Duggan (miduggan24) wants to merge 2 commits into
release_2.10-1.6.1from
provision_mode_cli
Closed

Michael Duggan (miduggan24) wants to merge 2 commits into
release_2.10-1.6.1from
provision_mode_cli

Conversation

@miduggan24

@miduggan24 Michael Duggan (miduggan24) commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Renode does not simulate J-Link, so we cannot provision over J-Link RTT channel and must rely on BLE provisioning channel.

For BLE provisioning channel, have to enable provisioning mode but none of the currently supported ways of enabling would work on a simulated device:

  • Can't write to nvm3 using commander (no J-Link)
  • Can't factory reset with provision enabled (no physical HW to trigger with buttons)

This PR adds a provisioning shell command that allows users to trigger factory reset with provisioning enabled in the device console

Related issues

NOJIRA

Testing

Test slc build in matter_extension PR: SiliconLabsSoftware/matter_extension#1138

Send provision shell command, verify provision mode ENABLED

GN testing locally is blocked due to corporate security blocking silabs setup script slt download, but the GN pattern follows other shell implementation like icd, ble, etc. PR CI will test app builds with changes

@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor

cursor Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

PR Summary

Medium Risk
Factory reset and provisioning flags affect NVM and commissioning state; the change is narrow but operationally sensitive if the shell is exposed in production builds.

Overview
Adds a provision CHIP shell command on Silicon Labs example platforms so developers can trigger factory reset with provisioning required from the device console—useful when hardware buttons or J-Link/nvm3 tooling are unavailable (e.g. Renode simulation with BLE provisioning).

The new ProvisionShellCommands module registers the command and calls SilabsScheduleFactoryReset(true). ScheduleFactoryReset now takes an optional requestProvisioning flag (default false); when set, the scheduled reset path sets ProvisionRequired the same way as holding the action button during reset, without changing the existing button-only factory reset behavior.

GN build wiring adds a shell:provision target and links it for efr32 and SiWx917 when chip_build_libshell is enabled.

Reviewed by Cursor Bugbot for commit 6e34c68. Configure here.

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

@miduggan24

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 6e34c68. Configure here.

@miduggan24
Michael Duggan (miduggan24) marked this pull request as ready for review October 6, 2026 19:41
@miduggan24
Michael Duggan (miduggan24) requested a review from a team as a code owner October 6, 2026 19:41
// Press both buttons to request provisioning
if (GetPlatform().GetButtonState(APP_ACTION_BUTTON))
// Press both buttons, or the provision shell command, to request provisioning
if (sProvisionWithFactoryReset || GetPlatform().GetButtonState(APP_ACTION_BUTTON))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure you need sProvisionWithFactoryReset? Looks like the lambda can capture the value of requestProvisioning for the same effect.

@miduggan24

Copy link
Copy Markdown
Contributor Author

closing as provisioning will be component enabled which would work for simulated device: https://silabsiot.slack.com/archives/C08BYL4JACS/p1787323802016279

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants