Skip to content
Branch: master
Find file History
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
ios Update ios sample to contain all iothub sample files Nov 8, 2018
iotedge_downstream_device_sample Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_client_device_twin_and_methods_sample Adding the macro_utils repo (#936) Apr 12, 2019
iothub_client_sample_amqp_shared_methods Untabify, remove trailing spaces, add new line at the end of the file Sep 7, 2018
iothub_client_sample_module_filter Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_client_sample_module_method_invoke Untabify, remove trailing spaces, add new line at the end of the file Sep 7, 2018
iothub_client_sample_module_sender Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_client_sample_mqtt_dm update MU_DEFINE_ENUM_STRINGS Sep 13, 2019
iothub_client_sample_mqtt_esp8266 Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_client_sample_upload_to_blob Vcpkg cleanup (#767) Dec 13, 2018
iothub_client_sample_upload_to_blob_mb Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_convenience_sample [BugFix] Update sample (#1170) Sep 10, 2019
iothub_ll_c2d_sample Vcpkg cleanup (#767) Dec 13, 2018
iothub_ll_client_sample_amqp_shared Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_ll_client_shared_sample Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_ll_client_x509_sample Rename macro_utils DEC to CS_DEC (fix Arduino name collision) (#876) Mar 28, 2019
iothub_ll_telemetry_sample OPTION_DO_WORK_FREQUENCY_IN_MS (#1023) May 28, 2019
CMakeLists.txt Sample code for a downstream device that connects to an IoT Edge device Oct 4, 2018
readme.md [Doc.] - Added notes on using low level samples (#653) Jan 10, 2019

readme.md

Samples for the Azure IoT device SDK for C

This folder contains simple samples showing how to use the various features of the Microsoft Azure IoT Hub service from a device running C code.

Note

  • When using low level samples (iothub_ll_*), the IoTHubDeviceClient_LL_DoWork function must be called regularly (eg. every 100 milliseconds) for the IoT device client to work properly.

List of samples

  • Simple send and receive messages:

    • iothub_ll_telemetry_sample: sends messages from a single device
    • iotedge_downstream_device_sample: sends messages from a single device to an IoT Edge device
  • Multiplexing send and receive of several devices over a single connection (useful in Gateway scenarios where multiplexing might be needed):

    • iothub_client_sample_amqp_shared: send and receive messages from 2 devices over a single AMQP connection
    • iothub_ll_client_sample_amqp_shared: send and receive messages from 2 devices over a single AMQP connection using the lower level API set of the SDK
    • iothub_client_sample_amqp_websockets_shared: send and receive messages from 2 devices over a single AMQP over Websockets connection
    • iothub_client_sample_http_shared: send and receive messages from 2 devices over a single HTTP connection (multiplexing) (useful in Gateway scenarios)
  • Device services samples (Device Twins, Methods, and Device Management):

    • iothub_client_device_twin_and_methods_sample: Implements a simple Cloud to Device Direct Method and Device Twin sample
    • iothub_client_sample_mqtt_dm: Shows the implementation of a firmware update of a device (Raspberry Pi 3)
  • Uploading blob to Azure:

    • iothub_client_sample_upload_to_blob: Uploads a blob to Azure through IoT Hub

How to compile and run the samples

Prior to running the samples, you will need to have an instance of Azure IoT Hub available and a device Identity created in the hub.

It is recommended to leverage the library packages when available to run the samples, but sometimes you will need to compile the SDK for/on your device in order to be able to run the samples.

This document describes in detail how to prepare your development environment as well as how to run the samples on Linux, Windows or other platforms.

You can’t perform that action at this time.