Simple IP Socket (BSD like). The interface documentation is here.
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.
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.
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).
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:
- MDK-Packs/AWS_IoT_Device
- MDK-Packs/Azure_IoT
- MDK-Packs/Google_IoT_Device
- MDK-Packs/Paho_MQTT
- MDK-Packs/Watson_IoT_Device
Keil Application Note 312 explains operation of these IoT clients.
Directory/File | Description |
---|---|
./documentation/ |
IoT Socket documentation sources for Doxygen |
./include/ |
Header files with the IoT Socket API |
./layer/ |
IoT Socket layers |
./layer/FreeRTOS_Plus_TCP/ |
Layer for the FreeRTOS-Plus-TCP stack |
./layer/MDK_Network_ETH/ |
Layer for the MDK-Middleware network stack over ETH |
./layer/VSocket/ |
Layer for the VSocket (Virtual Socket) |
./layer/WiFi/ |
Layer for a WiFi CMSIS-Driver |
./source/ |
IoT Socket implementations |
./source/freertos_plus_tcp/ |
Implementation for the FreeRTOS-Plus-TCP stack |
./source/lwip/ |
Implementation for the lwIP network stack |
./source/mdk_network/ |
Implementation for the MDK-Middleware network stack |
./source/vsocket/ |
Implementation for the VSocket (Virtual Socket) |
./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 |
To build an IoT Socket CMSIS pack:
- Verify that following tools are installed on the PC:
- git bash (e.g. for Windows: https://gitforwindows.org/)
- ZIP archive creation utility (e.g. 7-Zip)
- Doxygen version 1.9.6 (https://sourceforge.net/projects/doxygen/files/rel-1.9.6/)
- 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.4.0.pack
) and places it directly in the local repo folder.
- this creates a pack file (for example
keil.com/iot references example projects that implement wired and wireless connectivity to popular cloud services using extended IoT clients over IoT Socket interface.
IoT Socket is provided under Apache 2.0 license.
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 |