Things used in this project
|Software apps and online services:|
In this tutorial you will se hot to configure mqtt.fx software to connect and send messages to IoT Hub and get this messages from DragonBoard.
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:
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
- 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!
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.
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!