Git Product home page Git Product logo

iotmqttsample's Introduction

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.

This repository provides the file IoTHubRootCA.cert.pem which contains the following root certificates:

Certificate Description
Baltimore CyberTrust Root NOT recommended since IoT Hub migration out of Baltimore will start in Feb 2023
DigiCert Global Root G2 Future Root CA to become active in Feb 2023
Microsoft RSA Root Certificate Authority 2017 Additional Root recommended to prevent disruption from future changes

General Prerequisites

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

  1. Clone this repository (Install Git)
  2. Change into the cloned directory:
    cd IoTMQTTSample
  1. Install the Azure CLI

  2. Provision an IoT Hub in your Azure subscription

  3. Register a device within your IoT Hub

  4. 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 increase 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.

iotmqttsample's People

Contributors

ryanwinter avatar ericmitt avatar microsoftopensource avatar dominicbetts avatar rido-min avatar timshererwithaquent avatar microsoft-github-operations[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.