Skip to content

Commit

Permalink
Upload mqtt 4.5.0.1636 [2455]
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlab-runner committed May 31, 2024
1 parent 342e501 commit 622abcd
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 11 deletions.
30 changes: 23 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ Some of the key features include:

- [PSoC™ 62S2 evaluation kit (CY8CEVAL-062S2-CYW43022CUB)](https://www.infineon.com/cms/en/product/evaluation-boards/cy8ceval-062s2/)

- [CYW955913EVK-01 Wi-Fi Bluetooth® Prototyping Kit (CYW955913EVK-01)](https://www.infineon.com/CYW955913EVK-01)

**Note:** Virtual APIs are supported on all PSoC 62 devices, but they have only been tested on the CY8CEVAL-062S2-MUR-43439M2 kit.

## Dependent libraries
Expand All @@ -98,7 +100,15 @@ To pull wifi-core-freertos-lwip-mbedtls and mqtt libraries create the following
- *mqtt.mtb:*
`https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X`

2. To use mqtt library with Ethernet kits on FreeRTOS, lwIP, and Mbed TLS combination, the application should pull [mqtt]( https:/Infineon/mqtt ) library and [ethernet-core-freertos-lwip-mbedtls]( https:/Infineon/ethernet-core-freertos-lwip-mbedtls ) library which will internally pull secure-sockets, ethernet-connection-manager, FreeRTOS, lwIP, Mbed TLS and other dependent modules.
2. To use mqtt library with CYW955913EVK-01 kit, the application should pull [mqtt]( https:/Infineon/mqtt ) library and [wifi-core-threadx-cat5]( https:/Infineon/wifi-core-threadx-cat5 ) library which will internally pull secure-sockets, wifi-connection-manager and other dependent modules.
To pull wifi-core-threadx-cat5 and mqtt libraries create the following *.mtb* files in deps folder.
- *wifi-core-threadx-cat5.mtb:*
`https:/Infineon/wifi-core-threadx-cat5#latest-v1.X#$$ASSET_REPO$$/wifi-core-threadx-cat5/latest-v1.X`

- *mqtt.mtb:*
`https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X`

3. To use mqtt library with Ethernet kits on FreeRTOS, lwIP, and Mbed TLS combination, the application should pull [mqtt]( https:/Infineon/mqtt ) library and [ethernet-core-freertos-lwip-mbedtls]( https:/Infineon/ethernet-core-freertos-lwip-mbedtls ) library which will internally pull secure-sockets, ethernet-connection-manager, FreeRTOS, lwIP, Mbed TLS and other dependent modules.
To pull ethernet-core-freertos-lwip-mbedtls and mqtt libraries create the following *.mtb* files in deps folder.
- *ethernet-core-freertos-lwip-mbedtls.mtb:*
`https:/Infineon/ethernet-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/ethernet-core-freertos-lwip-mbedtls/latest-v1.X`
Expand All @@ -108,13 +118,13 @@ To pull ethernet-core-freertos-lwip-mbedtls and mqtt libraries create the follow
- *mqtt.mtb:*
`https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X`

3. Ensure that the application includes *./include/cy_mqtt_api.h* to use the library APIs and structure.
4. Ensure that the application includes *./include/cy_mqtt_api.h* to use the library APIs and structure.

4. The referenced file *./include/core_mqtt_config.h* that is bundled with this library provides the default configurations required for the [AWS IoT device SDK](https:/aws/aws-iot-device-sdk-embedded-C/tree/202103.00) library.
5. The referenced file *./include/core_mqtt_config.h* that is bundled with this library provides the default configurations required for the [AWS IoT device SDK](https:/aws/aws-iot-device-sdk-embedded-C/tree/202103.00) library.

5. By default, [AWS IoT device SDK](https:/aws/aws-iot-device-sdk-embedded-C/tree/202103.00) library logging is turned off. To enable log messages, map the logging-related macros `LogError`, `LogWarn`, `LogInfo`, and `LogDebug` in *./include/core_mqtt_config.h* to the application-specific logging implementation.
6. By default, [AWS IoT device SDK](https:/aws/aws-iot-device-sdk-embedded-C/tree/202103.00) library logging is turned off. To enable log messages, map the logging-related macros `LogError`, `LogWarn`, `LogInfo`, and `LogDebug` in *./include/core_mqtt_config.h* to the application-specific logging implementation.

6. Copy core_mqtt_config.h from *./include* folder to the top-level code example directory and modify following macros with values to suit the use case and network conditions:
7. Copy core_mqtt_config.h from *./include* folder to the top-level code example directory and modify following macros with values to suit the use case and network conditions:

Macro | Description |
------|-------------|
Expand All @@ -133,16 +143,22 @@ To pull ethernet-core-freertos-lwip-mbedtls and mqtt libraries create the follow

**Note:** It is important to note that having the `MQTT_RECV_POLLING_TIMEOUT_MS` timeout as too short will result in MQTT being disconnected due to the possibility of partial data being received. If you have small TCP buffers and a high-latency network, the optimum value for the timeout can be surprisingly long. In such cases, the optimum value for timeout can be better determined based on experimenting the MQTT applications with payloads bigger than the TCP buffer. See [AWS coreMQTT documentation](https://docs.aws.amazon.com/embedded-csdk/202103.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/mqtt_timeouts.html#mqtt_timeouts_receive_polling) for more details.<br>

7. Review and make the required changes to the pre-defined configuration files.
8. Review and make the required changes to the pre-defined configuration files.

The configuration files are bundled with the wifi-mw-core library for FreeRTOS, lwIP, and Mbed TLS. See [README.md]( https:/Infineon/wifi-mw-core/blob/master/README.md ) for details.

If the application uses the bundle library, the configuration files are in the bundle library. For example, if the application uses the **Wi-Fi core freertos lwip mbedtls bundle library**, the configuration files are in the *wifi-core-freertos-lwip-mbedtls/configs* folder. Similarly, if the application uses the **Ethernet Core FreeRTOS lwIP mbedtls library**, the configuration files are in the *ethernet-core-freertos-lwip-mbedtls/configs* folder.

**Note:** Configuration file changes are not required for CYW955913EVK-01.

8. Define the following COMPONENTS in the application's Makefile for the Azure port library.
```
COMPONENTS=FREERTOS MBEDTLS LWIP SECURE_SOCKETS
```
**Note:** For CYW955913EVK-01 only the following COMPONENTS are required.
```
COMPONENTS=SECURE_SOCKETS
```

9. The 'aws-iot-device-sdk-port' layer includes the 'coreHTTP' and 'coreMQTT' modules of the 'aws-iot-device-sdk-embedded-C' library by default. If the user application does not use HTTP client features, update the application Makefile to exclude the coreHTTP source files from the build. The Makefile entry should look like as follows:
```
Expand Down Expand Up @@ -293,4 +309,4 @@ Do the following to establish a connection with the broker using credentials sto

- [AWS-IoT device SDK library]( https:/aws/aws-iot-device-sdk-embedded-C/tree/202103.00 )

- [ModusToolbox&trade; code examples]( https:/Infineon?q=mtb-example-anycloud%20NOT%20Deprecated )
- [ModusToolbox&trade; code examples]( https:/Infineon/Code-Examples-for-ModusToolbox-Software )
4 changes: 4 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ See the [README.md](./README.md) for a complete description of the MQTT client l

## Changelog

### v4.5.0

- Added support for CYW955913EVK-01 kit

### v4.4.0

- Added new APIs to start and stop MQTT keep-alive, and to get the socket handle associated with MQTT connection.
Expand Down
15 changes: 12 additions & 3 deletions docs/api_reference_manual/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ <h1><a class="anchor" id="section_platforms"></a>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc72_evk/">XMC7200D-E272K8384 kit (KIT-XMC72-EVK)</a></li>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/kit_xmc72_evk/">XMC7200D-E272K8384 kit (KIT_XMC72_EVK_MUR_43439M2)</a></li>
<li><a href="https://www.infineon.com/cms/en/product/evaluation-boards/cy8ceval-062s2/">PSoC&trade; 62S2 evaluation kit (CY8CEVAL-062S2-CYW43022CUB)</a></li>
<li><a href="https://www.infineon.com/CYW955913EVK-01">CYW955913EVK-01 Wi-Fi Bluetooth&reg; Prototyping Kit (CYW955913EVK-01)</a></li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Virtual APIs are supported on all PSoC 62 devices, but they have only been tested on the CY8CEVAL-062S2-MUR-43439M2 kit.</dd></dl>
<h1><a class="anchor" id="section_dependencies"></a>
Expand All @@ -154,6 +155,11 @@ <h1><a class="anchor" id="section_quick_start"></a>
<li>mqtt.mtb: <a href="https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X">https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X</a></li>
</ul>
</li>
<li>To use mqtt library with CYW955913EVK-01 kit, the application should pull <a href="https:/Infineon/mqtt">mqtt</a> library and <a href="https:/Infineon/wifi-core-threadx-cat5">wifi-core-threadx-cat5</a> library which will internally pull secure-sockets, wifi-connection-manager and other dependent modules. To pull wifi-core-threadx-cat5 and mqtt libraries create the following *.mtb* files in deps folder.<ul>
<li>wifi-core-threadx-cat5.mtb: <a href="https:/Infineon/wifi-core-threadx-cat5#latest-v1.X#$$ASSET_REPO$$/wifi-core-threadx-cat5/latest-v1.X">https:/Infineon/wifi-core-threadx-cat5#latest-v1.X#$$ASSET_REPO$$/wifi-core-threadx-cat5/latest-v1.X</a></li>
<li>mqtt.mtb: <a href="https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X">https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X</a></li>
</ul>
</li>
<li>To use mqtt library with Ethernet kits on FreeRTOS, lwIP, and Mbed TLS combination, the application should pull <a href="https:/Infineon/mqtt">mqtt</a> library and <a href="https:/Infineon/ethernet-core-freertos-lwip-mbedtls">ethernet-core-freertos-lwip-mbedtls</a> library which will internally pull secure-sockets, ethernet-connection-manager, FreeRTOS, lwIP, Mbed TLS and other dependent modules. To pull ethernet-core-freertos-lwip-mbedtls and mqtt libraries create the following <em>.mtb</em> files in deps folder.<ul>
<li>ethernet-core-freertos-lwip-mbedtls.mtb: <a href="https:/Infineon/ethernet-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/ethernet-core-freertos-lwip-mbedtls/latest-v1.X">https:/Infineon/ethernet-core-freertos-lwip-mbedtls#latest-v1.X#$$ASSET_REPO$$/ethernet-core-freertos-lwip-mbedtls/latest-v1.X</a></li>
<li>mqtt.mtb: <a href="https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X">https:/Infineon/mqtt#latest-v4.X#$$ASSET_REPO$$/mqtt/latest-v4.X</a></li>
Expand Down Expand Up @@ -195,11 +201,14 @@ <h1><a class="anchor" id="section_quick_start"></a>
<li>This MQTT Client library does not support secure connections to the public <code>test.mosquitto.org</code> broker by default. This is because the server uses the SHA1 hashing algorithm. As cautioned by Mbed TLS, SHA-1 is considered a weak message digest and is therefore not enabled in Mbed TLS by default. The use of SHA-1 for certificate signing constitutes a security risk. It is recommended to avoid dependencies on it, and consider stronger message digests instead.</li>
<li>Review and make the required changes to the pre-defined configuration files.<ul>
<li>The configuration files are bundled with the wifi-mw-core library for FreeRTOS, lwIP, and Mbed TLS. See <a href="https:/Infineon/wifi-mw-core/blob/master/README.md">README.md</a> for more details.</li>
<li>If the application uses the bundle library, the configuration files are in the bundle library. For example, if the application uses the <em>Wi-Fi core FreeRTOS lwIP Mbed TLS bundle library</em>, the configuration files are in the <em>wifi-core-freertos-lwip-mbedtls/configs</em> folder. Similarly, if the application uses the <em>Ethernet Core FreeRTOS lwIP Mbed TLS library</em>, the configuration files are in the <em>ethernet-core-freertos-lwip-mbedtls/configs</em> folder.</li>
<li>If the application uses the bundle library, the configuration files are in the bundle library. For example, if the application uses the <em>Wi-Fi core FreeRTOS lwIP Mbed TLS bundle library</em>, the configuration files are in the <em>wifi-core-freertos-lwip-mbedtls/configs</em> folder. Similarly, if the application uses the <em>Ethernet Core FreeRTOS lwIP Mbed TLS library</em>, the configuration files are in the <em>ethernet-core-freertos-lwip-mbedtls/configs</em> folder. <dl class="section note"><dt>Note</dt><dd>Configuration file changes are not required for CYW955913EVK-01.</dd></dl>
</li>
</ul>
</li>
<li>Define the following COMPONENTS in the application's Makefile for the MQTT library. <div class="fragment"><div class="line">COMPONENTS=FREERTOS MBEDTLS LWIP SECURE_SOCKETS</div>
</div><!-- fragment --></li>
<li><p class="startli">Define the following COMPONENTS in the application's Makefile for the MQTT library. </p><div class="fragment"><div class="line">COMPONENTS=FREERTOS MBEDTLS LWIP SECURE_SOCKETS</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>For CYW955913EVK-01 only the following COMPONENTS are required. <div class="fragment"><div class="line">COMPONENTS=SECURE_SOCKETS</div>
</div><!-- fragment --></dd></dl>
</li>
<li>The "aws-iot-device-sdk-port" layer includes the "coreHTTP" and "coreMQTT" modules of the "aws-iot-device-sdk-embedded-C" library by default. If the user application doesn't use HTTP client features, update the application Makefile to exclude the coreHTTP source files from the build. The Makefile entry should look like the following: <div class="fragment"><div class="line">CY_IGNORE+= $(SEARCH_aws-iot-device-sdk-embedded-C)/libraries/standard/coreHTTP</div>
</div><!-- fragment --></li>
<li>The MQTT library is supported on multiple platforms. When it is used on secured platforms such as CY8CKIT-064S0S2-4343W, the macros <code>CY_TFM_PSA_SUPPORTED</code> and <code>TFM_MULTI_CORE_NS_OS</code> need to be defined in the application Makefile. The Makefile entry should look like the following: <div class="fragment"><div class="line">DEFINES += CY_TFM_PSA_SUPPORTED TFM_MULTI_CORE_NS_OS</div>
Expand Down
2 changes: 1 addition & 1 deletion version.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<version>4.4.0.1625</version>
<version>4.5.0.1636</version>

0 comments on commit 622abcd

Please sign in to comment.