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
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,28 +31,26 @@ In this tutorial, you'll learn how to:
31
31
32
32
## Prerequisites
33
33
34
-
If you haven't already done so, create a [Device Update account and instance](create-device-update-account.md) and configure an IoT hub.
35
-
Please note, this example requires an ethernet connection for the Raspberry Pi 3 B+ board.
34
+
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.
36
35
37
36
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.
38
37
39
-
## Create a device or module in IoT Hub and get a connection string
38
+
## Create a device in IoT Hub and get a connection string
40
39
41
40
Now, add the device to IoT Hub. From within IoT Hub, a connection string is generated for the device.
42
41
43
42
1. From the [Azure portal](https://portal.azure.com), navigate to your IoT hub.
44
43
1. On the left pane, select **Devices**. Then select **New**.
45
44
1. Under **Device ID**, enter a name for the device. Ensure that the **Autogenerate keys** checkbox is selected.
46
45
1. Select **Save**. On the **Devices** page, the device you created should be in the list.
47
-
1. Get the device connection string by using one of two options:
48
-
49
-
* Option 1: Use the Device Update agent with a module identity: On the same **Devices** page, select **Add Module Identity** at the top. Create a new Device Update module with the name **IoTHubDeviceUpdate**. Choose other options as they apply to your use case and then select **Save**. Select the newly created module. In the module view, select the **Copy** icon next to **Primary Connection String**.
50
-
* Option 2: Use the Device Update agent with the device identity: In the device view, select the **Copy** icon next to **Primary Connection String**.
51
-
46
+
1. Get the device connection string by navigating to the device view, select the **Copy** icon next to **Primary Connection String**.
52
47
1. Paste the copied characters somewhere for later use in the following steps:
53
48
54
49
**This copied string is your device connection string**.
55
50
51
+
> [!NOTE]
52
+
> 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)
53
+
56
54
## Set up Raspberry Pi
57
55
58
56
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.
@@ -101,9 +99,6 @@ Device Update for Azure IoT Hub software is subject to the following license ter
101
99
102
100
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.
103
101
104
-
## Prepare on-device configurations for Device Update for IoT Hub
105
-
106
-
Two configuration files must be on the device so that Device Update for IoT Hub configures properly. The first file is the `du-config.json` file, which must exist at `/adu/du-config.json`. The second file is the `du-diagnostics-config.json` file, which must exist at `/adu/du-diagnostics-config.json`.
107
102
## Configure the Device Update agent on Raspberry Pi
108
103
109
104
1. Make sure that Raspberry Pi 3 is connected to the network.
@@ -114,6 +109,7 @@ Two configuration files must be on the device so that Device Update for IoT Hub
114
109
```
115
110
116
111
1. The DU configuration files (du-config.json and du-diagnostics-config.json) must be on the device so that Device Update for IoT Hub configures properly.
112
+
117
113
1. To create or open the `du-config.json` file for editing by using:
118
114
119
115
```bash
@@ -151,6 +147,7 @@ Two configuration files must be on the device so that Device Update for IoT Hub
151
147
3. After you finish your changes, select `Ctrl+X` to exit the editor. Then enter `y` to save the changes.
152
148
153
149
1. Now you need to create the `du-diagnostics-config.json` file by using similar commands.
150
+
154
151
1. Start by creating or opening the `du-diagnostics-config.json` file for editing by using:
155
152
156
153
```bash
@@ -176,6 +173,7 @@ Two configuration files must be on the device so that Device Update for IoT Hub
176
173
"maxKilobytesToUploadPerLogPath":50
177
174
}
178
175
```
176
+
179
177
3. After you finish your changes, select `Ctrl+X` to exit the editor. Then enter `y` to save the changes.
180
178
181
179
1. Use the following command to show the files located in the `/adu/` directory. You should see both of your configuration files.du-diagnostics-config.json files for editing by using:
@@ -246,7 +244,7 @@ Two configuration files must be on the device so that Device Update for IoT Hub
246
244
247
245
*This screenshot shows the import step. File names might not match the ones used in the example.*
248
246
249
-
1. On the **Import update** page, review the files to be imported. Then select **Import update** to start the import process.
247
+
1. On the **Import update** page, review the files to be imported. Then select **Import update** to start the import process. For the tutorial, import the sample tutorial manifest and sample update (.swu file) and the sample A/B script downloaded earlier.
250
248
251
249
:::image type="content" source="media/import-update/import-start-2-ppr.png" alt-text="Screenshot that shows Import update." lightbox="media/import-update/import-start-2-ppr.png":::
0 commit comments