diff --git a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/PortingGuide.md b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/PortingGuide.md
index 6f50177..2ca5f8d 100644
--- a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/PortingGuide.md
+++ b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/PortingGuide.md
@@ -76,8 +76,8 @@ For additional details about API parameters refer to the [API documentation](htt
Define the `TLSDataParams` Struct as in `network_platform.h`
This is used for data specific to the TLS library being used.
-`IoT_Error_t iot_tls_init(Network *pNetwork, char *pRootCALocation, const char *pDeviceCertLocation,
- const char *pDevicePrivateKeyLocation, const char *pDestinationURL,
+`IoT_Error_t iot_tls_init(Network *pNetwork, char *pRootCALocation, char *pDeviceCertLocation,
+ char *pDevicePrivateKeyLocation, char *pDestinationURL,
uint16_t DestinationPort, uint32_t timeout_ms, bool ServerVerificationFlag);`
Initialize the network client / structure.
diff --git a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/README.md b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/README.md
index edcf06b..2686ad6 100644
--- a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/README.md
+++ b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/README.md
@@ -1,27 +1,11 @@
-**We have released version 4.0.0 beta 1 of this SDK on the [v4_beta](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v4_beta) branch and encourage everyone to give it a try.**
+# AWS IoT Device SDK for Embedded C
-Version 4 is a new design, and therefore **NOT** backwards compatible with version 3.0.1. We will continue to fix bugs in v3.0.1 even after v4.0.0 is released, but we may not add new features to v3.0.1.
+This tag [3.1.5](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v3.1.5) contains the v3 version of AWS IoT Device SDK for Embedded C. No new features will be added to this tag; instead, only bug fixes will be made and minimally tested.
-Please be aware that v4 beta may have bugs and performance issues. Additionally, there are currently missing features compared to v3.0.1. See the [README](https://github.com/aws/aws-iot-device-sdk-embedded-C/blob/v4_beta/README.md/) on the v4_beta branch for more information.
-
-## Branches
-
-### Master branch
-The [master](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/master) branch will now contain bug fixes/features that have been minimally tested to ensure nothing major is broken. The current version on the master branch is v3.0.1. Eventually, we will move v4.0.0 to the master branch and move v3.0.1 to a legacy branch.
-
-### Release branch
-The [release](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/release) branch will contain new releases for the SDK that have been tested thoroughly on all supported platforms. Please ensure that you are tracking the release branch for all production work. The current version on the release branch is v3.0.1. Eventually, we will move v4.0.0 to the release branch and move v3.0.1 to a legacy branch.
-
-### v4_beta branch
-The [v4_beta](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/v4_beta) branch will contain new features and a new design that inherits from both the AWS IoT Device SDK Embedded C and the libraries provided with Amazon FreeRTOS. This is version 4.0.0 of the SDK. Please be aware that v4 beta may have bugs and performance issues. Eventually, we will move v4.0.0 to the master/release branches and delete v4 beta branch.
-
-### Development branch
-
-The [development](https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/development) currently hosts development of the next iteration of the AWS IoT Embedded C SDK version 4. It is currently a work in progress and should not be used to create any products. We will update this README when that status changes.
## Overview
-The AWS IoT device SDK for embedded C is a collection of C source files which can be used in embedded applications to securely connect to the [AWS IoT platform](http://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html). It includes transport clients **MQTT**, **TLS** implementations and examples for their use. It also supports AWS IoT specific features such as **Thing Shadow**. It is distributed in source form and intended to be built into customer firmware along with application code, other libraries and RTOS. For additional information about porting the Device SDK for embedded C onto additional platforms please refer to the [PortingGuide](https://github.com/aws/aws-iot-device-sdk-embedded-c/blob/master/PortingGuide.md/).
+The AWS IoT device SDK for embedded C is a collection of C source files which can be used in embedded applications to securely connect to the [AWS IoT platform](http://docs.aws.amazon.com/iot/latest/developerguide/what-is-aws-iot.html). It includes transport clients **MQTT**, **TLS** implementations and examples for their use. It also supports AWS IoT specific features such as **Thing Shadow**. It is distributed in source form and intended to be built into customer firmware along with application code, other libraries and RTOS. For additional information about porting the Device SDK for embedded C onto additional platforms please refer to the [PortingGuide](./PortingGuide.md).
## Features
The Device SDK simplifies access to the Pub/Sub functionality of the AWS IoT broker via MQTT and provide APIs to interact with Thing Shadows. The SDK has been tested to work with the AWS IoT platform to ensure best interoperability of a device with the AWS IoT platform.
diff --git a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/architecture.png b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/architecture.png
new file mode 100644
index 0000000..d010a47
Binary files /dev/null and b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/architecture.png differ
diff --git a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/architecture.txt b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/architecture.txt
new file mode 100644
index 0000000..77218ea
--- /dev/null
+++ b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/architecture.txt
@@ -0,0 +1,32 @@
+/**
+@page architecture SDK Architecture and Design
+@brief This page documents the architecture and design goals of this SDK.
+
+The Embedded C SDK has a layered architecture. It is currently based on the MQTT protocol, but may support protocols like HTTP in the future.
+
+This SDK is primarily targeted for resource-constrained devices.
+
+@section architecture_considerations Considerations during design
+- Low memory footprint (around 6k of code size without TLS library for the MQTT layer)
+- Flexibility in picking and choosing functionality
+- Static memory only (no malloc)
+- Configurable resource usage (JSON tokens, MQTT subscription handlers, etc.)
+- Portability across RTOSes
+
+@section architecture_diagram Layered architecture
+@brief There are primarily 3 layers in the SDK as shown in the diagram below.
+
+@image html architecture.png
+
+@subsection architecture_tls TLS layer
+
+This SDK uses TLS sockets to talk to the server. We provide wrappers around mbed TLS (ARM) that allow the libraries to connect with AWS IoT Platform.
+
+@subsection architecture_mqtt AWS IoT MQTT client
+
+The MQTT library included in this SDK is a modification of the [Paho C MQTT client](https://www.eclipse.org/paho/clients/c/). MQTT is a standardized publish subscribe protocol popular on embedded devices. AWS IoT supports the MQTT protocol for communication with devices. This MQTT library can be used standalone or with other AWS IoT services such as Thing Shadows or Jobs.
+
+@subsection architecture_shadow Thing Shadow
+
+This SDK provides a client implementation for [AWS IoT Thing Shadows](https://docs.aws.amazon.com/iot/latest/developerguide/iot-device-shadows.html). A device's Shadow is a JSON document that is used to store and retrieve its current state information in the cloud regardless of whether it is connected to the Internet.
+*/
diff --git a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/config/common b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/config/common
new file mode 100644
index 0000000..67181c4
--- /dev/null
+++ b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/config/common
@@ -0,0 +1,95 @@
+# SDK version.
+PROJECT_NUMBER = "3"
+
+# Doxygen layout file for libraries.
+LAYOUT_FILE = doc/config/layout_library.xml
+
+# Documentation output directory.
+OUTPUT_DIRECTORY = doc/output/
+
+# Don't generate LaTeX documentation
+GENERATE_LATEX = NO
+
+# Don't rearrange members in the input files.
+SORT_MEMBER_DOCS = NO
+
+# Silence output (warnings only).
+QUIET = YES
+
+# Configure Doxygen for C.
+OPTIMIZE_OUTPUT_FOR_C = YES
+TYPEDEF_HIDES_STRUCT = YES
+
+# Disable the tab bar and use treeview instead.
+DISABLE_INDEX = YES
+GENERATE_TREEVIEW = YES
+
+# All files should have unique names, so showing the full path is unnecessary.
+FULL_PATH_NAMES = NO
+
+# Disable the default Doxygen diagrams.
+HAVE_DOT = NO
+
+# Disable the default Doxygen search engine (for now).
+SEARCHENGINE = NO
+
+# Use custom header file, footer file, and stylesheet.
+HTML_HEADER = doc/config/html/header.html
+HTML_FOOTER = doc/config/html/footer.html
+HTML_EXTRA_STYLESHEET = doc/config/html/style.css
+
+# Don't show external pages or groups.
+EXTERNAL_GROUPS = NO
+EXTERNAL_PAGES = NO
+
+# Preprocessor defines.
+PREDEFINED = _ENABLE_THREAD_SUPPORT_
+
+# Alias for starting a dependencies section.
+ALIASES += dependencies{2}="@section \1_dependencies Dependencies^^@brief Dependencies of the \2.^^^^"
+
+# Alias for starting a configuration settings page.
+ALIASES += describeconfig="Configuration settings are C pre-processor constants. They can be set with a @c #`define` in the config file (`iot_config.h`) or by using a compiler option such as `-D` in gcc. If a configuration setting is not defined, the library will use a \"sensible\" default value (unless otherwise noted). Because they are compile-time constants, a library must be rebuilt if a configuration setting is changed."
+ALIASES += configpage{2}="@page \1_config Configuration^^@brief Configuration settings of the \2.^^^^@describeconfig^^@par configpagemarker"
+ALIASES += configpage{4}="@page \1_config \3 Configuration^^@brief Configuration settings of the \2.^^^^@describeconfig^^^^The settings on this page only affect the [\2](@ref \1). In addition to the settings on this page, them \2 will also be affected by [settings that affect all \4](@ref global_\4_config).^^@par configpagemarker"
+ALIASES += globalconfigpage{3}="@page global_\1_config Global \2 Configuration^^^^@describeconfig^^@brief Configuration settings that affect all \3.^^@par configpagemarker"
+
+# Aliases for "Possible values", "Recommended values", and "Default values"
+# used in configuration setting pages.
+ALIASES += configpossible="Possible values: "
+ALIASES += configrecommended="Recommended values: "
+ALIASES += configdefault="Default value (if undefined): "
+
+# Alias for starting a constants page.
+ALIASES += constantspage{2}="@page \1_constants Constants^^@brief Defined constants of the \2.^^^^Libraries may @c #`define` constants in their headers with special meanings. This page describes the meanings and uses of any constants defined by the \2. Related constants are shown in a single section on this page.^^"
+
+# Alias for starting a functions page.
+ALIASES += functionspage{2}="@page \1_functions Functions^^@brief Functions of the \2.^^^^The \2 consists of the following functions."
+ALIASES += functionspage{3}="@page \1_functions \3^^@brief Functions of the \2.^^^^The \2 consists of the following functions."
+
+# Alias for listing a single function on a functions page.
+ALIASES += functionname{1}="@subpage \1
^^ @copybrief \1^^"
+
+# Alias for creating a page for a single function.
+ALIASES += functionpage{3}="@page \2_function_\3 \1^^^^@snippet this declare_\2_\3^^@copydoc \1"
+
+# Alias for starting a handles group.
+ALIASES += handles{2}="@defgroup \1_datatypes_handles Handles^^@brief Opaque handles of the \2."
+
+# Alias for starting an enum group.
+ALIASES += enums{2}="@defgroup \1_datatypes_enums Enumerated types^^@brief Enumerated types of the \2."
+
+# Alias for starting a function pointers group.
+ALIASES += functionpointers{2}="@defgroup \1_datatypes_functionpointers Function pointers types^^@brief Function pointers types of the \2."
+
+# Alias for starting a structs group.
+ALIASES += structs{2}="@defgroup \1_datatypes_structs Structured types^^@brief Structured types of the \2."
+
+# Alias for starting a parameter structures group.
+ALIASES += paramstructs{2}="@defgroup \1_datatypes_paramstructs Parameter structures^^@brief Structures passed as parameters to [\2 functions](@ref \1_functions)^^^^These structures are passed as parameters to library functions. Documentation for these structures will state the functions associated with each parameter structure and the purpose of each member."
+
+# Alias for "Parameter for".
+ALIASES += paramfor="Parameter for: "
+
+# Alias for parameter structure initializers.
+ALIASES += initializer{2}="All instances of #\1 should be initialized with #\2.^^"
diff --git a/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/config/html/footer.html b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/config/html/footer.html
new file mode 100644
index 0000000..18c84eb
--- /dev/null
+++ b/examples/espidf-aws-iot/components/esp-aws-iot/aws-iot-device-sdk-embedded-C/doc/config/html/footer.html
@@ -0,0 +1,35 @@
+
+
+
+
+ $doxygenversion
+
+
+
+
+