Skip to content

Commit a7c3172

Browse files
authored
Merge pull request #233812 from KennedyDMSFT/US60536-1
Quickstart freshness
2 parents 733f64e + e1c5777 commit a7c3172

11 files changed

+124
-121
lines changed
-54.8 KB
Loading
11.2 KB
Loading
-59.3 KB
Loading
12 KB
Loading
-8.5 KB
Loading
12.3 KB
Loading

articles/iot-dps/quick-create-simulated-device-symm-key.md

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ title: Quickstart - Provision a simulated symmetric key device to Microsoft Azur
33
description: Learn how to provision a device that authenticates with a symmetric key in the Azure IoT Hub Device Provisioning Service (DPS)
44
author: kgremban
55
ms.author: kgremban
6-
ms.date: 09/29/2021
6+
ms.date: 04/06/2023
77
ms.topic: quickstart
88
ms.service: iot-dps
99
services: iot-dps
1010
manager: lizross
1111
ms.custom: mvc, mode-other
1212
zone_pivot_groups: iot-dps-set1
13-
#Customer intent: As a new IoT developer, I want to connect a device to an IoT Hub using the SDK, to learn how secure provisioning works with symmetric keys.
13+
#Customer intent: As a new IoT developer, I want to connect a device to an IoT hub using the SDK, to learn how secure provisioning works with symmetric keys.
1414
---
1515

1616
# Quickstart: Provision a simulated symmetric key device
1717

18-
In this quickstart, you'll create a simulated device on your Windows machine. The simulated device will be configured to use the [symmetric key attestation](concepts-symmetric-key-attestation.md) mechanism for authentication. After you've configured your device, you'll then provision it to your IoT hub using the Azure IoT Hub Device Provisioning Service.
18+
In this quickstart, you create a simulated device on your Windows machine. The simulated device is configured to use the [symmetric key attestation](concepts-symmetric-key-attestation.md) mechanism for authentication. After you've configured your device, you then provision it to your IoT hub using the Azure IoT Hub Device Provisioning Service.
1919

2020
If you're unfamiliar with the process of provisioning, review the [provisioning](about-iot-dps.md#provisioning-process) overview.
2121

22-
This quickstart demonstrates a solution for a Windows-based workstation. However, you can also perform the procedures on Linux. For a Linux example, see [Tutorial: provision for geolatency](how-to-provision-multitenant.md).
22+
This quickstart demonstrates a solution for a Windows-based workstation. However, you can also perform the procedures on Linux. For a Linux example, see [Tutorial: provision for geo latency](how-to-provision-multitenant.md).
2323

2424
## Prerequisites
2525

@@ -206,7 +206,7 @@ Once you create the individual enrollment, a **primary key** and **secondary key
206206

207207
1. Copy the value of the generated **Primary key**.
208208

209-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-device-enrollment-primary-key.png" alt-text="Copy the primary key of the device enrollment":::
209+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-device-enrollment-primary-key.png" alt-text="Screenshot showing the enrollment details, highlighting the Copy button for the primary key of the device enrollment":::
210210

211211
<a id="firstbootsequence"></a>
212212

@@ -232,7 +232,7 @@ To update and run the provisioning sample with your device information:
232232

233233
2. Copy the **ID Scope** value.
234234

235-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/extract-dps-endpoints.png" alt-text="Extract Device Provisioning Service endpoint information":::
235+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/extract-dps-endpoints.png" alt-text="Screenshot showing the overview of the Device Provisioning Service instance, highlighting the ID Scope value for the instance.":::
236236

237237
3. In Visual Studio, open the *azure_iot_sdks.sln* solution file that was generated by running CMake. The solution file should be in the following location:
238238

@@ -253,7 +253,7 @@ To update and run the provisioning sample with your device information:
253253
static const char* id_scope = "0ne00002193";
254254
```
255255
256-
6. Find the definition for the `main()` function in the same file. Make sure the `hsm_type` variable is set to `SECURE_DEVICE_TYPE_SYMMETRIC_KEY` as shown below:
256+
6. Find the definition for the `main()` function in the same file. Make sure the `hsm_type` variable is set to `SECURE_DEVICE_TYPE_SYMMETRIC_KEY` as shown in the following example:
257257
258258
```c
259259
SECURE_DEVICE_TYPE hsm_type;
@@ -319,15 +319,15 @@ To update and run the provisioning sample with your device information:
319319
320320
2. Copy the **ID Scope** value.
321321
322-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/extract-dps-endpoints.png" alt-text="Extract Device Provisioning Service endpoint information":::
322+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/extract-dps-endpoints.png" alt-text="Screenshot showing the overview of the Device Provisioning Service instance, highlighting the ID Scope value for the instance.":::
323323
324324
3. Open a command prompt and go to the *SymmetricKeySample* in the cloned sdk repository:
325325
326326
```cmd
327327
cd '.\azure-iot-sdk-csharp\provisioning\device\samples\how to guides\SymmetricKeySample\'
328328
```
329329
330-
4. In the *SymmetricKeySample* folder, open *Parameters.cs* in a text editor. This file shows the parameters that are supported by the sample. Only the first three required parameters are used in this article when running the sample. Review the code in this file. No changes are needed.
330+
4. In the *SymmetricKeySample* folder, open *Parameters.cs* in a text editor. This file shows the available parameters for the sample. Only the first three required parameters are used in this article when running the sample. Review the code in this file. No changes are needed.
331331
332332
| Parameter | Required | Description |
333333
| :-------------------------------- | :------- | :-------------- |
@@ -388,7 +388,7 @@ To update and run the provisioning sample with your device information:
388388
389389
2. Copy the **ID Scope** and **Global device endpoint** values.
390390
391-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-id-scope-and-global-device-endpoint.png" alt-text="Extract Device Provisioning Service endpoint information":::
391+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-id-scope-and-global-device-endpoint.png" alt-text="Screenshot showing the overview of the Device Provisioning Service instance, highlighting the global device endpoint and ID Scope values for the instance.":::
392392
393393
3. Open a command prompt for executing Node.js commands, and go to the following directory:
394394
@@ -402,7 +402,7 @@ To update and run the provisioning sample with your device information:
402402
provisioningClient.setProvisioningPayload({a: 'b'});
403403
```
404404
405-
You may comment out this code, as it is not needed with for this quick start. A custom payload would be required you wanted to use a custom allocation function to assign your device to an IoT Hub. For more information, see [Tutorial: Use custom allocation policies](tutorial-custom-allocation-policies.md).
405+
You may comment out this code, as it's not needed with for this quickstart. A custom payload would be required you wanted to use a custom allocation function to assign your device to an IoT hub. For more information, see [Tutorial: Use custom allocation policies](tutorial-custom-allocation-policies.md).
406406
407407
The `provisioningClient.register()` method attempts the registration of your device.
408408
@@ -444,18 +444,13 @@ To update and run the provisioning sample with your device information:
444444
7. You should now see something similar to the following output. A "Hello World" string is sent to the hub as a test message.
445445
446446
```output
447-
D:\azure-iot-samples-csharp\provisioning\Samples\device\SymmetricKeySample>dotnet run --s 0ne00000A0A --i symm-key-csharp-device-01 --p sbDDeEzRuEuGKag+kQKV+T1QGakRtHpsERLP0yPjwR93TrpEgEh/Y07CXstfha6dhIPWvdD1nRxK5T0KGKA+nQ==
448-
449-
Initializing the device provisioning client...
450-
Initialized for registration Id symm-key-csharp-device-01.
451-
Registering with the device provisioning service...
452-
Registration status: Assigned.
453-
Device csharp-device-01 registered to ExampleIoTHub.azure-devices.net.
454-
Creating symmetric key authentication for IoT Hub...
455-
Testing the provisioned device with IoT Hub...
456-
Sending a telemetry message...
457-
Finished.
458-
Enter any key to exit.
447+
D:\azure-iot-samples-csharp\provisioning\device\samples>node register_symkey.js
448+
registration succeeded
449+
assigned hub=ExampleIoTHub.azure-devices.net
450+
deviceId=nodejs-device-01
451+
payload=undefined
452+
Client connected
453+
send status: MessageEnqueued
459454
```
460455
461456
::: zone-end
@@ -481,7 +476,7 @@ To update and run the provisioning sample with your device information:
481476
482477
2. Copy the **ID Scope** and **Global device endpoint** values.
483478
484-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-id-scope-and-global-device-endpoint.png" alt-text="Extract Device Provisioning Service endpoint information":::
479+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-id-scope-and-global-device-endpoint.png" alt-text="Screenshot showing the overview of the Device Provisioning Service instance, highlighting the global device endpoint and ID Scope values for the instance.":::
485480
486481
3. Open a command prompt and go to the directory where the sample file, _provision_symmetric_key.py_, is located.
487482
@@ -578,9 +573,9 @@ To update and run the provisioning sample with your device information:
578573
579574
1. In the main menu of your Device Provisioning Service, select **Overview**.
580575
581-
2. Copy the **ID Scope** and **Global device endpoint** values. These are your `SCOPE_ID` and `GLOBAL_ENDPOINT` respectively.
576+
2. Copy the **ID Scope** and **Global device endpoint** values. These values are your `SCOPE_ID` and `GLOBAL_ENDPOINT` parameters, respectively.
582577
583-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-id-scope-and-global-device-endpoint.png" alt-text="Extract Device Provisioning Service endpoint information":::
578+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/copy-id-scope-and-global-device-endpoint.png" alt-text="Screenshot showing the overview of the Device Provisioning Service instance, highlighting the global device endpoint and ID Scope values for the instance.":::
584579
585580
3. Open the Java device sample code for editing. The full path to the device sample code is:
586581
@@ -650,36 +645,36 @@ To update and run the provisioning sample with your device information:
650645
651646
3. Select the IoT hub to which your device was assigned.
652647
653-
4. In the **Explorers** menu, select **IoT Devices**.
648+
4. In the **Device management** menu, select **Devices**.
654649
655-
5. If your device was provisioned successfully, the device ID should appear in the list, with **Status** set as *enabled*. If you don't see your device, select **Refresh** at the top of the page.
650+
5. If your device was provisioned successfully, the device ID should appear in the list, with **Status** set as *Enabled*. If you don't see your device, select **Refresh** at the top of the page.
656651
657652
:::zone pivot="programming-language-ansi-c"
658653
659-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration.png" alt-text="Device is registered with the IoT hub":::
654+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration.png" alt-text="Screenshot showing that the device is registered with the IoT hub and enabled for the C example.":::
660655
661656
::: zone-end
662657
:::zone pivot="programming-language-csharp"
663658
664-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-csharp.png" alt-text="CSharp device is registered with the IoT hub":::
659+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-csharp.png" alt-text="Screenshot showing that the device is registered with the IoT hub and enabled for the C# example.":::
665660
666661
::: zone-end
667662
668663
:::zone pivot="programming-language-nodejs"
669664
670-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-nodejs.png" alt-text="Node.js device is registered with the IoT hub":::
665+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-nodejs.png" alt-text="Screenshot showing that the device is registered with the IoT hub and enabled for the Node.js example.":::
671666
672667
::: zone-end
673668
674669
:::zone pivot="programming-language-python"
675670
676-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-python.png" alt-text="Python device is registered with the IoT hub":::
671+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-python.png" alt-text="Screenshot showing that the device is registered with the IoT hub and enabled for the Python example.":::
677672
678673
::: zone-end
679674
680675
::: zone pivot="programming-language-java"
681676
682-
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-java.png" alt-text="Java device is registered with the IoT hub":::
677+
:::image type="content" source="./media/quick-create-simulated-device-symm-key/hub-registration-java.png" alt-text="Screenshot showing that the device is registered with the IoT hub and enabled for the Java example.":::
683678
684679
::: zone-end
685680

0 commit comments

Comments
 (0)