Skip to content

junyoun-kim/st-device-sdk-c

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SmartThings Device SDK

License

The SmartThings Device SDK(for short STDK) is the core device library that allow device applications to securely connect to the SmartThings Cloud. To facilitate the development of device application in an original chipset SDK, we also provide the reference repository for example device applications as well as this IoT core device library. If you want to use the core device library in your original chipset SDK that installed before, you may simply link it to develop a device application in your existing development environment.

It is distributed in source form and written in C99 for the purpose of portability to most platforms.

Main features

This core device library provides the following features :

  • Customized MQTT in order to reduce memory consumption and enhance stability
  • More easy and efficient APIs
    • Connection APIs : You can do onboarding & MQTT connection by just calling only a few these APIs.
    • Capability APIs : More than hundred different capabilities can be implemented as only a few APIs.

How to get started?

This core device library includes platform-dependent parts that should be built in a specific toolchain or SDK. That is, if you do NOT use the pre-porting environment, you must first port them to the appropriate environment.

After porting, you can use this library completely under the specific environment. Therefore, it is better to refer to one of the pre-supplied example device application in the reference repository. Maybe, we think it's more helpful to you.

And, to know how a device information is registered to the SmartThings Cloud via Developer Workspace, please visit also the Getting Started.

Porting STDK

The SmartThings Device SDK has platform-dependent directories. In current SDK version, those that must be ported are present in src/port/bsp and src/port/os. By default, we provide several implementations such as POSIX, ESPRESSIF, REALTEK.

These porting examples in those directories make it easier for you to port to different chipsets and operating systems. Please refer to the Porting Guide for instructions on porting this SDK.

As of now, this release can be cross-compiled via several ported chipset SDK's environments. More information can be found here

Build STDK

The SmartThings Device SDK itself basically supports POSIX build.

Prerequisites

  • make build on Ubuntu environment.
  • sudo apt-get install libssl-dev libpthread-stubs0-dev

Build

  1. Clone the source code.

    • Download the source code via git clone.

      cd ~
      git clone https://github.com/SmartThingsCommunity/st-device-sdk-c.git
      cd st-device-sdk-c
  2. Build the core device library.

    • This build process moves the core device library to ~/st-device-sdk-c/output/ location.

      cd ~/st-device-sdk-c/
      make
  3. Build a POSIX example application.

    • Go to a example directory and then build.

      cd ~/st-device-sdk-c/example
      make

License

This library is licensed under the Apache License Ver2.0.

About

SmartThings Device SDK

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 88.0%
  • C++ 11.0%
  • Makefile 1.0%