Skip to content

Commit 646783b

Browse files
Merge pull request #2678 from fabik111/fix-prov-docs
Update section Reconfiguration Procedure
2 parents 85cbf26 + 9f9ad14 commit 646783b

File tree

2 files changed

+53
-18
lines changed
  • content/arduino-cloud

2 files changed

+53
-18
lines changed

content/arduino-cloud/02.hardware/06.device-provisioning/content.md

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ During this process you will be asked to wipe out the current network configurat
146146
3. Click on the device you want to update the network settings for.
147147
4. Click on the "change" button by the network section.
148148
5. If you are using the Arduino Cloud webpage, select the Bluetooth method.
149-
6. 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.
149+
6. Reset the board using the method of your board. Have a look at the [How to set up the Reconfiguration Procedure](https://docs.arduino.cc/arduino-cloud/cloud-interface/sketches/#how-to-set-up-the-reconfiguration-procedure) article to find the default board reset pin. If you have changed the reset pin from the default one, please use that.
150150
7. The board will reboot, and you will see the LED pulsing.
151151
8. Connect to the board on the Arduino Cloud.
152152
9. Input the new network configuration.
@@ -173,27 +173,11 @@ If you want to delete the stored network configuration without updating it, ther
173173

174174
To proceed with the next steps, the Cloud-generated sketch must be uploaded to the board.
175175

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.
176+
Reset the board using the method of your board. Have a look at the [How to set up the Reconfiguration Procedure](https://docs.arduino.cc/arduino-cloud/cloud-interface/sketches/#how-to-set-up-the-reconfiguration-procedure) article to find the default board reset pin. If you have changed the reset pin from the default one, please use that.
177177

178178
### Using the DeleteConfiguration Sketch
179179

180180
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.
181181

182182
The sketch can also be found [here](https://github.com/arduino-libraries/Arduino_NetworkConfigurator/blob/main/examples/utility/DeleteConfiguration/DeleteConfiguration.ino).
183183

184-
### How to set up the Reconfiguration Procedure
185-
186-
As the Provisioning 2.0 ends, the Bluetooth LE interface is turned off.
187-
188-
To restart the Bluetooth LE interface to update the network settings, the [**Arduino_NetworkConfigurator**](https://github.com/arduino-libraries/Arduino_NetworkConfigurator?tab=readme-ov-file) library provides a procedure called "Reconfiguration Procedure". This procedure is based on the shorting of two pins of the board.
189-
190-
The library provides a default implementation according to the board type.
191-
192-
- `Arduino Opta`: Press and hold the user button (BTN_USER) until the led (LED_USER) turns off
193-
- `Arduino MKR WiFi 1010`: Short pin 7 to GND until the led turns off
194-
- `Arduino GIGA R1 WiFi`: Short pin 7 to GND until the led turns off
195-
- `Arduino Nano RP2040 Connect`: Short pin 2 to 3.3V until the led turns off
196-
- `Arduino Portenta H7`: Short pin 0 to GND until the led turns off
197-
- `Arduino Portenta C33`: Short pin 0 to GND until the led turns off
198-
- `Other boards`: Short pin 2 to GND until the led turns off
199-
- `Portenta Machine Control`: Currently the reset procedure is not available

content/arduino-cloud/03.cloud-interface/00.sketches/sketches.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,57 @@ void initProperties(){
311311
ArduinoCloud.addProperty(variable, READWRITE, ON_CHANGE, onVariableChange);
312312
}
313313
```
314+
### How to set up the Reconfiguration Procedure
315+
316+
As the Provisioning 2.0 ends, the Bluetooth LE interface is turned off.
317+
318+
To restart the Bluetooth LE interface to update the network settings, the [**Arduino_NetworkConfigurator**](https://github.com/arduino-libraries/Arduino_NetworkConfigurator?tab=readme-ov-file) library provides a procedure called "Reconfiguration Procedure". This procedure is based on the shorting of two pins of the board.
319+
320+
The library provides a default implementation according to the board type.
321+
322+
- `Arduino Opta`: Press and hold the user button (BTN_USER) until the led (LED_USER) turns off
323+
- `Arduino MKR WiFi 1010`: Short pin 7 to GND until the led turns off
324+
- `Arduino GIGA R1 WiFi`: Short pin 7 to GND until the led turns off
325+
- `Nicla Vision`: Short the pin PA_13 to GND until the led turns off
326+
- `Arduino Portenta H7`: Short pin 0 to GND until the led turns off
327+
- `Arduino Portenta C33`: Short pin 0 to GND until the led turns off
328+
- `Other boards`: Short pin 2 to GND until the led turns off
329+
- `Portenta Machine Control`: Currently the reset procedure is not available
330+
331+
***Internally, the pin designated for the procedure is set as INPUT_PULLUP (except for Arduino Opta ), and it's attached to an ISR fired on every change of the pin's status.***
332+
333+
#### How to use the Reconfiguration pin in your sketch
334+
335+
If you want to use the Reconfiguration pin in your sketch, you can add a custom callback function to be fired every time the pin’s state changes.
336+
337+
1. Define a function having this signature: `void func(void)`
338+
Example:
339+
```
340+
void onReconfigurationPinInterrupt()
341+
```
342+
2. Pass the callback function to the `NetworkConfigurator`, adding this line in the `initProperties()` function of the `thingProperties.h`
343+
```
344+
NetworkConfigurator.addReconfigurePinCallback(onReconfigurationPinInterrupt);
345+
```
346+
347+
#### Change the Reconfiguration pin
348+
349+
Despite the default reconfiguration pin, you can change it using the following code:
350+
```
351+
NetworkConfigurator.setReconfigurePin(your_pin);
352+
```
353+
in the `initProperties()` function of the `thingProperties.h`
354+
355+
The new pin must be in the list of digital pins usable for interrupts.
356+
Please refer to the Arduino documentation for more [details](https://docs.arduino.cc/language-reference/en/functions/external-interrupts/attachInterrupt/).
357+
358+
#### Disable the Reconfiguration feature
359+
360+
To disable the reconfiguration procedure, use the following function:
361+
```
362+
NetworkConfigurator.setReconfigurePin(DISABLE_PIN);
363+
```
364+
in the `initProperties()` function of the `thingProperties.h`
314365

315366
## Offline Sketches
316367

0 commit comments

Comments
 (0)