Skip to content

MDK-Packs/IoT_Socket

Repository files navigation

IoT Socket

Simple IP Socket (BSD like). The interface documentation is here.

Overview

This repository contains the code of IoT Socket - a simple BSD like IP socket interface that implements the glue logic between IoT cloud connectors (IoT clients) and the underlying communication stack as shown on the picture below.

Structure of an IoT application

IoT Socket releases in CMSIS Pack format are available on CMSIS Packs page under MDK-Packs category and can be used in environments supporting the CMSIS-Pack concept. Additionally, a generator script ./gen_pack.sh is provided for building the pack from the repository.

Supported network stacks

IoT Socket implementation variants are available for the following network stacks:

With the IoT Socket Multiplexer functionality it is possible to retarget communication to a different socket interface at run-time (for example from a wireless to wired connection).

Supported IoT clients

Typically, a user application does not call IoT Socket APIs directly, and relies on the IoT client interface that manages connectivity to the target service in the cloud.

An IoT client may already use IP sockets for communication and so can be easily ported to IoT Socket API. For cases when secure SSL/TLS sockets are required mbed TLS can be used. CMSIS-mbedTLS extends the mbedTLS library to use the IoT Socket API for network communication and so enables support for various IoT clients.

Following IoT client implementations work on top of the IoT Socket API either directly or via CMSIS-mbedTLS:

Keil Application Note 312 explains operation of these IoT clients.

Repository structure

Directory/File Description
./documentation/ IoT Socket documentation sources for Doxygen
./include/ Header files with the IoT Socket API
./source/ IoT Socket implementations
./source/lwip/ Implementation for the lwIP network stack
./source/mdk_network/ Implementation for the MDK-Middleware network stack
./source/wifi/ Implementation for a WiFi CMSIS-Driver
./source/mux/ IoT Socket Multiplexer
./template/ Template sources for custom implementation
./LICENSE License text for the repository content
./MDK-Packs.IoT_Socket.pdsc Pack description file
./gen_pack.sh Pack generation script

Build IoT Socket CMSIS pack

To build an IoT Socket CMSIS pack:

  • Verify that following tools are installed on the PC:
  • Checkout this repository. For example in git bash with git clone https://github.com/MDK-Packs/IoT_Socket.
  • In the local repository folder execute ./gen_pack.sh in the bash shell.
    • this creates a pack file (for example MDK-Packs.IoT_Socket.1.3.0.pack) and places it directly in the local repo folder.

Examples

keil.com/iot references example projects that implement wired and wireless connectivity to popular cloud services using extended IoT clients over IoT Socket interface.

License

IoT Socket is provided under Apache 2.0 license.

Related GitHub repositories

Repository Description
CMSIS CMSIS repository
CMSIS-mbedTLS CMSIS pack for mbedTLS with an extension using IoT Socket API
MDK-Packs Contains reference implementations of IoT cloud connectors that work on top of IoT Socket interface