Skip to content

Commit 2844551

Browse files
committed
in progress
1 parent 08c1ad5 commit 2844551

File tree

3 files changed

+167
-143
lines changed

3 files changed

+167
-143
lines changed

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

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,76 @@
11
---
2-
title: Device Update for IoT Hub tutorial using the Raspberry Pi 3 B+ reference Yocto image | Microsoft Docs
3-
description: Get started with Device Update for Azure IoT Hub by using the Raspberry Pi 3 B+ reference Yocto image.
2+
title: Azure Device Update for IoT Hub using a Raspberry Pi 3 Yocto image | Microsoft Docs
3+
description: Get started with Device Update for Azure IoT Hub by using the Raspberry Pi 3 B+ Yocto image.
44
author: eshashah
55
ms.author: eshashah
6-
ms.date: 3/8/2023
6+
ms.date: 11/25/2024
77
ms.topic: tutorial
88
ms.service: azure-iot-hub
99
ms.subservice: device-update
1010
---
1111

12-
# Tutorial: Device Update for Azure IoT Hub using the Raspberry Pi 3 B+ reference image
12+
# Tutorial: Azure Device Update for IoT Hub using a Raspberry Pi 3 image
1313

14-
Device Update for Azure IoT Hub supports image-based, package-based, and script-based updates.
14+
Device Update for Azure IoT Hub supports image-based, package-based, and script-based updates. This tutorial demonstrates an end-to-end Device Update for IoT Hub image-based update for a Raspberry Pi 3 B+ board.
1515

16-
Image updates provide a higher level of confidence in the end state of the device. It's typically easier to replicate the results of an image update between a preproduction environment and a production environment because it doesn't pose the same challenges as packages and their dependencies. Because of their atomic nature, you can also adopt an A/B failover model easily.
16+
Image updates provide a high level of confidence in the end state of the device, and don't pose the same package and dependency management challenges as package or script based updates. It's easier to replicate the results of an image update between a preproduction and production environment, or easily adopt an A/B failover model.
1717

18-
This tutorial walks you through the steps to complete an end-to-end image-based update by using Device Update for IoT Hub on a Raspberry Pi 3 B+ board.
19-
20-
In this tutorial, you'll learn how to:
18+
In this tutorial, you:
2119
> [!div class="checklist"]
2220
>
23-
> * Download an image.
24-
> * Add a tag to your IoT device.
25-
> * Import an update.
26-
> * Deploy an image update.
27-
> * Monitor the update deployment.
21+
> - Download an image.
22+
> - Assign a tag to your IoT device.
23+
> - Import an update.
24+
> - Deploy the image update.
25+
> - Monitor the update deployment.
2826
2927
> [!NOTE]
3028
> Image updates in this tutorial were validated on the Raspberry Pi B3 board.
3129
32-
3330
## Prerequisites
3431

35-
If you haven't already done so, create a [Device Update account and instance](create-device-update-account.md) and configure an IoT hub. This tutorial needs the device to be connected via ethernet connection.
32+
- A [Device Update account and instance configured with an IoT hub](create-device-update-account.md)
33+
- An IoT device connected via Ethernet
34+
35+
## Get the update files
36+
37+
1. The *Tutorial_RaspberryPi.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).
38+
39+
1. Unzip the file.
40+
41+
## Register the device and get the connection string
3642

37-
Download files in **Assets** on the [Device Update GitHub releases page](https://github.com/Azure/iot-hub-device-update/releases). The Tutorial_RaspberryPi.zip has all the required files for the tutorial.
43+
Add your device to the device registry in your IoT hub and get the connection string IoT Hub generates for the device.
44+
45+
1. In the [Azure portal](https://portal.azure.com), open the IoT hub page associated with your Device Update instance.
46+
1. In the navigation pane, select **Device management** > **Devices**.
47+
1. On the **Devices** page, select **Add Device**.
48+
1. Under **Device ID**, enter a name for the device. Ensure that **Autogenerate keys** checkbox is selected.
49+
1. Select **Save**. The device appears in the list on the **Devices** page.
50+
1. Get the device connection string by navigating to the device view, select the **Copy** icon next to **Primary Connection String**.
51+
1. Paste the copied characters somewhere for later use in the following steps:
3852

3953
## Create a device in IoT Hub and get a connection string
4054

41-
Now, add the device to IoT Hub. From within IoT Hub, a connection string is generated for the device.
55+
Now, add the device to IoT Hub. From within
4256

4357
1. From the [Azure portal](https://portal.azure.com), navigate to your IoT hub.
4458
1. On the left pane, select **Devices**. Then select **New**.
4559
1. Under **Device ID**, enter a name for the device. Ensure that the **Autogenerate keys** checkbox is selected.
46-
1. Select **Save**. On the **Devices** page, the device you created should be in the list.
47-
1. Get the device connection string by navigating to the device view, select the **Copy** icon next to **Primary Connection String**.
48-
1. Paste the copied characters somewhere for later use in the following steps:
60+
1. Select **Save**.
4961

5062
**This copied string is your device connection string**.
5163

5264
> [!NOTE]
53-
> This tutorial uses a device connection string to authenticate and connect with the IoT Hub for ease of set-up. For production scenarios, we recommend using module identity and leveraging AIS([IoT Identity Service](https://azure.github.io/iot-identity-service/)) to provision devices. [Learn more ](device-update-agent-provisioning.md)
65+
> For ease of setup, 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 [Learn more ](device-update-agent-provisioning.md).
5466
5567
## Set up Raspberry Pi
5668

57-
We provide base image and update files in **Assets** on the [Device Update GitHub releases page](https://github.com/Azure/iot-hub-device-update/releases). The Tutorial_RaspberryPi.zip has all the required files for the tutorial.
58-
The .wic file is the base image that you can flash on to a Raspberry Pi 3 B+ board. The swUpdate(.swu) file, custom swupdate script and manifest are the update files you would import through Device Update for IoT Hub.
59-
60-
This base image uses a Yocto build(based on 3.4.4 release) with:
61-
* SWUpdate which enables the dual partition update with DU
62-
* Device Update agent
69+
In the *Tutorial_RaspberryPi* folder, the *.wic* file is the base image that you can flash on to a Raspberry Pi 3 B+ board. The swUpdate(.swu) file, custom swupdate script and manifest are the update files you would import through Device Update for IoT Hub.
6370

64-
To learn more about the Yocto layers used, refer to [Device Update Yocto GitHub.](https://github.com/Azure/iot-hub-device-update-yocto).
71+
This base image uses a Yocto build based on the 3.4.4 release. The image has the Device Update agent and SWUpdate, which enables the dual partition update with Device Update. For more information about the Yocto layers used, see [Device Update Yocto GitHub.](https://github.com/Azure/iot-hub-device-update-yocto).
6572

66-
You can use your favorite OS flashing tool to install the Device Update base image (adu-base-image) on the SD card that will be used in the Raspberry Pi 3 B+ device. Below are the instructions for using bmaptool to flash to the SD card.
73+
You can use your favorite OS flashing tool to install the Device Update base image (adu-base-image) on the SD card you use in the Raspberry Pi 3 B+ device. The following instructions use bmaptool to flash to the SD card.
6774

6875
### Use bmaptool to flash the SD card
6976

@@ -100,7 +107,7 @@ Device Update for Azure IoT Hub software is subject to the following license ter
100107

101108
Read the license terms prior to using the agent. Your installation and use constitutes your acceptance of these terms. If you don't agree with the license terms, don't use the Device Update for IoT Hub agent.
102109

103-
## Configure the Device Update agent on Raspberry Pi
110+
### Configure the Device Update agent on Raspberry Pi
104111

105112
1. Make sure that Raspberry Pi 3 is connected to the network.
106113
1. SSH into the Raspberry Pi 3 by using the following command in the PowerShell window:

0 commit comments

Comments
 (0)