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
Copy file name to clipboardExpand all lines: articles/iot-hub/tutorial-connectivity.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,13 +118,13 @@ In some scenarios, such as in a cloud protocol gateway or as part of a custom au
118
118
> [!NOTE]
119
119
> The SimulatedDevice-2.js sample includes examples of generating a SAS token both with and without the SDK.
120
120
121
-
1.To generate a known-good SAS token using the CLI, run the following command:
121
+
1.Run the following command to generate a known-good SAS token using the CLI:
122
122
123
123
```azurecli-interactive
124
124
az iot hub generate-sas-token --device-id {your_device_id} --hub-name {your_iot_hub_name}
125
125
```
126
126
127
-
1.Make a note of the full text of the generated SAS token. A SAS token looks like the following example: `SharedAccessSignature sr=tutorials-iot-hub.azure-devices.net%2Fdevices%2FMyTestDevice&sig=....&se=1524155307`
127
+
1.Copy the full text of the generated SAS token. A SAS token looks like the following example: `SharedAccessSignature sr=tutorials-iot-hub.azure-devices.net%2Fdevices%2FmyDevice&sig=xxxxxx&se=111111`
128
128
129
129
1. In a terminal window on your development machine, navigate to the root folder of the sample Node.js project you downloaded. Then navigate to the **iot-hub\Tutorials\ConnectivityTests** folder.
130
130
@@ -135,9 +135,9 @@ In some scenarios, such as in a cloud protocol gateway or as part of a custom au
135
135
node SimulatedDevice-2.js "{Your SAS token}"
136
136
```
137
137
138
-
The terminal window displays information as it tries to connect to your hub using the SAS token:
138
+
The terminal window displays a success message once it connects to your hub using the SAS token:
139
139
140
-

140
+
:::image type="content" source="media/tutorial-connectivity/sim-2-connected.png" alt-text="Screenshot that shows a successful connection using a SAS token.":::
141
141
142
142
You've now successfully authenticated from a device using a test SAS token generated by a CLI command. The **SimulatedDevice-2.js** file includes sample code that shows you how to generate a SAS token in code.
143
143
@@ -163,7 +163,7 @@ After a device connects, it can start sending telemetry to your IoT hub. This se
163
163
164
164
### Send device-to-cloud messages
165
165
166
-
1.First, retrieve the current connection string for your simulated device using the following command:
166
+
1.Since we reset the connection string for your device in the previous section, use the following command to retrieve the updated connection string:
167
167
168
168
```azurecli-interactive
169
169
az iot hub device-identity connection-string show --device-id {your_device_id} --output table --hub-name {your_iot_hub_name}
@@ -180,7 +180,7 @@ After a device connects, it can start sending telemetry to your IoT hub. This se
180
180
181
181
The terminal window displays information as it sends telemetry to your hub:
0 commit comments