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
+69-73Lines changed: 69 additions & 73 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -107,97 +107,94 @@ Two configuration files must be on the device so that Device Update for IoT Hub
107
107
## Configure the Device Update agent on Raspberry Pi
108
108
109
109
1. Make sure that Raspberry Pi 3 is connected to the network.
110
-
1.Follow these instructions to add the configuration details:
110
+
1.SSH into the Raspberry Pi 3 by using the following command in the PowerShell window:
111
111
112
-
1. First, SSH in to the machine by using the following command in the PowerShell window:
113
-
114
-
```shell
115
-
ssh raspberrypi3 -l root
116
-
```
112
+
```shell
113
+
ssh raspberrypi3 -l root
114
+
```
117
115
118
-
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.
119
-
To create or open the `du-config.json` file for editing by using:
116
+
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.
117
+
1. To create or open the `du-config.json` file for editing by using:
120
118
121
119
```bash
122
-
nano /adu/du-config.json
120
+
nano /adu/du-config.json
123
121
```
124
122
125
-
1. After you run the command, you should see an open editor with the file. If you've never created the file, it will be empty. Now copy the below du-config.json contents, and substitute the configurations required for your device. Then replace the example connection string with the one for the device you created in the preceding steps.
2. After you run the command, you should see an open editor with the file. If you've never created the file, it will be empty. Now copy the below du-config.json contents, and substitute the configurations required for your device. Then replace the example connection string with the one for the device you created in the preceding steps.
1. After you finish your changes, select `Ctrl+X` to exit the editor. Then enter `y` to save the changes.
155
-
156
-
1. Now you need to create the `du-diagnostics-config.json` file by using similar commands. Start by creating or opening the `du-diagnostics-config.json` file for editing by using:
151
+
3. After you finish your changes, select `Ctrl+X` to exit the editor. Then enter `y` to save the changes.
152
+
153
+
1. Now you need to create the `du-diagnostics-config.json` file by using similar commands.
154
+
1. Start by creating or opening the `du-diagnostics-config.json` file for editing by using:
157
155
158
156
```bash
159
-
nano /adu/du-diagnostics-config.json
157
+
nano /adu/du-diagnostics-config.json
160
158
```
161
159
162
-
1. Copy the du-diagnostics-config.json contents provided below, and substitute any configurations that differ from the default build. The example du-diagnostics-config.json file represents the default log locations for Device Update for IoT Hub. You only need to change these default values if your implementation differs.
160
+
2. Copy the du-diagnostics-config.json contents provided below, and substitute any configurations that differ from the default build. The example du-diagnostics-config.json file represents the default log locations for Device Update for IoT Hub. You only need to change these default values if your implementation differs.
163
161
164
162
### du-diagnostics-config.json
165
163
166
-
```JSON
167
-
{
168
-
"logComponents":[
169
-
{
170
-
"componentName":"adu",
171
-
"logPath":"/adu/logs/"
172
-
},
173
-
{
174
-
"componentName":"do",
175
-
"logPath":"/var/log/deliveryoptimization-agent/"
176
-
}
177
-
],
178
-
"maxKilobytesToUploadPerLogPath":50
179
-
}
180
-
```
181
-
182
-
183
-
3. After you finish your changes, select `Ctrl+X` to exit the editor. Then enter `y` to save the changes.
184
-
4. 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:
185
-
186
-
```bash
187
-
ls -la /adu/
188
-
```
164
+
```JSON
165
+
{
166
+
"logComponents":[
167
+
{
168
+
"componentName":"adu",
169
+
"logPath":"/adu/logs/"
170
+
},
171
+
{
172
+
"componentName":"do",
173
+
"logPath":"/var/log/deliveryoptimization-agent/"
174
+
}
175
+
],
176
+
"maxKilobytesToUploadPerLogPath":50
177
+
}
178
+
```
179
+
3. After you finish your changes, select `Ctrl+X` to exit the editor. Then enter `y` to save the changes.
180
+
181
+
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:
182
+
183
+
```bash
184
+
ls -la /adu/
185
+
```
189
186
190
187
1. Restart the Device Update system daemon to make sure that the configurations were applied. Use the following command within the terminal logged in to the `raspberrypi`:
191
188
192
-
```bash
193
-
systemctl start deviceupdate-agent
194
-
```
189
+
```bash
190
+
systemctl start deviceupdate-agent
191
+
```
195
192
196
193
1. Check that the agent is live by using the following command:
197
194
198
-
```bash
199
-
systemctl status deviceupdate-agent
200
-
```
195
+
```bash
196
+
systemctl status deviceupdate-agent
197
+
```
201
198
202
199
You should see the status appear as alive and green.
203
200
@@ -213,9 +210,8 @@ Two configuration files must be on the device so that Device Update for IoT Hub
213
210
1. The base and update image files have a version number in the file name.
0 commit comments