Hi,
I managed to compile the mqttClientService on legato 21.0
Once I run an app that tries to use the mqtt_api I see the following
Jan 11 21:55:34 fx30s user.info Legato: INFO | cloudcomm[5420]/cloudcomm T=main | cloudcomm.c _cloudcomm_COMPONENT_INIT() 441 | MQTT connection failed, retrying! error -6
Jan 11 21:56:34 fx30s user.info Legato: INFO | cloudcomm[5420]/cloudcomm T=main | cloudcomm.c _cloudcomm_COMPONENT_INIT() 422 | trying to connect ...
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | =========================================================
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | Trace Output
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | Product name: Eclipse Paho Synchronous MQTT C Client Library
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | Version: 1.3.0
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | Build level: Wed Jan 11 15:53:22 PST 2023
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | OpenSSL version: OpenSSL 1.1.1l 24 Aug 2021
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | OpenSSL flags: compiler: arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-securit
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | used-debug-types -fmacro-prefix-map= -fdebug-prefix-map= -fdebug-prefix-map= -fdebug-prefix-map= -DOPENSSL_USE_NODELETE -DOPENSSL
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | OpenSSL build timestamp: built on: Tue Aug 24 13:38:47 2021 UTC
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | OpenSSL platform: platform: linux-armv4
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | OpenSSL directory: OPENSSLDIR: "/usr/lib/ssl-1.1"
Jan 11 21:56:34 fx30s user.info Legato: INFO | mqttClientService[2938] | =========================================================
Jan 11 21:56:35 fx30s user.notice kernel: [ 1720.590988] audit: type=1400 audit(1673502995.697:18): lsm=SMACK fn=smack_inode_permission action=denied subject="app.mqttClient" object="admin" requested=x pid=2938 comm="mqttClientServi" name="ssl" dev="ubifs" ino=27476
Jan 11 21:56:36 fx30s user.notice kernel: [ 1721.592905] audit: type=1400 audit(1673502996.697:19): lsm=SMACK fn=smack_inode_permission action=denied subject="app.mqttClient" object="admin" requested=x pid=2938 comm="mqttClientServi" name="ssl" dev="ubifs" ino=27476
Jan 12 05:56:37 fx30s user.warn Legato: -WRN- | mqttClientService[2938]/mqttClientService T=main | mqttClientService.c mqtt_Connect() 405 | Socket error
Jan 11 21:56:37 fx30s user.info Legato: INFO | cloudcomm[5420]/cloudcomm T=main | cloudcomm.c _cloudcomm_COMPONENT_INIT() 441 | MQTT connection failed, retrying! error -6
cloudcomm is the app using mqtt.api
I verified that time is set properly on the device. I am using secure connection to connect to the broker.
Any ideas?