Page tree
Skip to end of metadata
Go to start of metadata

Microsoft IoT Hub



Azure IoT Hub is a fully managed service that enables reliable and secure bidirectional communications between millions of IoT devices and a solution back end.

Azure IoT Hub:

  • Provides reliable device-to-cloud and cloud-to-device messaging at scale.

  • Enables secure communications using per-device security credentials and access control.

  • Provides extensive monitoring for device connectivity and device identity management events.

  • Includes device libraries for the most popular languages and platforms.

A great place to start with the Azure IoT Hub is through the Learning Path page or you can simply use the Azure IoT Hub documentation.


Configuration


Access Azure platform

Connectivity check tutorial


Setup guide

  1. Log in to the Azure portal (Microsoft Azure account required).

  2. From the menu on the left, select "+ New" > Internet of Things > Azure IoT Hub

  3. Pick a name for your hub. Copy the name value to the form below. Set all the other hub options as you need.

  4. Once your IoT Hub is ready, navigate to its details.

  5. Open the "Settings" for the IoT hub. From the Settings tab, navigate to "Shared access policies", and open the "device" policy. Copy the value of the "Primary key" from the Shared access keys list to the form below.

  6. Use the Device Explorer within the IoT Hub Dashboad in Azure to create your LORIOT Device . You need to import your all devices from your application manually. You must use your Device EUI (without dashes!) as the device name. See the guide below for detailed information.

  7.  The full JSON objects will be deliver as the body of each message.



Interesting videos


Adding a device: 47:28

Guides


Testing a data output:

 Click here to expand...
  • Create a IoT Hub
  • Create a device
  • Introduce the device EUI
  • Add the device configuration
  •  Click here to expand...

    "tags": {
    "sensorName": "DeviceOutPutTest",
    "AppSkey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ",
    "NwkSKey": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "DevAddr": "01-3D-56-86"
    }

  • Visualice the incoming data

  • For further steps you'll need to create a function to see the payload (Not researched).


Simulating a device to test Azure credentials connectivity


 Click here to expand...

Requirements:

  • install node
  • install npm
  • Azure configured IoT hub with a registered device

Following the Connectivity check tutorial guide, download the source code and navigate to the folder azure-iot-samples-node-master/iot-hub/Tutorials/ConnectivityTests

//Testing conectivity with azure

node SimulatedDevice-1.js "{your device connection string}"

//Testing send mesasges form the device to Azure

node SimulatedDevice-3.js "{your device connection string}"

You can check the received messages in:

metrics selecting Telemetry messages sent