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
The Device Update Module agent can run alongside other system processes and [IoT Edge modules](https://docs.microsoft.com/azure/iot-edge/iot-edge-modules) that connect to your IoT Hub as part of the same logical device. This section describes how to provision the Device Update agent as a module identity.
13
-
Module Identity vs Device Identity: In IoT Hub, under each device identity, you can create up to 50 module identities. Each module identity implicitly generates a module twin. On the device side, the IoT Hub device SDKs enable you to create modules where each one opens an independent connection to IoT Hub. Module identity and module twin provide the similar capabilities as device identity and device twin but at a finer granularity. [Learn more about Module Identities in IoT Hub](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-module-twins)
14
-
15
-
Currently supported IoT device types with Device Update:
16
-
* Linux devices (IoT Edge and Non-IoT Edge devices):
17
-
+ Image A/B update:
18
-
- Yocto - ARM64 (reference image), extensible via open source to [build you own images](device-update-agent-provisioning.md#how-to-build-and-run-device-update-agent) for other architecture as needed.
19
-
- Ubuntu 18.04 simulator
20
-
+ Package Agent supported builds for the following platforms/architectures.
21
-
- Ubuntu Server 18.04 x64 Package Agent
22
-
- Debian 9
23
-
* Constrained devices:
24
-
+ AzureRTOS Device Update agent samples: [Device Update for Azure IoT Hub tutorial for Azure-Real-Time-Operating-System](device-update-azure-real-time-operating-system.md)
25
-
* Disconnected devices:
26
-
+ [Understand support for disconnected device update](connected-cache-disconnected-device-update.md)
27
-
28
-
## Pre-Requisite
29
-
If you are setting up the IoT device/IoT Edge device for [package based updates](https://docs.microsoft.com/azure/iot-hub-device-update/understand-device-update#support-for-a-wide-range-of-update-artifacts), add packages.microsoft.com to your machine’s repositories by following the steps below:
30
-
1. Log onto the machine or IoT device on which you intend to install the Device Update agent.
31
-
2. Open a Terminal window.
32
-
3. Install the repository configuration that matches your device’s operating system.
In IoT Hub, under each device identity, you can create up to 50 module identities. Each module identity implicitly generates a module twin. On the device side, the IoT Hub device SDKs enable you to create modules where each one opens an independent connection to IoT Hub. Module identity and module twin provide the similar capabilities as device identity and device twin but at a finer granularity. [Learn more about Module Identities in IoT Hub](https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-module-twins)
19
+
20
+
21
+
## Support for Device Update
22
+
23
+
The following IoT device types are currently supported with Device Update:
24
+
25
+
* Linux devices (IoT Edge and Non-IoT Edge devices):
26
+
* Image A/B update:
27
+
- Yocto - ARM64 (reference image), extensible via open source to [build you own images](device-update-agent-provisioning.md#how-to-build-and-run-device-update-agent) for other architecture as needed.
28
+
- Ubuntu 18.04 simulator
29
+
30
+
* Package Agent supported builds for the following platforms/architectures:
31
+
- Ubuntu Server 18.04 x64 Package Agent
32
+
- Debian 9
33
+
34
+
* Constrained devices:
35
+
* AzureRTOS Device Update agent samples: [Device Update for Azure IoT Hub tutorial for Azure-Real-Time-Operating-System](device-update-azure-real-time-operating-system.md)
36
+
37
+
* Disconnected devices:
38
+
*[Understand support for disconnected device update](connected-cache-disconnected-device-update.md)
39
+
40
+
41
+
## Prerequisites
42
+
43
+
If you're setting up the IoT device/IoT Edge device for [package based updates](https://docs.microsoft.com/azure/iot-hub-device-update/understand-device-update#support-for-a-wide-range-of-update-artifacts), add packages.microsoft.com to your machine’s repositories by following these steps:
44
+
45
+
1. Log onto the machine or IoT device on which you intend to install the Device Update agent.
46
+
47
+
1. Open a Terminal window.
48
+
49
+
1. Install the repository configuration that matches your device’s operating system.
## How to provision the Device Update agent as a Module Identity
69
+
49
70
This section describes how to provision the Device Update agent as a module identity on IoT Edge enabled devices, non-Edge IoT devices, and other IoT devices.
50
71
72
+
51
73
### On IoT Edge enabled devices
74
+
52
75
Follow these instructions to provision the Device Update agent on [IoT Edge enabled devices](https://docs.microsoft.com/azure/iot-edge).
53
-
1. Follow the instructions to [Install and provision the Azure IoT Edge runtime](https://docs.microsoft.com/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11&preserve-view=true).
54
-
2. Then install the Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases) and you are now ready to start the Device Update agent on your IoT Edge device.
76
+
77
+
1. Follow the instructions to [Install and provision the Azure IoT Edge runtime](https://docs.microsoft.com/azure/iot-edge/how-to-install-iot-edge?view=iotedge-2020-11&preserve-view=true).
78
+
79
+
1. Then install the Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases) and you are now ready to start the Device Update agent on your IoT Edge device.
80
+
55
81
56
82
### On non-Edge IoT Linux devices
83
+
57
84
Follow these instructions to provision the Device Update agent on your IoT Linux devices.
58
-
1. Install the IoT Identity Service and add the latest version to your IoT device.
59
-
* Log onto the machine or IoT device.
60
-
* Open a terminal window.
61
-
* Install the latest [IoT Identity Service](https://github.com/Azure/iot-identity-service/blob/main/docs/packaging.md#installing-and-configuring-the-package) on your IoT device using the command below.
62
-
```shell
63
-
sudo apt-get install aziot-identity-service
64
-
```
65
-
2. Provisioning IoT Identity service to get the IoT device information.
85
+
86
+
1. Install the IoT Identity Service and add the latest version to your IoT device.
87
+
1. Log onto the machine or IoT device.
88
+
1. Open a terminal window.
89
+
1. Install the latest [IoT Identity Service](https://github.com/Azure/iot-identity-service/blob/main/docs/packaging.md#installing-and-configuring-the-package) on your IoT device using this command:
90
+
91
+
```shell
92
+
sudo apt-get install aziot-identity-service
93
+
```
94
+
95
+
1. Provisioning IoT Identity service to get the IoT device information.
66
96
* Create a custom copy of the configuration template so we can add the provisioning information. In a terminal, enter the below command.
3. Next edit the configuration file to include the connection string of the device you wish to act as the provisioner for this device or machine. In a terminal, enter the below command.
72
-
```shell
73
-
sudo nano /etc/aziot/config.toml
74
-
```
102
+
1. Next edit the configuration file to include the connection string of the device you wish to act as the provisioner for this device or machine. In a terminal, enter the below command.
103
+
104
+
```shell
105
+
sudo nano /etc/aziot/config.toml
106
+
```
75
107
76
-
4. You should be greeted with a view like below:
77
-
:::image type="content" source="media/understand-device-update/config.png" alt-text="Diagram of IoT Identity Service config file." lightbox="media/understand-device-update/config.png":::
78
-
* In the same nano window, find the block with “Manual provisioning with connection string”.
79
-
* In the window, delete the “#” symbol ahead of 'provisioning'
80
-
* In the window, delete the “#” symbol ahead of 'source'
81
-
* In the window, delete the “#” symbol ahead of 'connection_string'
82
-
* In the window, delete the string within the quotes to the right of 'connection_string' and then add your connection string there
83
-
* Save your changes to the file with 'Ctrl+X' and then'Y' and hit the 'enter' key to save your changes.
84
-
5. Now apply and restart the IoT Identity service with the command below. You should now see a “Done!” printout that means you have successfully configured the IoT Identity Service. Note: The IoT Identity service registers module identities with IoT Hub using symmetric keys currently.
85
-
```shell
86
-
sudo aziotctl config apply
87
-
```
88
-
6. Finally install the Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases) and you are now ready to start the Device Update agent on your IoT Edge device.
108
+
1. You should see a message like the following example:
109
+
110
+
:::image type="content" source="media/understand-device-update/config.png" alt-text="Diagram of IoT Identity Service config file." lightbox="media/understand-device-update/config.png":::
111
+
112
+
1. In the same nano window, find the block with “Manual provisioning with connection string”.
113
+
1. In the window, delete the “#” symbol ahead of 'provisioning'
114
+
1. In the window, delete the “#” symbol ahead of 'source'
115
+
1. In the window, delete the “#” symbol ahead of 'connection_string'
116
+
1. In the window, delete the string within the quotes to the right of 'connection_string' and then add your connection string there
117
+
1. Save your changes to the file with 'Ctrl+X' and then'Y' and hit the 'enter' key to save your changes.
118
+
119
+
1. Now apply and restart the IoT Identity service with the command below. You should now see a “Done!” printout that means you have successfully configured the IoT Identity Service.
120
+
121
+
> [!Note]
122
+
> The IoT Identity service registers module identities with IoT Hub by using symmetric keys currently.
123
+
124
+
```shell
125
+
sudo aziotctl config apply
126
+
```
127
+
128
+
1. Finally install the Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases) and you are now ready to start the Device Update agent on your IoT Edge device.
129
+
89
130
90
131
### Other IoT devices
132
+
91
133
The Device Update agent can also be configured without the IoT Identity service for testing or on constrained devices. Follow the below steps to provision the Device Update agent using a connection string (from the Module or Device).
134
+
92
135
1. Install Device Update agent from [Artifacts](https://github.com/Azure/iot-hub-device-update/releases).
93
-
2. Log onto the machine or IoT Edge device/IoT device.
94
-
3. Open a terminal window.
95
-
4. Add the connection string to the [Device Update configuration file](device-update-configuration-file.md):
* You should see a window open with some text in it. Delete the entire string following 'connection_String=' the first-time you provision the Device Update agent on the IoT device. It is just place holder text.
100
-
* In the terminal, replace <your-connection-string> with the connection string of the device for your instance of Device Update agent (NOTE DO NOT ADD QUOTES AROUND THE CONNECTION STRING)
101
-
- connection_string=<your-connection-string>
102
-
* Enter and save.
103
-
5. Now you are now ready to start the Device Update agent on your IoT Edge device.
136
+
137
+
1. Log onto the machine or IoT Edge device/IoT device.
138
+
139
+
1. Open a terminal window.
140
+
141
+
1. Add the connection string to the [Device Update configuration file](device-update-configuration-file.md):
1. You should see a window open with some text in it. Delete the entire string following 'connection_String=' the first-time you provision the Device Update agent on the IoT device. It is just place holder text.
147
+
148
+
1. In the terminal, replace <your-connection-string> with the connection string of the device for your instance of Device Update agent.
149
+
150
+
> [!Important]
151
+
> Do not add quotes around the connection string.
152
+
153
+
- connection_string=<your-connection-string>
154
+
155
+
1. Enter and save.
156
+
157
+
1. Now you are now ready to start the Device Update agent on your IoT Edge device.
158
+
104
159
105
160
## How to start the Device Update Agent
161
+
106
162
This section describes how to start and verify the Device Update agent as a module identity running successfully on your IoT device.
163
+
107
164
1. Log into the machine or device that has the Device Update agent installed.
108
-
2. Open a Terminal window, and enter the command below.
109
-
```shell
110
-
sudo systemctl restart adu-agent
111
-
```
112
-
3. You can check the status of the agent using the command below. If you see any issues, refer to this [troubleshooting guide](troubleshoot-device-update.md).
113
-
```shell
114
-
sudo systemctl status adu-agent
115
-
```
116
-
4. You should see status OK.
117
-
5. On the IoT Hub portal, go to IoT device or IoT Edge devices to find the device that you configured with Device Update agent. There you will see the Device Update agent running as a module, For example:
1. Open a Terminal window, and enter the command below.
167
+
```shell
168
+
sudo systemctl restart adu-agent
169
+
```
170
+
171
+
1. You can check the status of the agent using the command below. If you see any issues, refer to this [troubleshooting guide](troubleshoot-device-update.md).
172
+
```shell
173
+
sudo systemctl status adu-agent
174
+
```
175
+
176
+
You should see status OK.
177
+
178
+
1. On the IoT Hub portal, go to IoT device or IoT Edge devices to find the device that you configured with Device Update agent. There you will see the Device Update agent running as a module. For example:
You can also build and modify your own customer Device Update agent.
122
186
123
187
Follow the instructions to [build](https://github.com/Azure/iot-hub-device-update/blob/main/docs/agent-reference/how-to-build-agent-code.md) the Device Update Agent
@@ -129,19 +193,21 @@ the agent.
129
193
Now, make the changes needed to incorporate the agent into your image. Look at how to
130
194
[modify](https://github.com/Azure/iot-hub-device-update/blob/main/docs/agent-reference/how-to-modify-the-agent-code.md) the Device Update Agent for guidance.
131
195
132
-
## Troubleshooting Guide
196
+
197
+
## Troubleshooting guide
133
198
134
199
If you run into issues, review the Device Update for IoT Hub [Troubleshooting Guide](troubleshoot-device-update.md) to help unblock any possible issues and collect necessary information to provide to Microsoft.
135
200
136
-
## Next Steps
137
201
138
-
Use below pre-built images and binaries for an easy demonstration of Device Update for IoT Hub.
202
+
## Next steps
203
+
204
+
You can use the following pre-built images and binaries for a simple demonstration of Device Update for IoT Hub:
139
205
140
-
[Image Update: Getting Started with Raspberry Pi 3 B+ Reference Yocto Image](device-update-raspberry-pi.md) extensible via open source to build you own images for other architecture as needed.
206
+
- [Image Update: Getting Started with Raspberry Pi 3 B+ Reference Yocto Image](device-update-raspberry-pi.md) extensible via open source to build you own images for other architecture as needed.
141
207
142
-
[Getting Started Using Ubuntu (18.04 x64) Simulator Reference Agent](device-update-simulator.md)
208
+
- [Getting Started Using Ubuntu (18.04 x64) Simulator Reference Agent](device-update-simulator.md)
143
209
144
-
[Package Update:Getting Started using Ubuntu Server 18.04 x64 Package agent](device-update-ubuntu-agent.md)
210
+
- [Package Update:Getting Started using Ubuntu Server 18.04 x64 Package agent](device-update-ubuntu-agent.md)
145
211
146
-
[Device Update for Azure IoT Hub tutorial for Azure-Real-Time-Operating-System](device-update-azure-real-time-operating-system.md)
212
+
- [Device Update for Azure IoT Hub tutorial for Azure-Real-Time-Operating-System](device-update-azure-real-time-operating-system.md)
0 commit comments