Draft: Network Provisioning: Session Only Mode (IEC-496)#697
Open
shahpiyushv wants to merge 3 commits intoespressif:masterfrom
Open
Draft: Network Provisioning: Session Only Mode (IEC-496)#697shahpiyushv wants to merge 3 commits intoespressif:masterfrom
shahpiyushv wants to merge 3 commits intoespressif:masterfrom
Conversation
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.
… for network provisioning
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
urlfield definedChange 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.