Changes

no edit summary
Line 168: Line 168:     
====DPS Symmetric key mechanism====
 
====DPS Symmetric key mechanism====
Symmetric key mechanism is a more basic one. To configure it, firstly head back to Azure portal your DPS service page and create new enrollment group with Symmetric key attestation mechanism.
+
The Symmetric key mechanism configuration is more straightforward. To configure it, first, go back to the Azure portal, navigate to your DPS service page, and create a new enrollment group with the Symmetric key attestation mechanism.
    
[[File:Azure RutOSconf 13.png|border|class=tlt-border]]
 
[[File:Azure RutOSconf 13.png|border|class=tlt-border]]
   −
Inspecting the newly created enrollment group will reveal some keys. The primary key will be used to derive each individual device indentities. This can be done with simple script, which is available on the following Microsoft guide: https://learn.microsoft.com/en-us/azure/iot-dps/how-to-legacy-device-symm-key?tabs=linux&amp%3Bpivots=programming-language-ansi-c&pivots=programming-language-ansi-c#derive-a-device-key
+
Inspecting the newly created enrollment group will reveal some keys. The primary key will be used to derive each individual device identity. This can be done using a simple script, which is available in the following Microsoft guide.: https://learn.microsoft.com/en-us/azure/iot-dps/how-to-legacy-device-symm-key?tabs=linux&amp%3Bpivots=programming-language-ansi-c&pivots=programming-language-ansi-c#derive-a-device-key
   −
In the script, you will see couple important variables - KEY and REG_ID. In the key field, we must specify primary key, which we take from new created enrollment group.
+
In the script, you will notice a couple of important variables: KEY and REG_ID. In the KEY field, you must specify the primary key, which can be obtained from the newly created enrollment group.
    
[[File:Azure RutOSconf 14.1.png|border|class=tlt-border]]
 
[[File:Azure RutOSconf 14.1.png|border|class=tlt-border]]
 +
 +
In the REG_ID field, you can specify any name you want. Upon executing the script, a shared access key will be created. Please copy this key, as we will need it in the following steps.
 +
 +
[[File:Azure_RutOSconf_15.png|border|class=tlt-border]]
 +
 +
After executing the script, go back to the RUT device Services -> Cloud Solutions -> Azure IoT Hub configurations page and add a new instance. In the configuration window, select DPS connection type and Symmetric Key connection type.
 +
 +
<ul>
 +
<li> In the "ID scope" field, specify your Azure DPS service ID. </li>
 +
<li> In the "Registration ID" field, enter the "REG_ID" value you specified in the script. For example, "wiki-newly-generated-device". </li>
 +
<li>In the "Symmetric key" field, enter the "SharedAccessKey" obtained from the script execution.  </li>
 +
</ul>
 +
If you are following this guide, your configuration window should look similar to the screenshot below.
 +
[[File:Azure_RutOSconf_16.png|border|class=tlt-border]]
 +
Don't forget to press the Save & Apply button! A few seconds after saving the configuration, you should be able to observe that the device successfully connects to Azure.
 +
[[File:Azure_RutOSconf_17.png|border|class=tlt-border]]
 +
Moreover, we can return to the IoT Hub services in the Azure portal and check the device list. There, we will see that the DPS service has created a new device identity, named the same as what we specified in the "REG_ID" field in the script earlier.
 +
[[File:Azure_RutOSconf_18.png|border|class=tlt-border]]
 +
If you see that the connection is successful on the router WebUI page and the newly created device appears in the Azure IoT Hub device list, it means that you have configured everything correctly.
    
</ul>
 
</ul>