loading

Connect, monitor and control millions of IoT devices using the Microsoft Azure IoT Hub, Sigfox Network and Qualcomm DragonBoard 410c.

In this instructables you will se hot to configure mqtt.fx software to connect and send messages to IoT Hub and get this messages from DragonBoard.

Step 1: Set Up MQTT.fx

Download MQTT.fx: http://mqttfx.jfx4ee.org/index.php/download

Since installed, open the software and add a new mqtt profile.

  • Broker address: example.azure-devices.net (IoT Hub Host name)
  • Broker port: 8883
  • Client ID: DeviceID
  • Username: example.azure-devices.net/DeviceID
  • Password: you need to generate a SAS Token to device
    • Download Microsoft Device Explorer:

      https://github.com/Azure/azure-iot-sdks/releases/d...

    • Insert your connection string
    • Click on a device
    • SAS Token
    • Insert how much days this token will be valid
    • Click on generate button
    • Copy this part:

      SharedAccessSignature sr=example.azure-devices.net%2fdevices%2fDeviceID&sig=----------------rdLSJnZMxaQ5H7qSJeEc%3d&se=-------88894

    • Put this string in password box
  • Enable SSL/TLS
    • Click on CA signed server certificate

Once connected, click on publish and publish a message to this topíc:

devices/<DeviceID>/messages/events/

Step 2: Configure Sigfox Callback

Its very easy to set up a callback in sigfox backend, so go to https://backend.sigfox.com and sign in your account!

  • Click on Device Type button
  • CALLBACKS
  • New
  • Select Microsoft IoT Hub
  • In the next window paste your connection string and configure a custom message to send to the Hub.

Ok, your callback was successfully created!

Step 3: Set Up DragonBoard

Install Nodejs and npm on DragonBoard:

  • $ sudo apt-get install nodejs
  • $ sudo apt-get install npm

Create a folder, and into this folder create a file named readdevicetocloudmessages.js

  • $ npm init
  • $ npm install azure-event-hubs --save

Copy the attached file code and past into js file.

Run the code:

  • $ node readdevicetocloudmessages.js

Ok, now all messages posted in your hub will be read by DragonBoard, this way you can follow all activities of yor devices.

About This Instructable

212views

0favorites

Bio: Product Development Specialist at Das Coisas
More by leoribg:How to create an Eddystone beacon using DragonBoard Azure IoT Hub - Set Up MQTT.fx, Sigfox Callback and DragonBoard AWS IOT - Set up MQTT.fx, Sigfox Callback and DragonBoard 
Add instructable to: