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
@@ -63,7 +63,23 @@ _The following was run on Windows 11 and Ubuntu Desktop 20.04 environments, with
63
63
- ESP32 boards are not natively supported by Arduino IDE, so you need to add them manually.
64
64
- Follow the [instructions](https://github.com/espressif/arduino-esp32) in the official ESP32 repository.
65
65
66
-
## Setup Instructions
66
+
67
+
## Add Azure IoT Hub Device to an ADU Deployment Group
68
+
69
+
Add the `"ADUGroup"` tag to the device's top-level twin document. This is used to group devices together, and you may choose whichever tag you prefer (e.g., "embeddedSDK").
70
+
71
+
```json
72
+
"tags": {
73
+
"ADUGroup": "<your-tag-here>"
74
+
},
75
+
```
76
+
77
+
Viewing the device twin on the portal, the "tag" section should look similar to the following. Don't worry if you do or do not have a `"deviceUpdate"` section in the `"ADUGroup"` tag. ADU adds that as a default group.
78
+
79
+

80
+
81
+
82
+
## Device Setup Instructions
67
83
68
84
1. Run the Arduino IDE.
69
85
@@ -91,75 +107,15 @@ _The following was run on Windows 11 and Ubuntu Desktop 20.04 environments, with
91
107
- Add your cert PK to `IOT_CONFIG_DEVICE_CERT_PRIVATE_KEY`
92
108
- If using **Symmetric Key**:
93
109
- Add your device key to `IOT_CONFIG_DEVICE_KEY`
94
-
-**IMPORTANT**: make sure to change the `ADU_DEVICE_VERSION` to version 1.1 so that we can build the new update image.
95
-
96
-
1. Select the appropriate partition scheme for your device. Go to `Tools` -> `Partition Scheme` -> `Minimal SPIFFS`.
97
-
98
-
## New Image Instructions
99
-
100
-
In order to update our device, we have to build the image which our device will update to. We will have to direct the Arduino IDE to specify an output directory so that we can easily find the binary. Open the `preferences.txt` (usually located at `C:\Users\<Your User Dir>\AppData\Local\Arduino15\`) and add `build.path=C:\Arduino-output` (or whichever directory you prefer).
101
-
102
-
Once you are done with the ADU sample, you may remove the added configuration to restore the build output to its original location.
103
110
104
111
1. Connect the ESP32 microcontroller to your USB port.
105
112
106
-
2. On the Arduino IDE, select the board and port.
113
+
After connecting the device,
107
114
108
115
- Go to menu `Tools`, `Board` and select `ESP32`.
109
116
- Go to menu `Tools`, `Port` and select the port to which the microcontroller is connected.
110
117
111
-
3. Click on "Verify" to build the update image. Make sure you changed the `ADU_DEVICE_VERSION` in your `iot_configs.h` file to `1.1`. You should now have a file called `Azure_IoT_Adu_ESP32.ino.bin` in your output directory. Copy that file to a new directory `C:\ADU-update`, and rename it `Azure_IoT_Adu_ESP32_1.1.bin`
112
-
113
-
### Generate the ADU Update Manifest
114
-
115
-
Navigate to the `C:\ADU-update` directory in a Powershell prompt.
To import the update (`Azure_IoT_Adu_ESP32_1.1.bin`) and manifest (`ESPRESSIF.ESP32-Embedded.1.1.importmanifest.json`), follow the instructions at the link below:
143
-
144
-
-[Import Update and Manifest](https://docs.microsoft.com/azure/iot-hub-device-update/import-update)
145
-
146
-
### Tag Your Device
147
-
148
-
Add the `"ADUGroup"` tag to the device's top-level twin document. This is used to group devices together, and you may choose whichever tag you prefer (e.g., "embeddedSDK").
149
-
150
-
```json
151
-
"tags": {
152
-
"ADUGroup": "<your-tag-here>"
153
-
},
154
-
```
155
-
156
-
Viewing the device twin on the portal, the "tag" section should look similar to the following. Don't worry if you do or do not have a `"deviceUpdate"` section in the `"ADUGroup"` tag. ADU adds that as a default group.
157
-
158
-

159
-
160
-
## Upload Base Image Instructions
161
-
162
-
Now revert the `ADU_DEVICE_VERSION` in your `iot_configs.h` file to `1.0` to create the base image.
118
+
1. Select the appropriate partition scheme for your device. Go to `Tools` -> `Partition Scheme` -> `Minimal SPIFFS`.
163
119
164
120
1. Upload the sketch.
165
121
@@ -222,30 +178,110 @@ Now revert the `ADU_DEVICE_VERSION` in your `iot_configs.h` file to `1.0` to cre
222
178
</p>
223
179
</details>
224
180
225
-
2. Monitor the MCU (microcontroller) locally via the Serial Port.
181
+
1. Monitor the MCU (microcontroller) locally via the Serial Port.
226
182
227
183
- Go to menu `Tools`, `Serial Monitor`.
228
184
229
185
If you perform this step right away after uploading the sketch, the serial monitor will show an output similar to the following upon success:
230
186
231
187
```text
232
-
Connecting to WIFI SSID buckaroo
233
-
.......................WiFi connected, IP address:
234
-
192.168.1.123
235
-
Setting time using SNTP..............................done!
In order to update our device, we have to build the image which our device will update to. We will have to direct the Arduino IDE to specify an output directory so that we can easily find the binary. Open the `preferences.txt` (find its path going to menu `File`, `Preferences`) and add `build.path=C:\Arduino-output` (or whichever directory you prefer), then restart the Arduino IDE.
209
+
210
+
Once you are done with the ADU sample, you may remove the added configuration to restore the build output to its original location.
211
+
212
+
1. Update the image version in the sketch configuration
213
+
214
+
- In `iot_configs.h`, change the `ADU_DEVICE_VERSION` to version 1.1.
215
+
216
+
1. Click on "Verify" to build the update image.
217
+
218
+
Once the build is complete, you should then have a file called `Azure_IoT_Adu_ESP32.ino.bin` in your output directory. Copy that file to a new directory `C:\ADU-update`, and rename it `Azure_IoT_Adu_ESP32_1.1.bin`
219
+
220
+
### Generate the ADU Update Manifest
221
+
222
+
Navigate to the `C:\ADU-update` directory in a Powershell prompt.
To import the update (`Azure_IoT_Adu_ESP32_1.1.bin`) and manifest (`ESPRESSIF.ESP32-Embedded.1.1.importmanifest.json`), follow the instructions at the link below:
250
+
251
+
-[Import Update and Manifest](https://docs.microsoft.com/azure/iot-hub-device-update/import-update)
252
+
253
+
243
254
### Deploy Update
244
255
245
256
To deploy the update to your ESP32, follow the link below:
0 commit comments