Skip to content

Commit 1ea21b2

Browse files
Learn Editor: Update device-update-tls-download.md
1 parent aa9cb5d commit 1ea21b2

File tree

2 files changed

+43
-3
lines changed

2 files changed

+43
-3
lines changed

articles/iot-hub-device-update/device-update-tls-download.md

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,44 @@ ms.topic: # Add the ms.topic value
1313
ms.date: 06/07/2024
1414
---
1515

16-
How to understand and use the Transport Layer Security (TLS) download feature in Device Update for IoT Hub (Preview)
16+
# How to understand and use the Transport Layer Security (TLS) download feature in Device Update for IoT Hub (Preview)
17+
18+
When a device downloads an update from the Device Update service, the connection between the Device Update service and the device is HTTP-based. If a TLS connection (HTTPS) between the DU service and the device is preferred, this can be enabled upon request.
19+
20+
>[!NOTE]
21+
>The TLS download feature is currently in [public preview](https://azure.microsoft.com/support/legal/preview-supplemental-terms/).
22+
23+
## How to enable the TLS download feature
24+
25+
Obtain your Azure Subscription ID and your Device Update for IoT Hub *account*, *instance* and *Azure region* information. Here's how to find that information:
26+
27+
- Azure Subscription ID:
28+
- See this article: [https://aka.ms/get-subscription-id](https://aka.ms/get-subscription-id)
29+
- Device Update for IoT Hub information:
30+
- Go to the [Azure portal](https://portal.azure.com/).
31+
- Search for "Device Update for IoT Hubs" and select the **Device Update for IoT Hubs** option.
32+
- Select your Device Update account. The *account name* is at the top of the screen.
33+
- Select the **Overview** view from the left-hand navigation pane. Look for the "Location" field (such as "West US 2"). This is your *Azure region*.
34+
- Under the **Instance Management** heading in the left-hand navigation bar, select **Instances**. You will see your *instance name*.
35+
- Once you have the information above, use [this link](https://nam.dcv.ms/dBgKOpqIL7) to submit the information. You will receive a reply when your Device Update instance has been enabled for the preview TLS download feature.
36+
37+
## Additional changes if using FreeRTOS
38+
39+
If you are using FreeRTOS, the [Azure IoT Middleware for FreeRTOS](https://github.com/Azure/azure-iot-middleware-freertos) and [FreeRTOS samples](https://github.com/Azure-Samples/iot-middleware-freertos-samples) available from Microsoft currently support HTTP URLs and will need to be modified for TLS (HTTPS) URLs:
40+
41+
The Device Update for IoT Hub implementation in the Azure IoT Middleware for FreeRTOS SDK and samples use the below libraries for downloading the binaries:
42+
[Azure_iot_http.h](https://github.com/Azure/azure-iot-middleware-freertos/blob/7759a42a1eab12818ea2a8f3f940847743968021/source/interface/azure_iot_http.h#L13), which depends on:
43+
44+
- [azure_iot_http_port.h](https://github.com/Azure/azure-iot-middleware-freertos/blob/7759a42a1eab12818ea2a8f3f940847743968021/ports/coreHTTP/azure_iot_http_port.h#L11)
45+
- [azure_iot_transport_interface.h](https://github.com/Azure/azure-iot-middleware-freertos/blob/7759a42a1eab12818ea2a8f3f940847743968021/source/interface/azure_iot_transport_interface.h#L5)
46+
47+
The azure_iot_http_port.h can be modified to leverage core http library for TLS - HTTPS support using the FreeRTOS example - [HTTP Demo (with TLS - Mutual Authentication) - FreeRTOS](https://www.freertos.org/http/http-demo-with-tls-mutual-authentication.html)
48+
49+
The Device Update for IoT Hub samples also have functions to parse the URL that will need to be revised: [iot-middleware-freertos-samples/demos/sample_azure_iot_adu/sample_azure_iot_adu.c at main - Azure-Samples/iot-middleware-freertos-samples (github.com)](https://github.com/Azure-Samples/iot-middleware-freertos-samples/blob/main/demos/sample_azure_iot_adu/sample_azure_iot_adu.c#L396).
50+
51+
Finally, you may also need to make changes to your own impementation, such as changing the HTTPS header buffer to manage the update URL format that your device will be receiving from Device Update.
52+
53+
## Next steps
54+
55+
[Troubleshoot common issues](troubleshoot-device-update.md)
56+

articles/iot-hub-device-update/toc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,11 @@ items:
106106
displayName: Azure CLI, az iot, az iot du
107107
- name: Use delta updates
108108
href: delta-updates.md
109+
- name: Use related files
110+
href: related-files.md
109111
- name: Use TLS downloads
110112
href: device-update-tls-download.md
111113
displayName: IoT, update, TLS, https
112-
- name: Use related files
113-
href: related-files.md
114114
- name: Configure private endpoints
115115
href: configure-private-endpoints.md
116116
displayName: Azure CLI, az iot, az iot du

0 commit comments

Comments
 (0)