Skip to content

Latest commit

 

History

History
69 lines (49 loc) · 3.74 KB

README.md

File metadata and controls

69 lines (49 loc) · 3.74 KB
page_type languages products name description
sample
c
python
azure-iot-hub
IoT MQTT Samples
Using MQTT with Azure IoTHub without SDK

Using MQTT with Azure IoT Hub without an SDK

This set of samples will demonstrate how to connect and send messages to an Azure IoT Hub without using the Azure IoT SDKs.

Read the Communicate with your IoT Hub using the MQTT protocol for detailed instructions on connecting your device to IoT Hub using MQTT without an SDK.

Why use an Azure IoT Device SDK?

Azure provides a set of SDKs across multiple languages for connecting device to IoT Hub and DPS. The advantages of using an Azure IoT Device SDK over building a custom connection layer are outlined below:

Custom connection layer Azure IoT Device SDKs
Support Need to support and document your solution Access to Microsoft support (GitHub, Microsoft Q&A, Microsoft technical documentation, Customer Support teams)
New Features Need to manually add new Azure features Can immediately take advantage of new features added
Investment Invest hundreds of hours of embedded development to design, build, test, and maintain a custom version Can take advantage of free, open-source tools. The only cost associated with the SDKs is the learning curve.

For more information, refer to the Overview of Azure IoT Device SDKs.

Samples in this repo

This repository contains the following samples:

Root certificates

Note Azure IoT services are moving to a new CA root, see here for details.

The following root certificates are provided in the repository root:

Certificate Path Description
Baltimore CyberTrust Root IoTHubRootCA_Baltimore.pem Current Root CA set to expire in 2025
DigiCert Global Root G2 DigiCertGlobalRootG2.crt.pem Future Root CA which will become active in Feb 2023

General Prerequisites

To be able to run these samples the following general prerequisites are needed:

  1. Clone this repository
  2. Install the Azure CLI
  3. Provision an IoT Hub in your Azure subscription
  4. Register a device within your IoT Hub
  5. Generate a SAS token for the device using the Azure CLI

    Note By default the SAS Token is valid for 60 minutes. Use the --du parameter to increases if needed.

Additional prerequisites may be required by each individual sample.

Contributing

For details on contributing to this repository, see the contributing guide.

Reporting Security Vulnerabilities

If you believe you have found a security vulnerability in any Microsoft-owned repository that meets Microsoft's definition of a security vulnerability, please report it to the Microsoft Security Response Center.