About This Page
This page is part of the Azure documentation. It contains code examples and configuration instructions for working with Azure services.
Bias Analysis
Bias Types:
⚠️
missing_linux_example
⚠️
windows_tools
Summary:
The documentation demonstrates a bias towards Windows by only providing .NET (C#) sample code, which is most commonly associated with Windows environments, and by referencing Azure IoT Explorer, a GUI tool that is only officially available for Windows and Mac. There are no Linux-specific code samples, nor are there instructions for sending device telemetry using cross-platform or Linux-native tools (such as Python, Node.js, or command-line utilities like mosquitto_pub). The tutorial assumes the user is comfortable with .NET and does not mention or link to equivalent SDKs or instructions for Linux users.
Recommendations:
- Provide sample code and instructions using cross-platform SDKs, such as Python or Node.js, which are popular and well-supported on Linux.
- Include explicit instructions or examples for sending device telemetry using command-line tools available on Linux (e.g., mosquitto_pub for MQTT).
- Mention and link to the Azure IoT SDKs for other languages (Python, JavaScript, Java, C) and show how to run the sample on Linux.
- Clarify the availability of Azure IoT Explorer on Linux, and if not available, suggest alternative methods (such as using the Azure CLI or other open-source tools) for monitoring device messages.
- Add a note in the prerequisites and sample code sections that the tutorial is cross-platform, and provide any necessary Linux-specific setup steps (e.g., installing .NET Core on Linux, or using a different SDK).
Create pull request
Flagged Code Snippets
1. From the device-identity output, copy the **primaryKey** value without the surrounding quotation marks and save it. You use this value to configure the sample code that generates simulated device telemetry messages.
---
Now that you have a device ID and key, use the sample code to start sending device telemetry messages to IoT Hub.
>[!TIP]
>If you're following the Azure CLI steps for this tutorial, run the sample code in a separate session. That way, you can allow the sample code to continue running while you follow the rest of the CLI steps.
1. If you didn't as part of the prerequisites, download or clone the [Microsoft Azure IoT SDK for .NET](https://github.com/Azure/azure-iot-sdk-csharp) repository from GitHub now.
1. From the folder where you downloaded or cloned the SDK, navigate to the `azure-iot-sdk-csharp\iothub\device\samples\how to guides\HubRoutingSample` folder.
1. Install the Microsoft Azure IoT SDK for .NET and necessary dependencies as specified in the `HubRoutingSample.csproj` file: