Alibaba Cloud IoT C-SDK

repository·v3.0.1·Indexed 19 days ago

https://github.com/aliyun/iotkit-embedded

A C-SDK for embedded devices to securely connect to the Alibaba Cloud IoT platform. It supports TCP/IP or serial communication and requires a C99 standard C library. The SDK is OS and hardware independent, utilizing a Hardware Abstraction Layer (HAL) for porting to platforms such as Linux and Windows. It includes modules for CoAP Cloud, CoAP Local Server, ALCS, and HTTP communication channels.

Tokens
1.5K
Snippets
3
Records
13
Agent score
68%

What's inside iotkit-embedded

  1. Overview of the CoAP Cloud implementation

    v3.0.1
    The CoAP Cloud module provides an implementation of the Constrained Application Protocol (CoAP) with specific customizations designed for connecting to the AliCloud IoT platform. It handles serialization, deserialization, networking, and platform abstraction required for IoT communication via CoAP.
  2. Overview of the CoAP Local Server implementation

    v3.0.1

    The coap local component provides an implementation of the CoAP (Constrained Application Protocol) specifically customized for alcs and awss. It is designed for embedded environments and relies on abstraction layers to remain portable across different hardware and operating systems.

    Key Dependencies:

    • hal: Uses OSAL (Operating System Abstraction Layer) and HAL (Hardware Abstraction Layer) to shield the implementation from specific OS and hardware differences.
    • infra: Utilizes the project's infrastructure toolset for authentication, networking, and other core services.
  3. Overview of the ALCS implementation

    v3.0.1

    ALCS is an implementation of the ICA (IoT Communication Service) local communication service. It provides the necessary infrastructure for local device communication and integrates with cloud services to facilitate connectivity.

    Key features include:

    • Local communication via coap local.
    • Token acquisition from the cloud using mqtt.
    • Hardware and OS abstraction using hal (Hardware Abstraction Layer) and osal (Operating System Abstraction Layer).
    • Core utility support via the infra toolset (Authentication, Networking, etc.).
  4. Overview of the HTTP communication channel

    v3.0.1

    The http module provides a communication channel implemented via the HTTP protocol. It is designed to work within the iotkit-embedded ecosystem, leveraging abstraction layers to support various hardware and operating systems.

    Key Dependencies:

    • hal: Provides Hardware Abstraction Layer (HAL) and OS Abstraction Layer (OSAL) to shield the HTTP implementation from specific OS and hardware differences.
    • infra: Provides essential infrastructure tools including authentication and networking capabilities.
  5. Overview of the IoT C-SDK

    v3.0.1

    The C-SDK allows device manufacturers to securely connect devices to the Alibaba Cloud IoT platform for management.

    Requirements for integration:

    • Support for TCP/IP protocol stack or Serial communication.
    • A C99 standard C library.

    Note for non-IP devices: Devices using non-IP protocols (such as Zigbee, 433, or KNX) cannot connect directly. They must connect via a Gateway device, and that gateway device must integrate the C-SDK.

  6. CoAP Cloud dependencies

    v3.0.1

    To use the CoAP Cloud module, the following dependencies must be present in your environment:

    • hal: Hardware Abstraction Layer (HAL) and OS Abstraction Layer (OSAL) to shield the implementation from different operating systems and hardware architectures.
    • infra: Infrastructure toolsets providing essential services such as Authentication and Networking.
  7. Porting the C-SDK to hardware or OS

    v3.0.1

    The C-SDK is designed to be OS and hardware platform independent. It is written entirely in C and utilizes a HAL (Hardware Abstraction Layer) to interface with hardware-specific functions.

    To port the SDK, you must implement the required HAL functions for your specific platform.

    Reference implementations for the HAL are available for:

    • Linux
    • Windows
    • Common Operating Systems and Modules

    For detailed instructions on compiling and integrating the SDK on specific platforms, refer to the official porting documentation.

    https://help.aliyun.com/document_detail/97556.html
  8. Get started with the C-SDK

    v3.0.1

    To experience how to connect a device to the Alibaba Cloud IoT platform, send data to the platform, and receive data from the platform, follow the official quickstart guide.

    https://help.aliyun.com/document_detail/96624.html
  9. Overview of kconfig-frontends for Windows

    v3.0.1
    This package provides the kconfig-frontends and its parser, ported specifically for Windows environments. Kconfig is the configuration language used by the Linux kernel. This version includes necessary modifications to allow it to function outside of the standard Linux kernel build infrastructure and includes a modified version of PDCurses to support terminal interfaces on Windows. It also includes required .dll files from uvc.de to ensure proper operation.
  10. Use Make commands to manage the build process

    v3.0.1

    The build system uses make to handle compilation, platform configuration, and environment inspection. Use the following commands to manage your build lifecycle:

    • Compilation: Use make to start building with the current or selected platform configuration.
    • Platform Configuration: Use make reconfig to open a multi-platform selection menu where you can choose your hardware platform by number. Use make config to view the currently selected platform configuration file.
    • Settings Customization: Use make menuconfig to open a graphical interface for editing the make.settings file.
    • Cleanup: Use make distclean to remove all intermediate files generated during the build process, returning the directory to its original state (as if just cloned).
    • Inspection: Use make env to print the current compilation options and their assigned values. Use make help to print the help text.
    # Example workflow
    make reconfig      # Select your hardware platform
    make                # Compile the project
    make env            # Verify build options
    make distclean      # Clean everything