Skip to content

Draft: Network Provisioning: Session Only Mode (IEC-496)#697

Open
shahpiyushv wants to merge 3 commits intoespressif:masterfrom
shahpiyushv:task/external-protocomm
Open

Draft: Network Provisioning: Session Only Mode (IEC-496)#697
shahpiyushv wants to merge 3 commits intoespressif:masterfrom
shahpiyushv:task/external-protocomm

Conversation

@shahpiyushv
Copy link
Contributor

@shahpiyushv shahpiyushv commented Mar 4, 2026

Checklist

  • Component contains License
  • Component contains README.md
  • Component contains idf_component.yml file with url field defined
  • Component was added to upload job
  • Component was added to build job
  • Optional: Component contains unit tests
  • CI passing

Change description

In applications like ESP RainMaker, the provisioning session is used for various tasks like claiming, user-node mapping, BLE local control and so on. With new use cases coming up, there is a need to make this functionality available even when not in provisioning mode. Duplicating the protocomm calls is susceptible to errors as it would be like re-implementing the logic that exist in network_provisioning and ensure it stays in sync. There would also be a flash memoty impact.

Instead, a session only mode has been introduced so that users can re-use the same protocomm logic of network provisioning, without explicitly starting the provisioning state machine itself.

wifi_prov was renamed to network_prov, yet the example had references to
the older names. Since it was guarded by a kconfig option, it was getting
skipped and so, never noticed.
…session post-provisioning

Introduce NETWORK_PROV_MODE_SESSION_ONLY, a new operating mode that keeps the
provisioning transport (BLE, SoftAP, etc.) and protocomm session alive
after provisioning completes and on subsequent already-provisioned boots,
allowing the application to register and use its own endpoints on the same session.

  Key changes:
  - Add network_prov_mode_t enum and mode field to network_prov_mgr_config_t
  - Add network_prov_mgr_enable_provisioning() to opt into provisioning on top
    of an always-on transport session
  - Add network_prov_mgr_get_mode() for runtime mode queries from event handlers
    (safe to call from NETWORK_PROV_DEINIT even after prov_ctx is freed)
  - Always register all GATT characteristics at init() regardless of mode so
    the client side BLE cache (generally seen for iOS/macOS) remains valid across boots

  Bump version to 1.2.3.
@github-actions github-actions bot changed the title Draft: Network Provisioning: Session Only Mode Draft: Network Provisioning: Session Only Mode (IEC-496) Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants