Skip to content

Commit fe2c462

Browse files
authored
Merge pull request #207637 from w-azure/winona-module-twins
Module twins - adjustments of wording
2 parents b268e43 + 8761bf5 commit fe2c462

6 files changed

+36
-51
lines changed

articles/iot-hub/iot-hub-c-c-module-twin-getstarted.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,19 @@ ms.custom: [amqp, mqtt]
1515

1616
[!INCLUDE [iot-hub-selector-module-twin-getstarted](../../includes/iot-hub-selector-module-twin-getstarted.md)]
1717

18-
> [!NOTE]
19-
> [Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provides visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system based devices or firmware devices, it allows for isolated configuration and conditions for each component.
18+
[Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provides visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system devices or firmware devices, it allows for isolated configuration and conditions for each component.
2019

2120
At the end of this article, you have two C apps:
2221

23-
* **CreateIdentities**, which creates a device identity, a module identity and associated security key to connect your device and module clients.
22+
* **CreateIdentities**: creates a device identity, a module identity and associated security key to connect your device and module clients.
2423

25-
* **UpdateModuleTwinReportedProperties**, which sends updated module twin reported properties to your IoT Hub.
24+
* **UpdateModuleTwinReportedProperties**: sends updated module twin, reported properties to your IoT Hub.
2625

2726
> [!NOTE]
28-
> For information about the Azure IoT SDKs that you can use to build both applications to run on devices, and your solution backend, see [Azure IoT SDKs](iot-hub-devguide-sdks.md).
27+
> See [Azure IoT SDKs](iot-hub-devguide-sdks.md) for more information about the SDK tools available to build both device and back-end apps.
2928
3029
## Prerequisites
3130

32-
* An active Azure account. (If you don't have an account, you can create an [Azure free account](https://azure.microsoft.com/pricing/free-trial/) in just a couple of minutes.)
33-
3431
* An IoT Hub. Create one with the [CLI](iot-hub-create-using-cli.md) or the [Azure portal](iot-hub-create-through-portal.md).
3532

3633
* The latest [Azure IoT C SDK](https://github.com/Azure/azure-iot-sdk-c).
@@ -43,7 +40,7 @@ At the end of this article, you have two C apps:
4340

4441
## Create a device identity and a module identity in IoT Hub
4542

46-
In this section, you create a C app that creates a device identity and a module identity in the identity registry in your IoT hub. A device or module cannot connect to IoT hub unless it has an entry in the identity registry. For more information, see the **Identity registry** section of the [IoT Hub developer guide](iot-hub-devguide-identity-registry.md). When you run this console app, it generates a unique ID and key for both device and module. Your device and module use these values to identify itself when it sends device-to-cloud messages to IoT Hub. The IDs are case-sensitive.
43+
In this section, you create a C app that creates a device identity and a module identity in the identity registry in your IoT hub. A device or module can't connect to IoT hub unless it has an entry in the identity registry. For more information, see [Understand the identity registry in your IoT hub](iot-hub-devguide-identity-registry.md). When you run this console app, it generates a unique ID and key for both device and module. Your device and module use these values to identify itself when it sends device-to-cloud messages to IoT Hub. The IDs are case-sensitive.
4744

4845
Add the following code to your C file:
4946

@@ -180,7 +177,7 @@ This app creates a device identity with ID **myFirstDevice** and a module identi
180177
181178
In this section, you create a C app on your simulated device that updates the module twin reported properties.
182179
183-
1. **Get your module connection string** -- now if you login to [Azure portal](https://portal.azure.com). Navigate to your IoT Hub and click IoT Devices. Find myFirstDevice, open it and you see myFirstModule was successfully created. Copy the module connection string. It is needed in the next step.
180+
1. **Get your module connection string** -- now if you sign in to [Azure portal](https://portal.azure.com). Navigate to your IoT Hub and click IoT Devices. Find myFirstDevice, open it and you see myFirstModule was successfully created. Copy the module connection string. It is needed in the next step.
184181
185182
![Azure portal module detail](./media/iot-hub-c-c-module-twin-getstarted/module-detail.png)
186183
@@ -382,4 +379,4 @@ int main(void)
382379
To continue getting started with IoT Hub and to explore other IoT scenarios, see:
383380

384381
* [Getting started with device management](iot-hub-node-node-device-management-get-started.md)
385-
* [Getting started with IoT Edge](../iot-edge/quickstart-linux.md)
382+
* [Getting started with IoT Edge](../iot-edge/quickstart-linux.md)

articles/iot-hub/iot-hub-csharp-csharp-module-twin-getstarted.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,21 @@ ms.custom: "amqp, devx-track-csharp"
1515

1616
[!INCLUDE [iot-hub-selector-module-twin-getstarted](../../includes/iot-hub-selector-module-twin-getstarted.md)]
1717

18-
> [!NOTE]
19-
> [Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provide visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system based devices or firmware devices, module identities and module twins allow for isolated configuration and conditions for each component.
18+
[Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provide visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system devices or firmware devices, module identities and module twins allow for isolated configuration and conditions for each component.
2019

2120
At the end of this article, you have two .NET console apps:
2221

23-
* **CreateIdentities**. This app creates a device identity, a module identity, and associated security key to connect your device and module clients.
22+
* **CreateIdentities**: creates a device identity, a module identity, and associated security key to connect your device and module clients.
2423

25-
* **UpdateModuleTwinReportedProperties**. This app sends updated module twin reported properties to your IoT hub.
24+
* **UpdateModuleTwinReportedProperties**: sends updated module twin, reported properties to your IoT hub.
2625

2726
> [!NOTE]
28-
> For information about the Azure IoT SDKs that you can use to build both applications to run on devices, and your solution back end, see [Azure IoT SDKs](iot-hub-devguide-sdks.md).
27+
> See [Azure IoT SDKs](iot-hub-devguide-sdks.md) for more information about the SDK tools available to build both device and back-end apps.
2928
3029
## Prerequisites
3130

3231
* Visual Studio.
3332

34-
* An active Azure account. If you don't have an account, you can create a [free account](https://azure.microsoft.com/pricing/free-trial/) in just a couple of minutes.
35-
3633
* An IoT Hub. Create one with the [CLI](iot-hub-create-using-cli.md) or the [Azure portal](iot-hub-create-through-portal.md).
3734

3835
## Get the IoT hub connection string
@@ -45,9 +42,9 @@ At the end of this article, you have two .NET console apps:
4542

4643
## Update the module twin using .NET device SDK
4744

48-
In this section, you create a .NET console app on your simulated device that updates the module twin reported properties.
45+
Now let's communicate to the cloud from your simulated device. Once a module identity is created, a module twin is implicitly created in IoT Hub. In this section, you create a .NET console app on your simulated device that updates the module twin reported properties.
4946

50-
Here's how to get your module connection string from the Azure portal. Sign in to the [Azure portal](https://portal.azure.com/). Navigate to your hub and select **Devices**. Find **myFirstDevice**. Select **myFirstDevice** to open it, and then select **myFirstModule** to open it. In **Module Identity Details**, copy the **Connection string (primary key)** to save it for the console app.
47+
To retrieve your module connection string, navigate to your [IoT hub](https://ms.portal.azure.com/#view/HubsExtension/BrowseResource/resourceType/Microsoft.Devices%2FIotHubs) then select **Devices**. Find and select **myFirstDevice** to open it and then select **myFirstModule** to open it. In **Module Identity Details**, copy the **Connection string (primary key)** and save it for the console app.
5148

5249
:::image type="content" source="./media/iot-hub-csharp-csharp-module-twin-getstarted/module-identity-detail.png" alt-text="Screenshot that shows the 'Module Identity Details' page." lightbox="./media/iot-hub-csharp-csharp-module-twin-getstarted/module-identity-detail.png":::
5350

@@ -143,7 +140,7 @@ Here's how to get your module connection string from the Azure portal. Sign in t
143140
}
144141
```
145142

146-
This code sample shows you how to retrieve the module twin and update reported properties with AMQP protocol. In public preview, we only support AMQP for module twin operations.
143+
Now you know how to retrieve the module twin and update reported properties with AMQP protocol.
147144

148145
1. Optionally, you can add these statements to the **Main** method to send an event to IoT Hub from your module. Place these lines below the `try catch` block.
149146

articles/iot-hub/iot-hub-node-node-module-twin-getstarted.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,23 @@ ms.custom: amqp, devx-track-js
1515

1616
[!INCLUDE [iot-hub-selector-module-twin-getstarted](../../includes/iot-hub-selector-module-twin-getstarted.md)]
1717

18-
> [!NOTE]
19-
> [Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provides visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system-based devices or firmware devices, it allows for isolated configuration and conditions for each component.
18+
[Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provides visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system devices or firmware devices, it allows for isolated configuration and conditions for each component.
2019

2120
At the end of this article, you have two Node.js apps:
2221

23-
* **CreateIdentities**, which creates a device identity, a module identity, and associated security keys to connect your device and module clients.
22+
* **CreateIdentities**: creates a device identity, a module identity, and associated security keys to connect your device and module clients.
2423

25-
* **UpdateModuleTwinReportedProperties**, which sends updated module twin reported properties to your IoT Hub.
24+
* **UpdateModuleTwinReportedProperties**: sends updated module twin, reported properties to your IoT Hub.
2625

2726
> [!NOTE]
28-
> For information about the Azure IoT SDKs that you can use to build both applications to run on devices, and your solution back end, see [Azure IoT SDKs](iot-hub-devguide-sdks.md).
27+
> See [Azure IoT SDKs](iot-hub-devguide-sdks.md) for more information about the SDK tools available to build both device and back-end apps.
2928
3029
## Prerequisites
3130

3231
* An IoT Hub. Create one with the [CLI](iot-hub-create-using-cli.md) or the [Azure portal](iot-hub-create-through-portal.md).
3332

3433
* Node.js version 10.0.x or later. [Prepare your development environment](https://github.com/Azure/azure-iot-sdk-node/tree/main/doc/node-devbox-setup.md) describes how to install Node.js for this article on either Windows or Linux.
3534

36-
* An active Azure account. (If you don't have an account, you can create a [free account](https://azure.microsoft.com/pricing/free-trial/) in just a couple of minutes.)
37-
3835
## Get the IoT hub connection string
3936

4037
[!INCLUDE [iot-hub-howto-module-twin-shared-access-policy-text](../../includes/iot-hub-howto-module-twin-shared-access-policy-text.md)]
@@ -43,7 +40,7 @@ At the end of this article, you have two Node.js apps:
4340

4441
## Create a device identity and a module identity in IoT Hub
4542

46-
In this section, you create a Node.js app that creates a device identity and a module identity in the identity registry in your IoT hub. A device or module cannot connect to IoT hub unless it has an entry in the identity registry. For more information, see the "Identity registry" section of the [IoT Hub developer guide](iot-hub-devguide-identity-registry.md). When you run this console app, it generates a unique ID and key for both device and module. Your device and module use these values to identify itself when it sends device-to-cloud messages to IoT Hub. The IDs are case-sensitive.
43+
In this section, you create a Node.js app that creates a device identity and a module identity in the identity registry in your IoT hub. A device or module can't connect to IoT hub unless it has an entry in the identity registry. For more information, see [Understand the identity registry in your IoT hub](iot-hub-devguide-identity-registry.md). When you run this console app, it generates a unique ID and key for both device and module. The ID and key are case-sensitive. Your device and module use these values to identify itself when it sends device-to-cloud messages to IoT Hub.
4744

4845
1. Create a directory to hold your code.
4946

articles/iot-hub/iot-hub-portal-csharp-module-twin-getstarted.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,21 @@ ms.custom: "amqp, devx-track-csharp"
1515

1616
[!INCLUDE [iot-hub-selector-module-twin-getstarted](../../includes/iot-hub-selector-module-twin-getstarted.md)]
1717

18-
> [!NOTE]
19-
> [Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provide visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system based devices or firmware devices, module identities and module twins allow for isolated configuration and conditions for each component.
20-
>
18+
[Module identities and module twins](iot-hub-devguide-module-twins.md) are similar to Azure IoT Hub device identity and device twin, but provide finer granularity. While Azure IoT Hub device identity and device twin enable the back-end application to configure a device and provide visibility on the device's conditions, a module identity and module twin provide these capabilities for individual components of a device. On capable devices with multiple components, such as operating system devices or firmware devices, module identities and module twins allow for isolated configuration and conditions for each component.
2119

22-
In this article, you will learn:
20+
In this article, you will learn how to:
2321

24-
* How to create a module identity in the portal.
22+
* Create a module identity in the portal.
2523

26-
* How to use a .NET device SDK to update the module twin from your device.
24+
* Use a .NET device SDK to update the module twin from your device.
2725

2826
> [!NOTE]
29-
> For information about the Azure IoT SDKs that you can use to build both applications to run on devices and your solution back end, see [Azure IoT SDKs](iot-hub-devguide-sdks.md).
30-
>
27+
> See [Azure IoT SDKs](iot-hub-devguide-sdks.md) for more information about the SDK tools available to build both device and back-end apps.
3128
3229
## Prerequisites
3330

3431
* Visual Studio.
3532

36-
* An active Azure account. If you don't have an account, you can create a [free account](https://azure.microsoft.com/pricing/free-trial/) in just a couple of minutes.
37-
3833
* An IoT Hub. Create one with the [CLI](iot-hub-create-using-cli.md) or the [Azure portal](iot-hub-create-through-portal.md).
3934

4035
* A registered device. Register one in the [Azure portal](iot-hub-create-through-portal.md#register-a-new-device-in-the-iot-hub).
@@ -57,11 +52,11 @@ Save the **Connection string (primary key)**. You use it in the next section to
5752

5853
## Update the module twin using .NET device SDK
5954

60-
You've successfully created the module identity in your IoT Hub. Let's try to communicate to the cloud from your simulated device. Once a module identity is created, a module twin is implicitly created in IoT Hub. In this section, you will create a .NET console app on your simulated device that updates the module twin reported properties.
55+
Now let's communicate to the cloud from your simulated device. Once a module identity is created, a module twin is implicitly created in IoT Hub. In this section, you will create a .NET console app on your simulated device that updates the module twin reported properties.
6156

6257
### Create a Visual Studio project
6358

64-
To create an app that updates the module twin reported properties, follow these steps:
59+
To create an app that updates the module twin, reported properties, follow these steps:
6560

6661
1. In Visual Studio, select **Create a new project**, then choose **Console App (.NET Framework)**, and select **Next**.
6762

@@ -73,13 +68,13 @@ To create an app that updates the module twin reported properties, follow these
7368

7469
### Install the latest Azure IoT Hub .NET device SDK
7570

76-
Module identity and module twin is in public preview. It's only available in the IoT Hub pre-release device SDKs. To install it, follow these steps:
71+
Module identity and module twin is only available in the IoT Hub pre-release device SDKs. To install it, follow these steps:
7772

7873
1. In Visual Studio, open **Tools** > **NuGet Package Manager** > **Manage NuGet Packages for Solution**.
7974

8075
1. Select **Browse**, and then select **Include prerelease**. Search for *Microsoft.Azure.Devices.Client*. Select the latest version and install.
8176

82-
:::image type="content" source="./media/iot-hub-csharp-csharp-module-twin-getstarted/install-client-sdk.png" alt-text="Screenshot showing how to install the Microsoft.Azure.Devices.Client.":::
77+
:::image type="content" source="./media/iot-hub-csharp-csharp-module-twin-getstarted/install-client-sdk.png" alt-text="Screenshot showing how to install the Microsoft.Azure.Devices.Client." lightbox="./media/iot-hub-csharp-csharp-module-twin-getstarted/install-client-sdk.png":::
8378

8479
Now you have access to all the module features.
8580

@@ -162,12 +157,12 @@ To create your app, follow these steps:
162157

163158
You can build and run this app by using **F5**.
164159

165-
This code sample shows you how to retrieve the module twin and update reported properties with AMQP protocol. In public preview, we only support AMQP for module twin operations.
160+
Now you know how to retrieve the module twin and update reported properties with AMQP protocol.
166161

167162
## Next steps
168163

169164
To continue getting started with IoT Hub and to explore other IoT scenarios, see:
170165

171-
* [Get started with IoT Hub module identity and module twin using .NET backup and .NET device](iot-hub-csharp-csharp-module-twin-getstarted.md)
166+
* [Getting started with device management](iot-hub-node-node-device-management-get-started.md)
172167

173168
* [Getting started with IoT Edge](../iot-edge/quickstart-linux.md)

0 commit comments

Comments
 (0)