IoTConnect C SDK

IoTConnect C SDK

C Language SDK

Version 1.0

Updated on 02 January 2023

This package outlines in detail how to install and run an IoTConnect generic C SDK.

Date Name Download
02 January 2023 iotc-generic-c-sdk-2.1 Download
01 February 2024 V3.1 Getting started

Introduction

  • IoTConnect generic C SDK package is flexible to integrate with Azure IoT C SDK or Paho MQTT C Client.
  • It works for both – Azure as well as AWS brokers. Azure IoT C SDK lib does not work for AWS configuration.
  • At the same time, the Paho MQTT implementation does not support TPM authentication.

CMake Build Options

Note: Our SDK is configured with Azure IoT C SDK by default. You can toggle it with CMake flags for
using it eather PAHO/AWS mqtt lib:

  • IOTC_USE_PAHO=ON – Builds with PAHO/AWS MQTT Client instead of Azure IoT C SDK by default.
  • IOTC_TPM_SUPPORT=ON – Adds TPM Support for Azure IoT C SDK. Requires IOTC_USE_PAHO=OFF.

Getting started

Prerequisites

  • The IoTConnect generic C SDK depends on curl OpenSSL libraries and UUID library. (UUID required for Azure C SDK flavor only).
  • To build the source, ensure that the shared libraries and the C source headers are on the build host.
  • This SDK depends on Curl and OpenSSL libraries while running on the device. To run this SDK,
use the following git submodules:

Installation

This project has git submodules that need to be pulled before building. You can either:
  1. Download “iotc-generic-c-sdk-2.1.zip” and extract.
  2. Edit samples/basic-sample/config/app_config.h to reflect your account and device’s configuration.
  3. If using CA Certificate-based authentication, follow the instructions in the iotc-c-lib/tools/ecc-certs. Place the device certificate and private key into certs/client-crt.pem and certs/client-key.pem in the basic-sample project.

Note: Build or re-build the IoTConnect generic C SDK after editing the app_config.h file.