GithubHelp home page GithubHelp logo

onlykumarabhishek / mbed-to-azure-iot-hub Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ksaye/mbed-to-azure-iot-hub

0.0 0.0 0.0 50 KB

Connecting to Azure IoT Hub from Mbed OS device.

License: Apache License 2.0

C++ 38.48% C 61.52%

mbed-to-azure-iot-hub's Introduction

Mbed-to-Azure-IoT-Hub

Mbed OS example program connecting to Azure IoT Hub with MQTT over TLS. You can authenticate through X.509 certificates or through a symmetric key.

Setting your device identity

Using an X.509 certificate

See Azure IoT Hub from Mbed OS device for more details on how to create a new certificate.

Using symmetric keys

  1. In the Azure IoT Hub, click IoT Devices > Add.
  2. Enter a Device ID.
  3. Under 'Authentication type', select Symmetric key.
  4. In this application, open MQTT_server_setting.h, and:
    • Set IOTHUB_AUTH_METHOD to IOTHUB_AUTH_SYMMETRIC_KEY.
    • Set DEVICE_ID to your Device ID.
    • Set MQTT_SERVER_HOST_NAME to your IoT Hub hostname (you can find this under the 'Overview' tab in the IoT Hub).
    • Set MQTT_SERVER_PASSWORD to an SAS token.

If authentication failed, you'll see ERROR: rc from MQTT connect is 5 in the console.

Memory usage

Azure IoT Hub uses RSA to authenticate, which requires a significant amount of memory. This library has the following heap requirements:

Symmetric keys

While connecting: 36594 bytes
After connecting: 30098 bytes

X.509 certificates

While connecting: 54673 bytes
After connecting: 42865 bytes

mbed-to-azure-iot-hub's People

Contributors

janjongboom avatar michalpasztamobica 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.