Azure IoT Hub cloud connection
Azure IoT Hub is an open and flexible cloud platform that supports open-source SDKs and multiple protocols.
This article contains instructions on how to configure a RUT router in order to connect to the Azure IoT Hub.
The information in this page is updated in accordance with the RUT9XX_R_00.06.05.3 firmware version.
You will need:
- A router from the RUT2xx, RUT9xx series or RUTX09
- An Azure IoT Hub account
Azure account creationEdit
Visit https://azure.microsoft.com/en-us/ and create an account that will suit your needs, for testing purposes we will be using free Azure account.
Managing Azure servicesEdit
- First you will want to create a Resource group for easier management of resources that you will add later. In Microsoft Azure home page.
- In new window, select Add
- And then finish creating yours Resource group Select your subscription, we are using Free Trial for this test.
- Select Resource groups
If it is not in very first page, click More services and locate it there.
- Name your group
- Finally, choose server location for meta data. We will choose (South America) Brazil South and will use it during test where available.
Configuring RUT955 Azure IoT HubEdit
- First open router WebUI, go to System > Package Manager and install Azure IoT Hub package
- Now navigate to Services > IoT Platforms
Checking if Data reaches Azure IoT HubEdit
- From router side, connect to it with CLI or SSH client and write in command azure_iothub and press Enter
- From Azure IoT Hub side you can check if it receives data. Go to IoT Hub that you created previously. Select Overview, there you can see:
- To capture logs you will need Device Explorer for IoT Hub Devices.
- Now you will need connection string of yours Azure IoT Hub, Not device. Navigate to IoT hub in your browser, then:
- After that go back to Device Explorer:
- Open Management tab
- Go to Data tab
- Go to Services > MQTT
- Go to Service > IoT Platforms
Setting router to Forward MQTT messages/commands to Azure IoT HubEdit
Checking if MQTT messages are being forwarded to Azure IoT HubEdit
- Open terminal and publish to MQTT Broker message with previously chosen topic.
For our example we are using example: mosquito_pub -h 192.168.1.1 -p 8883 -m ‘testing Azure MQTT messages’ -t test
- Install a MQTT client software to do the test, for this example we used MQTT.fx
- If you did everything right this message will be shown in the device explorer