You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wifi_prov: Rejig the library to use for multiple transports
We now have a new application for this library which will be used with
no transport, so, move the the core provisioning stuff to a new library
that can be used by BLE or no transport.
Signed-off-by: Chaitanya Tata <[email protected]>
These definitions are available as :file:`.proto` files in the library path.
112
-
See all definitions in the :file:`subsys/bluetooth/services/wifi_prov/proto/` folder.
111
+
See all definitions in the :file:`subsys/net/lib/wifi_prov/proto/` folder.
113
112
114
113
Workflow
115
114
========
@@ -163,76 +162,15 @@ In the ``Response`` message, the ``request_op_code`` is ``FORGET_CONFIG``, and t
163
162
164
163
When the connection state changes or an attempt fails, the target will set up a ``Result`` message, and the ``state`` field indicates the current state of the Wi-Fi, and the ``reason`` field indicates the failure reason.
165
164
166
-
Service declaration
165
+
Transport interface
167
166
*******************
168
167
169
-
The Wi-Fi Provisioning Service is instantiated as a primary service.
170
-
Set the service UUID value as defined in the following table.
* ``Information``: For client to get ``Info`` message from server.
223
-
* ``Operation Control Point``: For client to send ``Request`` message to server, and server to send ``Response`` message to client.
224
-
* ``Data Out``: For server to send ``Result`` message to the client.
225
-
226
-
It takes the functions exposed by the task and event handling part of reading the ``Info`` message and receiving the ``Request`` message as the callbacks of corresponding characteristics.
227
-
It provides functions for the task and event handling part to send ``Response`` and ``Result`` messages.
228
-
229
-
Task and event handling
230
-
***********************
231
-
232
-
The service uses `nanopb`_ to instantiate the protocol buffers-based, platform-independent messages in the C language.
233
-
234
-
It exposes the functions of reading the ``Info`` message and receiving the ``Request`` message to transport layer.
235
-
It uses the function of sending ``Response`` and ``Result`` messages provided by the transport layer to send these messages.
168
+
The core library provides a transport-agnostic interface through weak functions that can be overridden by transport layers:
169
+
170
+
* :c:func:`wifi_prov_send_rsp` - Sends Response messages to the transport layer
171
+
* :c:func:`wifi_prov_send_result` - Sends Result messages to the transport layer
172
+
173
+
Transport layers must implement these functions to handle the actual message transmission (for example, Bluetooth LE indications and notifications, USB transfers, UART transmissions).
236
174
237
175
Configuration management
238
176
************************
@@ -243,10 +181,19 @@ The component has one slot in RAM to save the configurations.
243
181
244
182
You can save the configuration in flash or RAM during provisioning.
245
183
184
+
Dependencies
185
+
************
186
+
187
+
The core library depends on:
188
+
189
+
* nanopb for protobuf message handling.
190
+
* Wi-Fi credentials library for configuration management (:ref:`lib_wifi_credentials`).
191
+
* Wi-Fi management interface for network operations (:ref:`wifi_mgmt`).
0 commit comments