You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this quickstart, you use the [Vcpkg](https://github.com/microsoft/vcpkg) library manager to install the Azure IoT C device SDK in your development environment.
97
+
98
+
Open a shell. Execute the following command to install Vcpkg:
You should expect this operation to take several minutes to complete.
109
+
94
110
## Author your model
95
111
96
112
In this quickstart, you use an existing sample device capability model and associated interfaces.
@@ -135,7 +151,7 @@ Now that you have a DCM and its associated interfaces, you can generate the devi
135
151
136
152
1. Choose **CMake Project on Linux** as your project template.
137
153
138
-
1. Choose **Via Source Code** as the way to include the device SDK.
154
+
1. Choose **Via Vcpkg** as the way to include the device SDK.
139
155
140
156
1. A new folder called **sample_device** is created in the same location as the DCM file, and in it are the generated device code stub files. VS Code opens a new window to display these.
@@ -144,13 +160,6 @@ Now that you have a DCM and its associated interfaces, you can generate the devi
144
160
145
161
You use the device SDK source code to build the generated device code stub. The application you build simulates a device that connects to an IoT hub. The application sends telemetry and properties and receives commands.
146
162
147
-
1. Run the following commands to download the device SDK source code:
Copy file name to clipboardExpand all lines: articles/iot-pnp/quickstart-create-pnp-device.md
+9-11Lines changed: 9 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,13 +47,11 @@ You can find your _company model repository connection string_ in the [Azure Cer
47
47
48
48
## Prepare the development environment
49
49
50
-
### Get Azure IoT device SDK for C
51
-
52
-
In this quickstart, you prepare a development environment by installing the Azure IoT C device SDK via [Vcpkg](https://github.com/microsoft/vcpkg).
50
+
In this quickstart, you use the [Vcpkg](https://github.com/microsoft/vcpkg) library manager to install the Azure IoT C device SDK in your development environment.
53
51
54
52
1. Open a command prompt. Execute the following command to install Vcpkg:
55
53
56
-
```cmd/sh
54
+
```cmd
57
55
git clone https://github.com/Microsoft/vcpkg.git
58
56
cd vcpkg
59
57
@@ -62,13 +60,13 @@ In this quickstart, you prepare a development environment by installing the Azur
62
60
63
61
Then, to hook up user-wide [integration](https://github.com/microsoft/vcpkg/blob/master/docs/users/integration.md), run the following (note: requires admin on first use):
@@ -108,7 +106,7 @@ Now that you have a DCM and its associated interfaces, you can generate the devi
108
106
109
107
1. Choose **CMake Project on Windows** as your project template.
110
108
111
-
1. Choose **Via Vcpkg** as way to include the device SDK.
109
+
1. Choose **Via Vcpkg** as the way to include the device SDK.
112
110
113
111
1. A new folder called **sample_device** is created in the same location as the DCM file, and in it are the generated device code stub files. VS Code opens a new window to display these.
@@ -119,22 +117,22 @@ You use the device SDK source code to build the generated device code stub. The
119
117
120
118
1. Create a `cmake` subdirectory in the `sample_device` folder, and navigate to that folder:
121
119
122
-
```cmd\sh
120
+
```cmd
123
121
mkdir cmake
124
122
cd cmake
125
123
```
126
124
127
125
1. Run the following commands to build the generated code stub (replacing the placeholder with the directory of your Vcpkg repo):
128
126
129
-
```cmd\sh
127
+
```cmd
130
128
cmake .. -G "Visual Studio 16 2019" -A Win32 -Duse_prov_client=ON -Dhsm_type_symm_key:BOOL=ON -DCMAKE_TOOLCHAIN_FILE="<directory of your Vcpkg repo>\scripts\buildsystems\vcpkg.cmake"
131
129
132
130
cmake --build .
133
131
```
134
132
135
133
> [!NOTE]
136
134
> If you are using Visual Studio 2017 or 2015, you need to specify the CMake generator based on the build tools you are using:
137
-
>```cmd\sh
135
+
>```cmd
138
136
># Either
139
137
>cmake .. -G "Visual Studio 15 2017" -Duse_prov_client=ON -Dhsm_type_symm_key:BOOL=ON -DCMAKE_TOOLCHAIN_FILE="{directory of your Vcpkg repo}\scripts\buildsystems\vcpkg.cmake"
140
138
># or
@@ -146,7 +144,7 @@ You use the device SDK source code to build the generated device code stub. The
146
144
147
145
1. After the build completes successfully, run your application, passing the IoT hub device connection string as a parameter.
0 commit comments