Integrating with Azure IoT Hub

Microsoft’s Azure IoT Hub is a fully managed service that enables reliable and secure bi-directional communications between millions of IoT devices and a solution back end.

  • 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.

To find out more, see the Learning Path page or the IoT Hub documentation.
1x1
1x1

Using Azure IoT With KotahiNet

Transmitted device data is published as a stringified JSON object.

This tutorial describes how to process the device-to-cloud messages in your C# application to the Azure IoT Hub.

We use the following mapping of the placeholders in the guides: [device_id] is filled in with the Device EUI as 16 hex digits. For example, a message on port 1 from Device EUI 00-11-22-33-44-55-66-77 will be published as

{“cmd”:”rx”,”EUI”:”0011223344556677″,”ts”:12345678,”fcnt”:1,”port”:1,”data”:”A1B2C3D4″}

1x1
1x1

Setting Up Azure IoT To Work With KotahiNet

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. Pick a name for your hub. Note the name value. Set all the other hub options as you need.

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

4. Open the “Settings” for the IoT hub. From the Settings tab, navigate to “Shared access policies” and open the “device” policy. Note the value of the “Primary key” from the Shared access keys list.

5. Use the Device Explorer to add devices to your IoT hub. You need to setup each of your devices manually and must use the Device EUI (without dashes) as the device name.

6. Send the two noted values- IoT Hub Name and Primary key- to KotahiNet for enabling the integration on the LoRaWAN network side. Important: the Primary key required needs to be noted following the instructions exactly in step 4 from the device policy.