Skip to content

Commit e730079

Browse files
Merge pull request #214992 from w-azure/winona-route-tut
Updated command & wording
2 parents b4f3aeb + 61f12f0 commit e730079

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

articles/iot-hub/tutorial-routing.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ In this tutorial, you perform the following tasks:
3939

4040
* Make sure that port 8883 is open in your firewall. The sample in this tutorial uses MQTT protocol, which communicates over port 8883. This port may be blocked in some corporate and educational network environments. For more information and ways to work around this issue, see [Connecting to IoT Hub (MQTT)](iot-hub-mqtt-support.md#connecting-to-iot-hub).
4141

42-
* Optionally, install [Azure IoT Explorer](https://github.com/Azure/azure-iot-explorer). This tool helps you observe the messages as they arrive at your IoT hub.
42+
* Optionally, install [Azure IoT Explorer](https://github.com/Azure/azure-iot-explorer). This tool helps you observe the messages as they arrive at your IoT hub. This article uses Azure IoT Explorer.
4343

4444
# [Azure portal](#tab/portal)
4545

@@ -112,15 +112,14 @@ Now that you have a device ID and key, use the sample code to start sending devi
112112
dotnet restore
113113
```
114114

115-
1. In an editor of your choice, open the `Paramaters.cs` file. This file shows the parameters that are supported by the sample. Only the first three required parameters will be used in this article when running the sample. Review the code in this file. No changes are needed.
115+
1. In an editor of your choice, open the `Parameters.cs` file. This file shows the parameters that are supported by the sample. Only the `PrimaryConnectionString` parameter will be used in this article when running the sample. Review the code in this file. No changes are needed.
116+
116117
1. Build and run the sample code using the following command:
117118

118-
* Replace `<myDeviceId>` with the device ID that you assigned when registering the device.
119-
* Replace `<iotHubUri>` with the hostname of your IoT hub, which takes the format `IOTHUB_NAME.azure-devices.net`.
120-
* Replace `<deviceKey>` with the device key that you copied from the device identity information.
119+
Replace `<myDevicePrimaryConnectionString>` with your primary connection string from your device in your IoT hub.
121120

122121
```cmd
123-
dotnet run --d <myDeviceId> --u <iotHubUri> --k <deviceKey>
122+
dotnet run --PrimaryConnectionString <myDevicePrimaryConnectionString>
124123
```
125124
126125
1. You should start to see messages printed to output as they are sent to IoT Hub. Leave this program running for the duration of the tutorial.
@@ -166,15 +165,15 @@ Now, use that connection string to configure IoT Explorer for your IoT hub.
166165
1. Select **Save**.
167166
1. Once you connect to your IoT hub, you should see a list of devices. Select the device ID that you created for this tutorial.
168167
1. Select **Telemetry**.
169-
1. Select **Start**.
168+
1. With your device still running, select **Start**. If you're device is not running you won't see telemetry.
170169

171170
![Start monitoring device telemetry in IoT Explorer.](./media/tutorial-routing/iot-explorer-start-monitoring-telemetry.png)
172171

173172
1. You should see the messages arriving from your device, with the most recent displayed at the top.
174173

175174
![View messages arriving at IoT hub on the built-in endpoint.](./media/tutorial-routing/iot-explorer-view-messages.png)
176175

177-
Watch the incoming messages for a few moments to verify that you see three different types of messages: normal, storage, and critical.
176+
Watch the incoming messages for a few moments to verify that you see three different types of messages: normal, storage, and critical. After seeing this, you can stop your device.
178177

179178
These messages are all arriving at the default built-in endpoint for your IoT hub. In the next sections, we're going to create a custom endpoint and route some of these messages to storage based on the message properties. Those messages will stop appearing in IoT Explorer because messages only go to the built-in endpoint when they don't match any other routes in IoT hub.
180179

@@ -215,7 +214,7 @@ Create an Azure Storage account and a container within that account, which will
215214

216215
1. In the storage account menu, select **Containers** from the **Data storage** section.
217216

218-
1. Select **Container** to create a new container.
217+
1. Select **+ Container** to create a new container.
219218

220219
![Create a storage container](./media/tutorial-routing/create-storage-container.png)
221220

@@ -263,11 +262,11 @@ Now set up the routing for the storage account. In this section you define a new
263262

264263
1. Select **Message Routing** from the **Hub settings** section of the menu.
265264

266-
1. In the **Routes** tab, select **Add**.
265+
1. In the **Routes** tab, select **+ Add**.
267266

268267
![Add a new message route.](./media/tutorial-routing/add-route.png)
269268

270-
1. Select **Add endpoint** next to the **Endpoint** field, then select **Storage** from the dropdown menu.
269+
1. Select **+ Add endpoint** next to the **Endpoint** field, then select **Storage** from the dropdown menu.
271270

272271
![Add a new endpoint for a route.](./media/tutorial-routing/add-storage-endpoint.png)
273272

@@ -345,7 +344,9 @@ Once the route is created in IoT Hub and enabled, it will immediately start rout
345344

346345
### Monitor the built-in endpoint with IoT Explorer
347346

348-
Return to the IoT Explorer session on your development machine. Recall that the IoT Explorer monitors the built-in endpoint for your IoT hub. That means that now you should be seeing only the messages that are *not* being routed by the custom route we created. Watch the incoming messages for a few moments and you should only see messages where `level` is set to `normal` or `critical`.
347+
Return to the IoT Explorer session on your development machine. Recall that the IoT Explorer monitors the built-in endpoint for your IoT hub. That means that now you should be seeing only the messages that are *not* being routed by the custom route we created.
348+
349+
Start the sample again by running the code. Watch the incoming messages for a few moments and you should only see messages where `level` is set to `normal` or `critical`.
349350

350351
### View messages in the storage container
351352

@@ -361,7 +362,9 @@ Verify that the messages are arriving in the storage container.
361362

362363
![Find routed messages in storage.](./media/tutorial-routing/view-messages-in-storage.png)
363364

364-
1. Download the JSON file and confirm that it contains messages from your device that have the `level` property set to `storage`.
365+
1. Select the JSON file, then select **Download** to download the JSON file. Confirm that the file contains messages from your device that have the `level` property set to `storage`.
366+
367+
1. Stop running the sample.
365368

366369
## Clean up resources
367370

0 commit comments

Comments
 (0)