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
Copy file name to clipboardExpand all lines: content/arduino-cloud/02.hardware/06.device-provisioning/content.md
+2-16Lines changed: 2 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,23 +142,14 @@ You can update the network settings from the detail page of the device on the Ar
142
142
During this process you will be asked to wipe out the current network configuration to restart the board's BLE interface.
143
143
144
144
- Power on the board.
145
-
146
145
- Reset the board using the method of your board. Have a look at the [How to set up the Reconfiguration Procedure](#How-to-set-up-the Reconfiguration-Procedure) section of this article to find the default board reset pin. If you have changed the reset pin from the default one, please use that.
147
-
148
146
- Open the devices page of the Mobile App or the Arduino Cloud webpage.
149
-
150
147
- Click on the device you want to update the network settings for.
151
-
152
148
- Click on the "change" button by the network section.
153
-
154
149
- If you are using the Arduino Cloud webpage, select the BLE method.
155
-
156
150
- The board will reboot, and you will see the LED pulsing.
157
-
158
151
- Connect to the board.
159
-
160
152
- Input the new network configuration.
161
-
162
153
- The board will validate it, and if correct, it will close the connection.
163
154
164
155
### Update Using the Serial Interface
@@ -168,28 +159,23 @@ Ensure that the "SerialAgent" is enabled in the cloud sketch, via "thingProperti
168
159
This method only works with the Arduino Cloud website. You can update the network settings from the detail page of the board on the webpage. The Serial interface, if enabled, is always ready to receive a new configuration.
169
160
170
161
- Turn on the board and connect it to your PC using a USB cable.
171
-
172
162
- Open the devices page on the Arduino Cloud webpage.
173
-
174
163
- Click on the board you want to update the network settings for.
175
-
176
164
- Click on the "change" button by the network section.
177
-
178
165
- Input the new network configuration.
179
-
180
166
- The board will validate it, and if correct, it will close the connection.
181
167
182
168
## How to delete a stored network configuration
183
169
184
170
If you want to delete the stored network configuration without updating it, there are two possible methods to do so.
185
171
186
-
### Board Reset procedure
172
+
### Board Reset Procedure
187
173
188
174
To proceed with the next steps, the cloud-generated sketch must be uploaded to the board.
189
175
190
176
Reset the board using the method of your board. Have a look at the [How to set up the Reconfiguration Procedure](#How-to-set-up-the Reconfiguration-Procedure) section of this article to find the default board reset pin. If you have changed the reset pin from the default one, please use that.
191
177
192
-
### Using the DeleteConfiguration sketch
178
+
### Using the DeleteConfiguration Sketch
193
179
194
180
Open Arduino IDE and on the left side open the **library manager**. Search for **Arduino_NetworkConfigurator** and download it. Once it is downloaded go to **File > Examples > Arduino_NetworkConfigurator > Utility > DeleteConfiguration**, this will open a new example sketch. Select your board and port then upload this example sketch to your board. When the sketch has been uploaded you can look at the serial monitor to monitor the progress and troubleshoot if needed.
Copy file name to clipboardExpand all lines: content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md
+31-56Lines changed: 31 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,61 +131,48 @@ This file will be visible as a "Secret" tab in the Cloud Editor and is named `ar
131
131
132
132
Note that if you are using the offline IDE / Arduino CLI, you will need to manually create this file. More information is in the **Offline Sketches section**.
133
133
134
-
135
-
136
134
## thingsProperties.h and the NetworkConfigurator
137
135
138
136
The thingProperties.h file plays a key role in managing credential capabilities, including the NetworkConfigurator, which enables two main features:
139
137
140
138
- Credentials stored on NVS: Boards can now securely store network settings in Non-Volatile Storage (NVS), removing them from the sketch (secrets.h).
139
+
- Over-the-Air (OTA) communication: Enables the possibility to provide network configuration settings via Bluetooth (BLE).
141
140
142
-
- Over-the-Air (OTA) communication: Enables the possibility to provide network settings configuration via Bluetooth (BLE)
143
-
144
-
The thingProperties.h will be generated accordingly to the provisioning mechanism, so if the board has been registered using the provisioning 2.0, automatically the thingProperties.h file will have the NetworkConfigurator component enabled.
145
-
146
-
A board registered with Provisioning 2.0 includes Arduino_NetworkConfigurator.h in the generated thingProperties.h.
141
+
The `thingProperties.h` will be generated accordingly to the provisioning mechanism, so if the board has been registered using the provisioning 2.0, the `thingProperties.h` file will automatically have the NetworkConfigurator component enabled. A board registered with Provisioning 2.0 includes `Arduino_NetworkConfigurator.h` in the generated `thingProperties.h` file.
147
142
148
143
### How the NetworkConfigurator works
149
144
150
145
To work, the NetworkConfigurator needs:
151
146
152
-
- One or more Configurator Agents: Objects that handle the communication between the board and the user device (PC, laptop, or Mobile phone). The NetworkConfigurator library out-of-the-box provides two Agents:
147
+
- One or more Configurator Agents: Objects that handle the communication between the board and the user device (PC, laptop, or Mobile phone).
148
+
- A Key-Value Storage library: the NetworkConfigurator needs an external storage library that implements the KVStoreInterface. Arduino provides the `Arduino_KVStore` library for handling the storage and saving the NetworkConfigurator configurations.
149
+
- A ConnectionHandler: the object responsible for the board's Internet connection management.
153
150
154
-
- BLEAgent for handling the BLE communication
151
+
The `NetworkConfigurator` library out-of-the-box provides two Agents:
155
152
153
+
- BLEAgent for handling the BLE communication.
156
154
- SerialAgents for the Serial communication.
157
155
158
-
- A Key-Value Storage library: the NetworkConfigurator needs an external storage library that implements the KVStoreInterface. Arduino provides the Arduino_KVStore library for handling the storage and saving the NetworkConfigurator configurations.
159
-
160
-
- A ConnectionHandler: the object responsible for the board’s Internet connection management
156
+
## thingsProperties.h Default Setup
161
157
162
-
### thingsProperties.h
163
-
Here is how the thingsProperties.h file changes to set up the NetworkConfigurator.
158
+
Here is how the `thingsProperties.h` file changes to set up the NetworkConfigurator. This setup is automatically generated if the board has been registered with Provisioning 2.0.
164
159
165
-
### Default setup
166
-
This setup is automatically generated if the board has been registered with Provisioning 2.0.
160
+
*** Do not follow these steps if the board has not been registered with the Provisioning 2.0 ***
167
161
168
-
Do not try if the board has not been registered with the Provisioning 2.0
162
+
### Libraries and object declarations
169
163
170
-
Automatically, both the SeralAgent and the BLEAgent are enabled
171
-
172
-
Libraries and object declarations
173
164
The following libraries are automatically included:
174
165
175
-
Arduino_NetworkConfigurator library
176
-
177
-
BLEAgent.h and SerialAgent.h
178
-
179
-
The objects declared:
180
-
181
-
kvStore: for handling the NVM operations
182
-
183
-
BLEAgent for handling the BLE interface
166
+
- Arduino_NetworkConfigurator library
167
+
- BLEAgent.h
168
+
- SerialAgent.h
184
169
185
-
SerialAgent: for handling the Serial Interface
186
-
187
-
NetworkConfigurator: the networkConfigurator instance
170
+
These objects are declared in `thingsProperties.h`:
188
171
172
+
-`kvStore`: handles the NVM operations
173
+
-`BLEAgent`: handles the BLE interface
174
+
-`SerialAgent`: handles the Serial Interface
175
+
-`NetworkConfigurator`: the networkConfigurator instance
To save board storage and memory, after the provisioning, the BLEAgent can be removed. ~30KB of storage and ~ 2KB of memory are saved for BSS and Data.
236
+
To save board storage and memory, after the provisioning, the `BLEAgent` can be removed. ~30KB of storage and ~ 2KB of memory are saved for BSS and Data. The network credentials provided in the provisioning phase can no longer be changed via Bluetooth if this is disabled.
252
237
253
-
The network credentials provided in the provisioning phase can no longer be changed via Bluetooth
254
-
255
-
To disable the BLEAgent, just comment out or remove the lines of code that include, declare, and enable it.
256
-
257
-
The final result should be the following:
238
+
To disable the `BLEAgent`, just comment out or remove the lines of code that include, declare, and enable it. The final result should be the following:
258
239
259
240
```arduino
260
241
#include <ArduinoIoTCloud.h>
@@ -282,13 +263,9 @@ void initProperties(){
282
263
283
264
### Disable the SerialAgent
284
265
285
-
To save board storage and memory, after the provisioning, the SerialAgent can be removed. ~1KB of storage is saved for BSS and Data
286
-
287
-
The network credentials provided in the provisioning phase can no longer be changed via USB
266
+
To save board storage and memory, after the provisioning, the SerialAgent can be removed. ~1KB of storage is saved for BSS and Data. The network credentials provided in the provisioning phase can no longer be changed via USB if this is disabled.
288
267
289
-
To disable the SerialAgent, just comment out or remove the lines of code that include, declare, and enable it.
290
-
291
-
The final result should be the following:
268
+
To disable the `SerialAgent`, just comment out or remove the lines of code that include, declare, and enable it. The final result should be the following:
292
269
293
270
```arduino
294
271
#include <ArduinoIoTCloud.h>
@@ -318,11 +295,9 @@ void initProperties(){
318
295
319
296
To save board storage and memory, after the provisioning, the NetworkConfigurator can be removed. ~40KB of storage and ~ 2,9KB of memory are saved for BSS and Data.
320
297
321
-
In this setup, the only way to handle network settings is to return to using the secrets declared in secrets.h file. This can be done manually by adding the secrets.h file with the defines needed.
322
-
323
-
In order to change the network settings, you must flash your sketch with the updated network settings in the secrets.h file. The network settings can no longer be updated using the Arduino Cloud WebUI or the mobile app.
298
+
In this setup, the only way to handle network settings is to return to using the secrets declared in `secrets.h` file. This can be done manually by adding the `secrets.h` file with the defines needed.
324
299
325
-
The final result should be the following (thingProperties.h file):
300
+
In order to change the network settings, you must flash your sketch with the updated network settings in the `secrets.h` file. The network settings can no longer be updated using the Arduino Cloud Webpage or the mobile app. The final result should be the following (`thingProperties.h` file):
0 commit comments