# Is there a porting guide from older version (202002 and 201906) to the last one 202012?

**URL:** <https://forums.freertos.org/t/is-there-a-porting-guide-from-older-version-202002-and-201906-to-the-last-one-202012/11383>\
**Category:** AWS\
**Created:** [December 18, 2020, 3:29pm UTC](https://forums.freertos.org/t/is-there-a-porting-guide-from-older-version-202002-and-201906-to-the-last-one-202012/11383 "2020-12-18T15:29:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![MuneebAWS](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@MuneebAWS](https://forums.freertos.org/u/MuneebAWS)\
**Post date:** [December 18, 2020, 7:32pm UTC](https://forums.freertos.org/t/is-there-a-porting-guide-from-older-version-202002-and-201906-to-the-last-one-202012/11383/2 "2020-12-18T19:32:05Z")

</div>

Hi @EyalG,

We do not have a porting guide for the move to the current APIs, although we have included a [compatibility layer](https://github.com/aws/amazon-freertos/tree/master/libraries/c_sdk) to allow you to use the latest version with your current API calls.

For the move to the latest MQTT, I can provide some information on equivalent structures and functions for the move from the older MQTT API (v4 of the Embedded C SDK) to the current one:

## Removed Features:

- **Taskpool**  
Version 4 uses a taskpool for scheduling MQTT operations in the background. Version 202011.00 and subsequent releases do not spawn any threads and have no need for a taskpool.
- **Thread support**  
Version 4 relies on a platform’s threading capabilities for multi-threading use cases. Version 202011.00 and subsequent releases do not spawn any threads and therefore, do not require the use of a platform’s multithreading. If threading support or connection sharing is desired, please see our connection sharing demo for an example of using the MQTT library in a multithreaded environment.

## Data Types:

| Version 4 | Version 202011.00 and subsequent releases | Notes |
| --- | --- | --- |
| IotMqttQos\_t | MQTTQoS\_t | MQTT Quality of service. |
| IotMqttError\_t | MQTTStatus\_t | Return codes of API functions. |
| IotMqttConnection\_t | MQTTContext\_t | MQTT connection handle. |
| IotMqttPublishInfo\_t | MQTTPublishInfo\_t | Parameters of an MQTT publish. |
| IotMqttConnectInfo\_t | MQTTConnectInfo\_t | Parameters of an MQTT connect. |
| IotMqttSubscription\_t | _None_ | Version 202011.00 and subsequent releases leave subscription tracking to the application. |
| IotMqttPacketInfo\_t | MQTTPacketInfo\_t MQTTDeserializedInfo\_t | Deserialized MQTT Packet information. |
| IotMqttCallbackInfo\_t | MQTTEventCallback\_t | Function pointer of application callback to receive incoming data. |

## Functions:

| Version 4 | Version 202011.00 and subsequent releases | Notes |
| --- | --- | --- |
| IotMqtt\_Init | [MQTT\_Init](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#ae8444f3a85535e62cdb1ae9c192677d6) | In v4, this function initializes the entire library. In 202011.00 and subsequent releases, it initializes a single client. |
| IotMqtt\_Cleanup | _None_ | 202011.00 and subsequent releases does not allocate any memory and therefore, has nothing to free. |
| IotMqtt\_Connect | [MQTT\_Connect](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#aed1e4dc123a8ba79ac569cb17c69bfa0) | |
| IotMqtt\_PublishAsync IotMqtt\_PublishSync | [MQTT\_Publish](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#a1d8217e9d30fb2aed002060a8c97c63e) | From the perspective of the v4 library, all of version 202011.00’s publishes are asynchronous. To receive any expected acknowledgment packet, [MQTT\_ProcessLoop](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#adce9111350db412c1256689ef9a7b9f4) must be called. |
| IotMqtt\_SubscribeAsync IotMqtt\_SubscribeSync | [MQTT\_Subscribe](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#a567aa9c38726a7879f9cbf943e813e8f) | From the perspective of the v4 library, all of version 202011.00’s subscribe operations are asynchronous. To receive the acknowledgment packet, [MQTT\_ProcessLoop](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#adce9111350db412c1256689ef9a7b9f4) must be called. |
| IotMqtt\_UnsubscribeAsync IotMqtt\_UnsubscribeSync | [MQTT\_Unsubscribe](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#a77c911dbe24c5a51aaea88250895dba4) | From the perspective of the v4 library, all of version 202011.00’s unsubscribe operations are asynchronous. To receive the acknowledgment packet, [MQTT\_ProcessLoop](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#adce9111350db412c1256689ef9a7b9f4) must be called. |
| IotMqtt\_Disconnect | [MQTT\_Disconnect](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#ac79c366acbc3dddd88072d99ccb9140c) | |
| _None_ | [MQTT\_ProcessLoop](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#adce9111350db412c1256689ef9a7b9f4) | [MQTT\_ReceiveLoop](https://docs.aws.amazon.com/embedded-csdk/202012.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/core__mqtt_8c.html#a274d7a62c9c011a063031c2e678fb40a) is the equivalent function without any keep-alive mechanism. |

Let us know if you need any further assistance in migrating to the latest version

---

_[View the full topic](https://forums.freertos.org/t/is-there-a-porting-guide-from-older-version-202002-and-201906-to-the-last-one-202012/11383)._
