The Azure IoT device SDKs are available for multiple platforms & programming languages. The following SDKs are supported by the Toradex Linux images:
Below are instructions to quickly evaluate the various Azure IoT device SDKs on Toradex modules flashed with a V2.5 (or later) Linux image. These instructions require that you setup an Azure IoT Hub instance. Additionally, the Azure IoT Hub Device Explorer is used to verify functionality in all the proceeding examples.
Attention: Azure Device Explorer was deprecated and is being replaced by Azure IOT Explorer
Install Mono & related packages:
opkg update
opkg install mono mono-dev ca-certificates openssl
Import trusted certificates:
mono /usr/lib/mono/4.5/mozroots.exe --import --sync
On your host computer, use the Azure IoT C# Application Development guides to build C# applications. For samples, check out Azure IoT C# Samples.
Transfer the compiled C# example application to the device.
Start the Device Explorer application on your host machine.
Execute the C# example application (i.e. DeviceClientHttpSample.exe) on the device using Mono:
mono DeviceClientHttpSample.exe
Install Node.js & related packages:
opkg update
opkg install nodejs nodejs-npm python python-simplejson
Copy all the files from the Azure github samples directory into a directory of your choice. Then, inside this directory, install the required Node packages.
npm install
Edit the example javascript file(s) (e.g. simple_sample_http.js):
vi simple_sample_device.js
and locate the following line to change [IoT Device Connection String] to your connection string as provided by your IoT hub instance:
var connectionString = '[IoT Device Connection String]';
Start the Device Explorer application on your host machine.
Execute the sample application using Node.js:
node simple_sample_device.js