Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
JerryYangKai committed Sep 25, 2019
1 parent f9ee7b9 commit 1ff11a1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions Device/DevKitDPS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
static const char* Global_Device_Endpoint = "[Global_Device_Endpoint]";
static const char* ID_Scope = "[ID_Scope]";

// Input your preferrred deviceId and only alphanumeric, lowercase, and hyphen are supported with maximum 128 characters long.
static const char* deviceId = "";
// Input your preferrred registrationId and only alphanumeric, lowercase, and hyphen are supported with maximum 128 characters long.
static const char* registrationId = "[registrationId]";

// Indicate whether WiFi is ready
static bool hasWifi = false;
Expand Down Expand Up @@ -121,7 +121,7 @@ void setup() {
Screen.print(3, " > DPS");

// Transfer control to firmware
if(DevkitDPSClientStart(Global_Device_Endpoint, ID_Scope, deviceId))
if(DevkitDPSClientStart(Global_Device_Endpoint, ID_Scope, registrationId))
{
Screen.print(2, "DPS connected!\r\n");
}
Expand Down Expand Up @@ -161,4 +161,4 @@ void loop()
DevKitMQTTClient_Check();
}
delay(10);
}
}
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Find **DevKit DPS** and click **Open Sample** button. A new VS Code window with
![DPS Global Endpoint and ID Scope](media/devkit-dps/copy-endpoint.png)

2. Open **DevKitDPS.ino**, Find and replace `[Global Device Endpoint]` and `[ID Scope]` with the values you just note down.
![DPS Global Endpoint and ID Scope](media/devkit-dps/paste-endpoint-deviceid.png)
![DPS Global Endpoint and ID Scope](media/devkit-dps/paste-endpoint.png)

## Save Unique Device Secret on STSAFE security chip

Expand All @@ -100,11 +100,11 @@ Here you may need to close [serial monitor](https://github.com/microsoft/vscode-

## Build and upload the device code

1. Open **DevKitDPS.ino** and find **deviceId**, give a new value.
1. Open **DevKitDPS.ino** and find **registrationId**, give a new value.

The Device ID has to use alphanumeric, lowercase, and hyphen combinations only with maximum 128 characters long. See [Manage device enrollments with Azure portal](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-manage-enrollments) for more details.
The Registration ID has to use alphanumeric, lowercase, and hyphen combinations only with maximum 128 characters long. See [Manage device enrollments with Azure portal](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-manage-enrollments) for more details.

> You can leave the **deviceId** as blank, the application will generate one for you based on the MAC address and firmware version. If you want to customized it,
> You can leave the **registrationId** as blank, the application will generate one for you based on the MAC address and firmware version. If you want to customized it,
2. Open the command palette and select **Azure IoT Device Workbench: Upload Device Code**.
![IoT Device Workbench: Device - > Upload](media/iot-workbench-device-upload.png)
Expand All @@ -114,18 +114,18 @@ Here you may need to close [serial monitor](https://github.com/microsoft/vscode-

4. The DevKit reboots and starts running the code.

5. If you leave the **deviceId** as blank, please note down **DevKit MAC Address** and **DevKit Firmware Version** value from serial monitor.
5. If you leave the **registrationId** as blank, please note down **DevKit MAC Address** and **DevKit Firmware Version** value from serial monitor.
![Firmware version](media/devkit-dps/copy-mac-address.png)

## Generate X.509 certificate

Open integrated terminal in Visual Studio Code and run **dps_cert_gen in tool folder**. Input information just noted down.

1. Specified the **deviceId**
1. Specified the **registrationId**

![Generate X.509 certificate](media/devkit-dps/generate-cert-2.png)

2. Not specified the **deviceId**
2. Not specified the **registrationId**

![Generate X.509 certificate](media/devkit-dps/generate-cert-1.png)

Expand Down Expand Up @@ -179,4 +179,4 @@ Advance to the other tutorials to learn:
- [Manage device enrollments](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-manage-enrollments)
- [Revoke device access](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-revoke-device-access-portal)
- [Use HSM with SDK](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-revoke-device-access-portal)
- [Control access to Provisioning Service](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-control-access)
- [Control access to Provisioning Service](https://docs.microsoft.com/en-us/azure/iot-dps/how-to-control-access)
Binary file removed media/devkit-dps/paste-endpoint-deviceid.png
Binary file not shown.
Binary file added media/devkit-dps/paste-endpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1ff11a1

Please sign in to comment.