MDK-Packs / Paho_MQTT

CMSIS Software Pack generator adding and merging contributions not yet available in upstream repo.
3 stars 3 forks source link

Paho_MQTT with MBEDTLS #1

Open hmckinlay opened 2 years ago

hmckinlay commented 2 years ago

Hi,

To use MBEDTLS with this library you need to define MQTT_MBEDTLS.

If you do that then the software doesn't compile, it appears to be using the MBEDTLS network stack in mqttplatform.c. The pre-requisite software components seem to be the Keil network stack.

.\Objects\main.axf: Error: L6218E: Undefined symbol mbedtls_net_connect (referred from mqttplatform.o). .\Objects\main.axf: Error: L6218E: Undefined symbol mbedtls_net_free (referred from mqttplatform.o). .\Objects\main.axf: Error: L6218E: Undefined symbol mbedtls_net_init (referred from mqttplatform.o). .\Objects\main.axf: Error: L6218E: Undefined symbol mbedtls_net_recv_timeout (referred from mqttplatform.o). .\Objects\main.axf: Error: L6218E: Undefined symbol mbedtls_net_send (referred from mqttplatform.o). .\Objects\main.axf: Error: L6218E: Undefined symbol mbedtls_net_set_block (referred from mqttplatform.o).

Cheers, H.

RobertRostohar commented 2 years ago

Paho MQTT is a CMSIS pack which requires additional components from other packs.

MQTT Platform Network connectivity is ported to IoT Socket.

IoT Socket pack already provides implementations with:

You can take a look at fully functional demos for IoT clients here.

hmckinlay commented 2 years ago

Hey Robert,

Please see the 'Getting Started' documentation here -> https://github.com/MDK-Packs/Paho_MQTT/blob/master/contributions/add/doc/Paho_MQTT_MDK.md

If you follow these instructions, and enable mbedtls, the software does not compile, errors above.

Cheers, H.

RobertRostohar commented 2 years ago

Sorry for the longer response time.

There is no need to manually define MQTT_MBEDTLS. It is defined automatically in the MQTTPlatform.h when mbedTLS is selected and properly configured.

I have followed the steps in the mentioned 'Getting Started' documentation and the project compilers without errors.