Skip to content

Commit e51a09a

Browse files
committed
review corrections
1 parent b19fdbf commit e51a09a

File tree

3 files changed

+54
-47
lines changed

3 files changed

+54
-47
lines changed

articles/iot-hub-device-update/device-update-raspberry-pi.md

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Azure Device Update for IoT Hub using a Raspberry Pi image
33
description: Do an end-to-end image-based Azure Device Update for IoT Hub update using a Raspberry Pi 3 B+ Yocto image.
44
author: eshashah
55
ms.author: eshashah
6-
ms.date: 12/09/2024
6+
ms.date: 12/17/2024
77
ms.topic: tutorial
88
ms.service: azure-iot-hub
99
ms.subservice: device-update
@@ -47,7 +47,7 @@ Add your device to the device registry in your IoT hub and get the connection st
4747
> [!NOTE]
4848
> For demonstration purposes, this tutorial uses a device connection string to authenticate and connect with the IoT hub. For production scenarios, it's better to use module identity and [IoT Identity Service](https://azure.github.io/iot-identity-service/) to provision devices. For more information, see [Device Update agent provisioning](device-update-agent-provisioning.md).
4949
50-
## Get the update files and flash the Raspberry Pi board
50+
## Set up Raspberry Pi
5151

5252
The *Tutorial_RaspberryPi3.zip* file has all the required files for the tutorial. Download the file from the **Assets** section of the latest release on the [GitHub Device Update Releases page](https://github.com/Azure/iot-hub-device-update/releases), and unzip it.
5353

@@ -61,6 +61,14 @@ The update files you import through Device Update are:
6161

6262
### Use bmaptool to flash the SD card
6363

64+
>[!IMPORTANT]
65+
>Azure Device Update for IoT Hub software is subject to the following license terms:
66+
>
67+
>- [Device update for IoT Hub license](https://github.com/Azure/iot-hub-device-update/blob/main/LICENSE)
68+
>- [Delivery optimization client license](https://github.com/microsoft/do-client/blob/main/LICENSE)
69+
>
70+
>Read the license terms before using the agent. Agent installation and use constitutes acceptance of these terms. If you don't agree with the license terms, don't use the Device Update agent.
71+
6472
Use an OS flashing tool to install the Device Update base image on the SD card you use in the Raspberry Pi device. The following instructions use `bmaptool` to flash to the SD card. Replace the `<device>` placeholder with your device name and the `<path to image>` placeholder with the path to the downloaded image file.
6573

6674
1. Install the `bmap-tools` utility if you don't have it.
@@ -91,22 +99,14 @@ Use an OS flashing tool to install the Device Update base image on the SD card y
9199
>[!TIP]
92100
>For faster flashing, you can download the bimap file and the image file and put them in the same directory.
93101
94-
## Install the Device Update agent on Raspberry Pi
95-
96-
>[!IMPORTANT]
97-
>Azure Device Update for IoT Hub software is subject to the following license terms:
98-
>
99-
>- [Device update for IoT Hub license](https://github.com/Azure/iot-hub-device-update/blob/main/LICENSE)
100-
>- [Delivery optimization client license](https://github.com/microsoft/do-client/blob/main/LICENSE)
101-
>
102-
>Read the license terms before using the agent. Agent installation and use constitutes acceptance of these terms. If you don't agree with the license terms, don't use the Device Update agent.
102+
## Configure the Device Update agent on Raspberry Pi
103103

104104
1. Make sure that the Raspberry Pi is connected to the network.
105105

106106
1. Secure shell (SSH) into the Raspberry Pi by using the following command in a PowerShell window:
107107

108108
```shell
109-
ssh raspberrypi3 -l root
109+
ssh raspberrypi3 -l root
110110
```
111111

112112
### Create the Device Update configuration files
@@ -116,7 +116,7 @@ The Device Update *du-config.json* and *du-diagnostics-config.json* configuratio
116116
1. To create the *du-config.json* file or open it for editing, run the following command:
117117

118118
```bash
119-
nano /adu/du-config.json
119+
nano /adu/du-config.json
120120
```
121121

122122
1. The editor opens the *du-config.json* file. If you're creating the file, it's empty. Copy and paste the following code into the file, replacing the example values with any required configurations for your device. Replace the example `connectionData` string with the device connection string you copied in the device registration step.
@@ -150,7 +150,7 @@ The Device Update *du-config.json* and *du-diagnostics-config.json* configuratio
150150
1. Create the *du-diagnostics-config.json* file by using similar commands. Create and open the file:
151151

152152
```bash
153-
nano /adu/du-diagnostics-config.json
153+
nano /adu/du-diagnostics-config.json
154154
```
155155

156156
1. Copy and paste the following *du-diagnostics-config.json* code into the file. The values are the default Device Update log locations, and you need to change them only if your configuration differs from the default.
@@ -176,29 +176,29 @@ The Device Update *du-config.json* and *du-diagnostics-config.json* configuratio
176176
1. Use the following command to show the files located in the */adu/* directory. You should see both configuration files.
177177

178178
```bash
179-
ls -la /adu/
179+
ls -la /adu/
180180
```
181181

182182
1. Use the following command to restart the Device Update system daemon and ensure configurations are applied.
183183

184184
```bash
185-
systemctl start deviceupdate-agent
185+
systemctl start deviceupdate-agent
186186
```
187187

188188
1. Check that the agent is live by running the following command:
189189

190190
```bash
191-
systemctl status deviceupdate-agent
191+
systemctl status deviceupdate-agent
192192
```
193193

194194
Status should appear as alive and green.
195195

196196
## Connect to the device in IoT Hub and add a group tag
197197

198198
1. On the [Azure portal](https://portal.azure.com) IoT hub page for your Device Update instance, select **Device management** > **Devices** from the left navigation.
199-
1. On the **Devices** page, select the link with your device name.
199+
1. On the **Devices** page, select your device's name.
200200
1. At the top of the device page, select **Device twin**.
201-
1. On the **Device twin** page, under the `"reported"` section of the device twin`"properties"` section, look for the Linux kernel version for your device.
201+
1. On the **Device twin** page, under the `"reported"` section of the device twin `"properties"` section, look for the Linux kernel version for your device.
202202

203203
For a new device that hasn't received an update from Device Update, the [DeviceManagement:DeviceInformation:1.swVersion](device-update-plug-and-play.md#device-information-interface) property value represents the firmware version running on the device. After the device has an update applied, the [AzureDeviceUpdateCore:ClientMetadata:4.installedUpdateId](device-update-plug-and-play.md#agent-metadata) property value represents the firmware version.
204204

@@ -227,15 +227,21 @@ Device Update automatically organizes devices into groups based on their assigne
227227
1. On the [Azure portal](https://portal.azure.com) IoT hub page for your Device Update instance, select **Device Management** > **Updates** from the left navigation.
228228
1. On the **Updates** page, select **Import a new update**.
229229
1. On the **Import update** page, select **Select from storage container**.
230-
1. On the **Storage accounts** page, select an existing storage account or create a new account by using **+ Storage account**.
231-
1. On the **Containers** page, select an existing container or create a new container by using **+ Container**. You use the container to stage the update files for import.
230+
1. On the **Storage accounts** page, select an existing storage account or create a new account by selecting **Storage account**.
231+
1. On the **Containers** page, select an existing container or create a new container by selecting **Container**. You use the container to stage the update files for import.
232232

233233
:::image type="content" source="media/import-update/storage-account-ppr.png" alt-text="Screenshot that shows Storage accounts and Containers.":::
234234

235235
> [!TIP]
236236
> To avoid accidentally importing files from previous updates, use a new container each time you import an update. If you don't use a new container, be sure to delete any files from the existing container.
237237
238-
1. On the container page, select **Upload**. Drag and drop, or browse to and select, the update files you downloaded, and then select **Upload**. After they upload, the files appear on the container page.
238+
1. On the container page, select **Upload**. Drag and drop, or browse to and select, the following update files from the *Tutorial_RaspberryPi3* folder you downloaded:
239+
240+
- *adu-update-image-raspberrypi3-1.2.0.swu*
241+
- *example-a-b-update.sh*
242+
- *EDS-ADUClient.yocto-update.1.2.0.importmanifest.json*
243+
244+
1. Select **Upload**. After they upload, the files appear on the container page.
239245

240246
1. On the container page, review and select the files to import, and then select **Select**.
241247

articles/iot-hub-device-update/device-update-simulator.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
title: Azure Device Update for IoT Hub using a simulator agent
3-
description: Get started with Device Update for Azure IoT Hub using the Ubuntu simulator agent.
3+
description: Get started with Device Update for Azure IoT Hub using the Ubuntu 18.04 simulator agent.
44
author: kgremban
55
ms.author: kgremban
6-
ms.date: 12/09/2024
6+
ms.date: 12/17/2024
77
ms.topic: tutorial
88
ms.service: azure-iot-hub
99
ms.subservice: device-update
@@ -22,17 +22,16 @@ In this tutorial, you:
2222
> - Download and install an image update.
2323
> - Import the image update.
2424
> - Deploy the image update.
25-
> - View update deployment history.
25+
> - View the update deployment history.
2626
2727
## Prerequisites
2828

29-
- An IoT device
30-
- An Ubuntu 18.04 or higher x64 physical or virtual machine
29+
- An Ubuntu 18.04 x64 physical or virtual machine
3130
- A [Device Update account and instance configured with an IoT hub](create-device-update-account.md)
3231

3332
## Register and configure a device and module
3433

35-
Add the device to the device registry in your IoT hub. Every device that connects to IoT Hub must be registered.
34+
Add a device to the device registry in your IoT hub. Every device that connects to IoT Hub must be registered.
3635

3736
1. In the [Azure portal](https://portal.azure.com), open the IoT hub page associated with your Device Update instance.
3837
1. In the navigation pane, select **Device management** > **Devices**.
@@ -63,15 +62,18 @@ You can assign a tag to any device that Device Update manages to assign the devi
6362

6463
```json
6564
"tags": {
66-
"DeviceUpdateGroup": "simulator-tutorial"
65+
"DeviceUpdateGroup": "DU-simulator-tutorial"
6766
},
6867
```
6968

7069
1. Select **Save**. The portal reformats the module twin to incorporate the tag into the JSON structure.
7170

7271
## Install and configure the Device Update agent
7372

74-
The Device Update agent runs on every device that Device Update manages. In this tutorial, you install the Device Update agent on your device and configure it to run as a simulator, demonstrating how you can apply an update to a device without changing the device configuration.
73+
The Device Update agent runs on every device that Device Update manages. In this tutorial, you install the Device Update agent on the Ubuntu 18.04 device and configure it to run as a simulator, demonstrating how you can apply an update to a device without changing the device configuration.
74+
75+
>[!NOTE]
76+
>You can also use the Azure IoT Identity Service to provision the device. To do that, [install the Azure IoT Identity Service](https://azure.github.io/iot-identity-service/installation.html) before installing the Device Update agent. Then configure the Device Update agent with `"connectionType": "AIS"` and leave `connectionData` as a blank string in the configuration file.
7577
7678
1. Add the Microsoft package repository, and then add the Microsoft package signing key to your list of trusted keys.
7779

@@ -131,9 +133,6 @@ The Device Update agent runs on every device that Device Update manages. In this
131133

132134
1. Press **Ctrl**+**X** to exit the editor, and enter *y* to save your changes.
133135

134-
>[!NOTE]
135-
>You can also use the Azure IoT Identity Service to provision the device. To do that, [install the Azure IoT Identity Service](https://azure.github.io/iot-identity-service/installation.html) before installing the Device Update agent. Then configure the Device Update agent with `"connectionType": "AIS"` and leave `connectionData` as a blank string in the configuration file.
136-
137136
1. To set up the agent to run as a simulator, run the following command on the IoT device. The Device Update agent invokes the simulator handler to process updates that use the Microsoft SWUpdate extension.
138137

139138
```bash
@@ -142,7 +141,7 @@ The Device Update agent runs on every device that Device Update manages. In this
142141

143142
### Get the simulator files
144143

145-
1. Download and extract the *Tutorial_Simulator.zip* archive from the [GitHub Device Update Releases](https://github.com/Azure/iot-hub-device-update/releases) latest release **Assets** section. If your test device and development machine are separate devices, download and extract the ZIP file onto both devices.
144+
1. Download and extract the *Tutorial_Simulator.zip* archive from the [GitHub Device Update Releases](https://github.com/Azure/iot-hub-device-update/releases) latest release **Assets** section onto your Ubuntu 18.04 machine.
146145

147146
You can use `wget` to download the ZIP file. Replace `<release_version>` with the latest release, for example `1.0.0`.
148147

@@ -180,19 +179,21 @@ The Device Update agent runs on every device that Device Update manages. In this
180179

181180
## Import the update
182181

183-
This section uses the *TutorialImportManifest_Sim.importmanifest.json* and *adu-update-image-raspberrypi3.swu* files from the downloaded *Tutorial_Simulator* folder. The update file is the same one as in the [Raspberry Pi tutorial](device-update-raspberry-pi.md). Because the update in this tutorial is simulated, the specific file content doesn't matter.
182+
Download and extract the *Tutorial_Simulator.zip* archive from the [GitHub Device Update Releases](https://github.com/Azure/iot-hub-device-update/releases) latest release **Assets** section onto your development machine if it's different from your Ubuntu 18.04 IoT device. This section uses the *TutorialImportManifest_Sim.importmanifest.json* and *adu-update-image-raspberrypi3.swu* files from the *Tutorial_Simulator* folder.
183+
184+
The update file is the same one as in the [Raspberry Pi tutorial](device-update-raspberry-pi.md). Because the update in this tutorial is simulated, the specific file content doesn't matter.
184185

185186
1. On your development machine, sign in to the [Azure portal](https://portal.azure.com/) and go to the IoT hub configured with your Device Update instance.
186187
1. In the navigation pane, select **Device Management** > **Updates**.
187188
1. On the **Updates** page, select **Import a new update**.
188189
1. On the **Import update** page, select **Select from storage container**.
189-
1. Select an existing storage account, or create a new account by selecting **+ Storage account**.
190-
1. Select an existing container, or create a new container by selecting **+ Container**. This container is used to stage the update files for importing.
190+
1. Select an existing storage account, or create a new account by selecting **Storage account**.
191+
1. Select an existing container, or create a new container by selecting **Container**. This container is used to stage the update files for importing.
191192

192193
> [!NOTE]
193194
> To avoid accidentally importing files from previous updates, use a new container each time you import an update. If you don't use a new container, be sure to delete any files from the existing container.
194195
195-
1. On the container page, select **Upload**, browse to and select the *TutorialImportManifest_Sim.importmanifest.json* and *adu-update-image-raspberrypi3.swu* files, and then select **Upload**.
196+
1. On the container page, select **Upload**. Browse to and select the *TutorialImportManifest_Sim.importmanifest.json* and *adu-update-image-raspberrypi3.swu* files, and then select **Upload**.
196197

197198
1. Select the checkboxes by both files and then select **Select** to return to the **Import update** page.
198199

@@ -246,7 +247,7 @@ You should see the device group that contains the simulated device you set up in
246247

247248
## Clean up resources
248249

249-
When you no longer need the resources you created for this tutorial, you can delete them.
250+
If you're going to continue to the next tutorial, keep your Device Update and IoT Hub resources. When you no longer need the resources you created for this tutorial, you can delete them.
250251

251252
1. In the [Azure portal](https://portal.azure.com), navigate to the resource group that contains the resources.
252253
1. If you want to delete all the resources in the group, select **Delete resource group**.

articles/iot-hub-device-update/device-update-ubuntu-agent.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Azure Device Update for IoT Hub using the Ubuntu package agent
33
description: Perform an end-to-end package update using the Device Update Ubuntu Server 22.04 x64 package agent to update Azure IoT Edge.
44
author: eshashah
55
ms.author: eshashah
6-
ms.date: 12/09/2024
6+
ms.date: 12/17/2024
77
ms.topic: tutorial
88
ms.service: azure-iot-hub
99
ms.subservice: device-update
@@ -31,9 +31,9 @@ In this tutorial, you:
3131
## Prerequisites
3232

3333
- A [Device Update account and instance configured with an IoT hub](create-device-update-account.md).
34-
- An [Azure IoT Edge Device in the IoT hub with the connection string copied](../iot-edge/how-to-provision-single-device-linux-symmetric.md?view=iotedge-2020-11&preserve-view=true#view-registered-devices-and-retrieve-provisioning-information).
34+
- An [Azure IoT Edge device registered in the IoT hub with the connection string copied](../iot-edge/how-to-provision-single-device-linux-symmetric.md?view=iotedge-2020-11&preserve-view=true#view-registered-devices-and-retrieve-provisioning-information).
3535

36-
## Prepare the VM and device
36+
## Prepare the device
3737

3838
For convenience, this tutorial uses a [cloud-init](/azure/virtual-machines/linux/using-cloud-init) based [Azure Resource Manager (ARM) template](/azure/azure-resource-manager/templates/overview) to quickly set up an Ubuntu 22.04 LTS virtual machine (VM). The template installs both the IoT Edge runtime and the Device Update package agent, and automatically configures the device with provisioning information by using the IoT Edge device connection string you supply. Using the ARM template also avoids the need to start a secure shell (SSH) session to complete setup.
3939

@@ -125,15 +125,15 @@ Device Update uses groups to organize devices. Device Update automatically sorts
125125
126126
## Import the update
127127
128-
The *Tutorial_IoTEdge_PackageUpdate.zip* file has the required files for the tutorial. Download the file from the **Assets** section of the latest release on the [GitHub Device Update Releases page](https://github.com/Azure/iot-hub-device-update/releases), and unzip it.
129-
130-
The extracted *Tutorial_IoTEdge_PackageUpdate* folder contains the *sample-defender-iot-apt-manifest.json* sample APT manifest and its corresponding *sample-defender-iot--importManifest.json* import manifest.
128+
The *Tutorial_IoTEdge_PackageUpdate.zip* file has the required files for the tutorial.
131129
130+
1. Download the *Tutorial_IoTEdge_PackageUpdate.zip* file from the **Assets** section of the latest release on the [GitHub Device Update Releases page](https://github.com/Azure/iot-hub-device-update/releases).
131+
1. Unzip the file. The extracted *Tutorial_IoTEdge_PackageUpdate* folder contains the *sample-defender-iot-apt-manifest.json* sample APT manifest and its corresponding *sample-defender-iot--importManifest.json* import manifest.
132132
1. On the [Azure portal](https://portal.azure.com) IoT hub page for your Device Update instance, select **Device Management** > **Updates** from the left navigation.
133133
1. On the **Updates** page, select **Import a new update**.
134134
1. On the **Import update** page, select **Select from storage container**.
135-
1. On the **Storage accounts** page, select an existing storage account or create a new account by selecting **+ Storage account**.
136-
1. On the **Containers** page, select an existing container or create a new container by using **+ Container**. You use the container to stage the update files for import.
135+
1. On the **Storage accounts** page, select an existing storage account or create a new account by selecting **Storage account**.
136+
1. On the **Containers** page, select an existing container or create a new container by selecting **Container**. You use the container to stage the update files for import.
137137
138138
:::image type="content" source="media/import-update/storage-account-ppr.png" alt-text="Screenshot that shows Storage accounts and Containers.":::
139139

0 commit comments

Comments
 (0)