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: articles/iot-hub-device-update/device-update-raspberry-pi.md
+28-22Lines changed: 28 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Azure Device Update for IoT Hub using a Raspberry Pi image
3
3
description: Do an end-to-end image-based Azure Device Update for IoT Hub update using a Raspberry Pi 3 B+ Yocto image.
4
4
author: eshashah
5
5
ms.author: eshashah
6
-
ms.date: 12/09/2024
6
+
ms.date: 12/17/2024
7
7
ms.topic: tutorial
8
8
ms.service: azure-iot-hub
9
9
ms.subservice: device-update
@@ -47,7 +47,7 @@ Add your device to the device registry in your IoT hub and get the connection st
47
47
> [!NOTE]
48
48
> 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).
49
49
50
-
## Get the update files and flash the Raspberry Pi board
50
+
## Set up Raspberry Pi
51
51
52
52
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.
53
53
@@ -61,6 +61,14 @@ The update files you import through Device Update are:
61
61
62
62
### Use bmaptool to flash the SD card
63
63
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)
>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
+
64
72
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.
65
73
66
74
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
91
99
>[!TIP]
92
100
>For faster flashing, you can download the bimap file and the image file and put them in the same directory.
93
101
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)
>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
103
103
104
104
1. Make sure that the Raspberry Pi is connected to the network.
105
105
106
106
1. Secure shell (SSH) into the Raspberry Pi by using the following command in a PowerShell window:
107
107
108
108
```shell
109
-
ssh raspberrypi3 -l root
109
+
ssh raspberrypi3 -l root
110
110
```
111
111
112
112
### Create the Device Update configuration files
@@ -116,7 +116,7 @@ The Device Update *du-config.json* and *du-diagnostics-config.json* configuratio
116
116
1. To create the *du-config.json* file or open it for editing, run the following command:
117
117
118
118
```bash
119
-
nano /adu/du-config.json
119
+
nano /adu/du-config.json
120
120
```
121
121
122
122
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
150
150
1. Create the *du-diagnostics-config.json* file by using similar commands. Create and open the file:
151
151
152
152
```bash
153
-
nano /adu/du-diagnostics-config.json
153
+
nano /adu/du-diagnostics-config.json
154
154
```
155
155
156
156
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
176
176
1. Use the following command to show the files located in the */adu/* directory. You should see both configuration files.
177
177
178
178
```bash
179
-
ls -la /adu/
179
+
ls -la /adu/
180
180
```
181
181
182
182
1. Use the following command to restart the Device Update system daemon and ensure configurations are applied.
183
183
184
184
```bash
185
-
systemctl start deviceupdate-agent
185
+
systemctl start deviceupdate-agent
186
186
```
187
187
188
188
1. Check that the agent is live by running the following command:
189
189
190
190
```bash
191
-
systemctl status deviceupdate-agent
191
+
systemctl status deviceupdate-agent
192
192
```
193
193
194
194
Status should appear as alive and green.
195
195
196
196
## Connect to the device in IoT Hub and add a group tag
197
197
198
198
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.
200
200
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.
202
202
203
203
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.
204
204
@@ -227,15 +227,21 @@ Device Update automatically organizes devices into groups based on their assigne
227
227
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.
228
228
1. On the **Updates** page, select **Import a new update**.
229
229
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.
232
232
233
233
:::image type="content" source="media/import-update/storage-account-ppr.png" alt-text="Screenshot that shows Storage accounts and Containers.":::
234
234
235
235
> [!TIP]
236
236
> 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.
237
237
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:
Copy file name to clipboardExpand all lines: articles/iot-hub-device-update/device-update-simulator.md
+18-17Lines changed: 18 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,9 @@
1
1
---
2
2
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.
4
4
author: kgremban
5
5
ms.author: kgremban
6
-
ms.date: 12/09/2024
6
+
ms.date: 12/17/2024
7
7
ms.topic: tutorial
8
8
ms.service: azure-iot-hub
9
9
ms.subservice: device-update
@@ -22,17 +22,16 @@ In this tutorial, you:
22
22
> - Download and install an image update.
23
23
> - Import the image update.
24
24
> - Deploy the image update.
25
-
> - View update deployment history.
25
+
> - View the update deployment history.
26
26
27
27
## Prerequisites
28
28
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
31
30
- A [Device Update account and instance configured with an IoT hub](create-device-update-account.md)
32
31
33
32
## Register and configure a device and module
34
33
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.
36
35
37
36
1. In the [Azure portal](https://portal.azure.com), open the IoT hub page associated with your Device Update instance.
38
37
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
63
62
64
63
```json
65
64
"tags": {
66
-
"DeviceUpdateGroup": "simulator-tutorial"
65
+
"DeviceUpdateGroup": "DU-simulator-tutorial"
67
66
},
68
67
```
69
68
70
69
1. Select **Save**. The portal reformats the module twin to incorporate the tag into the JSON structure.
71
70
72
71
## Install and configure the Device Update agent
73
72
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.
75
77
76
78
1. Add the Microsoft package repository, and then add the Microsoft package signing key to your list of trusted keys.
77
79
@@ -131,9 +133,6 @@ The Device Update agent runs on every device that Device Update manages. In this
131
133
132
134
1. Press **Ctrl**+**X** to exit the editor, and enter *y* to save your changes.
133
135
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
-
137
136
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.
138
137
139
138
```bash
@@ -142,7 +141,7 @@ The Device Update agent runs on every device that Device Update manages. In this
142
141
143
142
### Get the simulator files
144
143
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.
146
145
147
146
You can use `wget` to download the ZIP file. Replace `<release_version>` with the latest release, for example `1.0.0`.
148
147
@@ -180,19 +179,21 @@ The Device Update agent runs on every device that Device Update manages. In this
180
179
181
180
## Import the update
182
181
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.
184
185
185
186
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.
186
187
1. In the navigation pane, select **Device Management** > **Updates**.
187
188
1. On the **Updates** page, select **Import a new update**.
188
189
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.
191
192
192
193
> [!NOTE]
193
194
> 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.
194
195
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**.
196
197
197
198
1. Select the checkboxes by both files and then select **Select** to return to the **Import update** page.
198
199
@@ -246,7 +247,7 @@ You should see the device group that contains the simulated device you set up in
246
247
247
248
## Clean up resources
248
249
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.
250
251
251
252
1. In the [Azure portal](https://portal.azure.com), navigate to the resource group that contains the resources.
252
253
1. If you want to delete all the resources in the group, select **Delete resource group**.
Copy file name to clipboardExpand all lines: articles/iot-hub-device-update/device-update-ubuntu-agent.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Azure Device Update for IoT Hub using the Ubuntu package agent
3
3
description: Perform an end-to-end package update using the Device Update Ubuntu Server 22.04 x64 package agent to update Azure IoT Edge.
4
4
author: eshashah
5
5
ms.author: eshashah
6
-
ms.date: 12/09/2024
6
+
ms.date: 12/17/2024
7
7
ms.topic: tutorial
8
8
ms.service: azure-iot-hub
9
9
ms.subservice: device-update
@@ -31,9 +31,9 @@ In this tutorial, you:
31
31
## Prerequisites
32
32
33
33
- 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).
35
35
36
-
## Prepare the VM and device
36
+
## Prepare the device
37
37
38
38
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.
39
39
@@ -125,15 +125,15 @@ Device Update uses groups to organize devices. Device Update automatically sorts
125
125
126
126
## Import the update
127
127
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.
131
129
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.
132
132
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.
133
133
1. On the **Updates** page, select**Import a new update**.
134
134
1. On the **Import update** page, select**Select from storage container**.
135
-
1. On the **Storage accounts** page, selectan existing storage account or create a new account by selecting **+ Storage account**.
136
-
1. On the **Containers** page, selectan 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, selectan existing storage account or create a new account by selecting **Storage account**.
136
+
1. On the **Containers** page, selectan existing container or create a new container by selecting**Container**. You use the container to stage the update files for import.
137
137
138
138
:::image type="content" source="media/import-update/storage-account-ppr.png" alt-text="Screenshot that shows Storage accounts and Containers.":::
0 commit comments