Hi Niladri,
Good to know it worked for you.
I am also attempting something similar but with openssl.
Are you also using openssl ?
If so any feedback how that can be done ?
Regards.
CKV
Hi Niladri,
Good to know it worked for you.
I am also attempting something similar but with openssl.
Are you also using openssl ?
If so any feedback how that can be done ?
Regards.
CKV
Iâm pretty sure that SSL wonât work yet. There was an âSSL optionsâ parameter to one of the functions of paho.mqtt.c which is just being passed as NULL for now. SSL support is on the TODO list, but I donât know when it will be implemented.
Hi CKV,
openssl, I am not tired yet. Working on the same and will update soon.
@David, I am using âle_data_interfaceâ to invoke the data connection service in MqttClient code and it is working fine.
Thanks
Hi,
Pull the latest commit (c40f807248fdb5adb6b3636c7746aa472fef0e5b)
I am not able to compile this, there are undeclared variables mqtt_SessionRef_t, mqtt_Qos_t.
I canât find definition in any headers of them.
David, can you please let me how to fix this?
Thanks!
ninja explain: _build_mqttClient/wp85/app/mqttClient/staging/info.properties is dirty
[1/11] /home/ytsai/legato/packages/legato.toolchain.1.7.3.SWI9X15Y_07120900-wp85-wp750x-native-x86_64-201705021320/resources/native/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -MMD -MF _build_mqttClient/wp85/app/mqttClient/obj/mqttClientService/_main.c.o.d -c _build_mqttClient/wp85/app/mqttClient/src/mqttClientService/_main.c -o _build_mqttClient/wp85/app/mqttClient/obj/mqttClientService/_main.c.o -DLE_FILENAME=basename _build_mqttClient/wp85/app/mqttClient/src/mqttClientService/_main.c
-Wall -fPIC -Werror -fvisibility=hidden -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/framework/c/inc -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/apps/MqttClientPaho -DLE_COMPONENT_NAME=mqttClientService_exe -DLE_LOG_SESSION=mqttClientService_exe_LogSession -DLE_LOG_LEVEL_FILTER_PTR=mqttClientService_exe_LogLevelFilterPtr
[2/11] /home/ytsai/legato/packages/legato.toolchain.1.7.3.SWI9X15Y_07120900-wp85-wp750x-native-x86_64-201705021320/resources/native/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -MMD -MF _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/obj/_componentMain.c.o.d -c _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/src/_componentMain.c -o _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/obj/_componentMain.c.o -DLE_FILENAME=basename _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/src/_componentMain.c
-Wall -fPIC -Werror -fvisibility=hidden -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/framework/c/inc -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/apps/MqttClientPaho -I./_build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/src -I./_build_mqttClient/wp85/api/bc276ed8773930165a03f7afbdac6287/server -DLE_COMPONENT_NAME=mqttClientService -DLE_LOG_SESSION=mqttClientService_LogSession -DLE_LOG_LEVEL_FILTER_PTR=mqttClientService_LogLevelFilterPtr â-DCOMPONENT_INIT=LE_CI_LINKAGE LE_SHARED void _mqttClientService_COMPONENT_INIT()â
[3/11] /home/ytsai/legato/packages/legato.toolchain.1.7.3.SWI9X15Y_07120900-wp85-wp750x-native-x86_64-201705021320/resources/native/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -MMD -MF _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/obj/2b93a1ed74f8291a91f1c528918ff9eb.o.d -c /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c -o _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/obj/2b93a1ed74f8291a91f1c528918ff9eb.o -DLE_FILENAME=basename /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c
-Wall -fPIC -Werror -fvisibility=hidden -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/framework/c/inc -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/apps/MqttClientPaho -I./_build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/src -I./_build_mqttClient/wp85/api/bc276ed8773930165a03f7afbdac6287/server -DLE_COMPONENT_NAME=mqttClientService -DLE_LOG_SESSION=mqttClientService_LogSession -DLE_LOG_LEVEL_FILTER_PTR=mqttClientService_LogLevelFilterPtr â-DCOMPONENT_INIT=LE_CI_LINKAGE LE_SHARED void _mqttClientService_COMPONENT_INIT()â -std=c99 -I/work/legato/legato-16.10.3/apps/MqttClientPaho/âŚ/âŚ/apps/MqttClient/paho.mqtt.c/src
[4/11] cp -T /work/legato/legato-16.10.3/apps/MqttClientPaho/paho.mqtt.c/build/output/libpaho-mqtt3cs.so _build_mqttClient/wp85/app/mqttClient/staging/read-only/lib/libpaho-mqtt3cs.so && chmod u+rw,g+rw,o+r-w _build_mqttClient/wp85/app/mqttClient/staging/read-only/lib/libpaho-mqtt3cs.so
[5/11] cp -T /work/legato/legato-16.10.3/apps/MqttClientPaho/paho.mqtt.c/build/output/libpaho-mqtt3cs.so.1 _build_mqttClient/wp85/app/mqttClient/staging/read-only/lib/libpaho-mqtt3cs.so.1 && chmod u+rw,g+rw,o+r-w _build_mqttClient/wp85/app/mqttClient/staging/read-only/lib/libpaho-mqtt3cs.so.1
[6/11] cp -T /work/legato/legato-16.10.3/apps/MqttClientPaho/paho.mqtt.c/build/output/libpaho-mqtt3cs.so.1.0 _build_mqttClient/wp85/app/mqttClient/staging/read-only/lib/libpaho-mqtt3cs.so.1.0 && chmod u+rw,g+rw,o+r-w _build_mqttClient/wp85/app/mqttClient/staging/read-only/lib/libpaho-mqtt3cs.so.1.0
FAILED: /home/ytsai/legato/packages/legato.toolchain.1.7.3.SWI9X15Y_07120900-wp85-wp750x-native-x86_64-201705021320/resources/native/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -MMD -MF _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/obj/2b93a1ed74f8291a91f1c528918ff9eb.o.d -c /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c -o _build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/obj/2b93a1ed74f8291a91f1c528918ff9eb.o -DLE_FILENAME=basename /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c
-Wall -fPIC -Werror -fvisibility=hidden -DMK_TOOLS_BUILD -DLEGATO_EMBEDDED -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/framework/c/inc -I/work/legato/legato-16.10.3/interfaces -I/work/legato/legato-16.10.3/apps/MqttClientPaho -I./_build_mqttClient/wp85/component/c5d02082d74530e3ed9078fb894b91f5/src -I./_build_mqttClient/wp85/api/bc276ed8773930165a03f7afbdac6287/server -DLE_COMPONENT_NAME=mqttClientService -DLE_LOG_SESSION=mqttClientService_LogSession -DLE_LOG_LEVEL_FILTER_PTR=mqttClientService_LogLevelFilterPtr â-DCOMPONENT_INIT=LE_CI_LINKAGE LE_SHARED void _mqttClientService_COMPONENT_INIT()â -std=c99 -I/work/legato/legato-16.10.3/apps/MqttClientPaho/âŚ/âŚ/apps/MqttClient/paho.mqtt.c/src
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:11:5: error: unknown type name 'mqtt_MessageArrivedHandlerFunc_tâ
mqtt_MessageArrivedHandlerFunc_t messageArrivedHandler;
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:13:5: error: unknown type name 'mqtt_ConnectionLostHandlerFunc_tâ
mqtt_ConnectionLostHandlerFunc_t connectionLostHandler;
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:19:32: error: unknown type name 'mqtt_Qos_tâ
static int mqtt_QosEnumToValue(mqtt_Qos_t qos);
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:59:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session;
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:90:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t* session ///< [OUT] The created session if the return result is LE_OK
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:137:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session ///< Session to destroy
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:173:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session, ///< [IN] Session to set connection options in
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:259:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:317:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:369:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:373:5: error: unknown type name 'mqtt_Qos_tâ
mqtt_Qos_t qos,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:415:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:417:5: error: unknown type name 'mqtt_Qos_tâ
mqtt_Qos_t qos
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:453:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:491:1: error: unknown type name 'mqtt_ConnectionLostHandlerRef_tâ
mqtt_ConnectionLostHandlerRef_t mqtt_AddConnectionLostHandler
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:493:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:494:5: error: unknown type name 'mqtt_ConnectionLostHandlerFunc_tâ
mqtt_ConnectionLostHandlerFunc_t handler,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:531:5: error: unknown type name 'mqtt_ConnectionLostHandlerRef_tâ
mqtt_ConnectionLostHandlerRef_t handler
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:561:1: error: unknown type name 'mqtt_MessageArrivedHandlerRef_tâ
mqtt_MessageArrivedHandlerRef_t mqtt_AddMessageArrivedHandler
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:563:5: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t session,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:564:5: error: unknown type name 'mqtt_MessageArrivedHandlerFunc_tâ
mqtt_MessageArrivedHandlerFunc_t handler,
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:601:5: error: unknown type name 'mqtt_MessageArrivedHandlerRef_tâ
mqtt_MessageArrivedHandlerRef_t handler
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:632:5: error: unknown type name 'mqtt_Qos_tâ
mqtt_Qos_t qos ///< The QoS enum value to convert.
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c: In function âconnectionLostEventHandlerâ:
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:689:34: error: comparison between pointer and integer [-Werror]
if (s->connectionLostHandler != NULL)
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:691:9: error: called object is not a function or function pointer
s->connectionLostHandler(s->connectionLostHandlerContext);
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c: In function âmqtt_MessageArrivedHandlerâ:
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:725:24: error: assignment makes integer from pointer without a cast [-Werror]
storedMsg->session = context;
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c: In function âmessageReceivedEventHandlerâ:
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:756:23: error: passing argument 2 of âle_ref_Lookupâ makes pointer from integer without a cast [-Werror]
mqtt_Session* s = le_ref_Lookup(SessionRefMap, storedMsg->session);
^
In file included from /work/legato/legato-16.10.3/framework/c/inc/legato.h:194:0,
from /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:1:
/work/legato/legato-16.10.3/framework/c/inc/le_safeRef.h:242:7: note: expected 'void â but argument is of type 'intâ
void le_ref_Lookup
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:759:9: error: format â%pâ expects argument of type âvoid *â, but argument 8 has type âintâ [-Werror=format=]
LE_WARN(âSession lookup failed for session=0x%pâ, storedMsg->session);
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:763:34: error: comparison between pointer and integer [-Werror]
if (s->messageArrivedHandler != NULL)
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:765:39: error: âMQTT_MAX_TOPIC_LENGTHâ undeclared (first use in this function)
if (storedMsg->topicLength <= MQTT_MAX_TOPIC_LENGTH &&
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:765:39: note: each undeclared identifier is reported only once for each function it appears in
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:766:41: error: âMQTT_MAX_PAYLOAD_LENGTHâ undeclared (first use in this function)
storedMsg->payloadLength <= MQTT_MAX_PAYLOAD_LENGTH)
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:768:13: error: called object is not a function or function pointer
s->messageArrivedHandler(
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c: In function âDestroyAllOwnedSessionsâ:
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:802:9: error: unknown type name 'mqtt_SessionRef_tâ
mqtt_SessionRef_t sRef = (mqtt_SessionRef_t)(le_ref_GetSafeRef(it));
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:802:35: error: âmqtt_SessionRef_tâ undeclared (first use in this function)
mqtt_SessionRef_t sRef = (mqtt_SessionRef_t)(le_ref_GetSafeRef(it));
^
In file included from /work/legato/legato-16.10.3/framework/c/inc/legato.h:189:0,
from /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:1:
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:803:24: error: comparison between pointer and integer [-Werror]
LE_ASSERT(sRef != NULL);
^
/work/legato/legato-16.10.3/framework/c/inc/le_log.h:563:15: note: in definition of macro 'LE_ASSERTâ
if (!(condition)) { LE_FATAL(âAssert Failed: â%sââ, #condition) }
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:809:13: error: passing argument 2 of âle_ref_DeleteRefâ makes pointer from integer without a cast [-Werror]
le_ref_DeleteRef(SessionRefMap, sRef);
^
In file included from /work/legato/legato-16.10.3/framework/c/inc/legato.h:194:0,
from /work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:1:
/work/legato/legato-16.10.3/framework/c/inc/le_safeRef.h:254:6: note: expected âvoid *â but argument is of type 'intâ
void le_ref_DeleteRef
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c: At top level:
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:665:13: error: âmqtt_ConnectionLostHandlerâ defined but not used [-Werror=unused-function]
static void mqtt_ConnectionLostHandler
^
/work/legato/legato-16.10.3/apps/MqttClientPaho/mqttClientService/mqttClientService.c:706:12: error: âmqtt_MessageArrivedHandlerâ defined but not used [-Werror=unused-function]
static int mqtt_MessageArrivedHandler
^
cc1: all warnings being treated as errors
ninja: build stopped: subcommand failed.
Makefile:9: recipe for target âwp85â failed
make: *** [wp85] Error 1
Iâm not sure of the cause of the exact problem youâre having. I just pushed an update which updates the paho.mqtt.c
to the recently released v1.2.0. Also, is there a reason why youâre building against Legato 16.10.3 rather than 17.06.0 or 17.05.0?
I update to Legato 17.0.6, and pulled the latest - now itâs compiling fine.
Thanks David!
I am trying to get this to run. I built the paho.mqtt.c and while trying to make the application, I am getting the following error:
mangoh@mangoh-virtualbox:~/MqttClient$ make
export TARGET=wp85 ; \
mkapp -v -t wp85 -i /home/mangoh/legato/packages/legato.framework.17.6.0.wp85-wp750x-201707120855/resources/legato/interfaces \
mqttClient.adef
Command-line arguments from previous run not found.
Parsing file: '/home/mangoh/MqttClient/mqttClient.adef'.
Modelling application: 'mqttClient'
defined in '/home/mangoh/MqttClient/mqttClient.adef'
Application 'mqttClient' contains executable 'mqttClientService'.
Parsing file: '/home/mangoh/MqttClient/mqttClientService/Component.cdef'.
Modelling component: 'mqttClientService'
found at: '/home/mangoh/MqttClient/mqttClientService'
** ERROR:
/home/mangoh/MqttClient/mqttClientService/Component.cdef:30:8: error: Couldn't find file '$MANGOH_ROOT/apps/MqttClient/mqtt.api'.
Makefile:9: recipe for target 'wp85' failed
make: *** [wp85] Error 1
Please help me figure this out!
run echo $MANGOH_ROOT
in the terminal where you are trying to build. If nothing is shown, then do export MANGOH_ROOT=/path/to/your/mangOH_folder
Oh I totally missed setting that up. But now I am getting another error:
/home/mangoh/MqttClient/mqttClientService/mqttClientService.c:4:24: fatal error: MQTTClient.h: No such file or directory
#include âMQTTClient.hâ
^
compilation terminated.
ninja: build stopped: subcommand failed.
Makefile:9: recipe for target âwp85â failed
make: *** [wp85] Error 1
Hi,
I am testing MQTTClient application on wp8548 board, I have successfully compiled the application âMQTTClientâ using legato framework. But when i run the âtestSubscriberâ application it doesnât produce any output(even printf inside COMPONENT_INIT function not producing any output on console). I also changed the mqtt broker URI to local address â127.0.0.1:1883â as there is mosquitto broker running under linux environment. Do i need to make any extra changes?
Hi dfrey, I have wp7502 and when I cd into the MqttClient folder and type make I got
âŚ
missing and no known rule to make it
Makefile:9: recipe for target âwp85â failed
make: *** [wp85] Error 1
Can you help me out?
I encountered same error. Did you figure it out?
I have fixed the MqttClient Makefile, so you should be able to do make wp85
, make wp750x
or make wp76xx
now depending on your module.
I manage to make this now but I can not get it to work
my MQTT broker url is in this form
iot.example.ee:1883
Question 1: Is this line correct?
const char mqttBrokerURI[] = âtcp://iot.example.ee:1883â;
I have to use 32 characters long username and password for example ad3b32a228dbd491c9e30cd954f742b9
Question 2: Is this line correct?
char username[] = âad3b32a228dbd491c9e30cd954f742b9â
Question 3: Is this password line correct? Whatâs the deal with uint8_t?
const uint8_t mqttPassword[] = â1c9e30cd954ad3b32a228dbd49f742b9â
Question 4: I found this comment from code: // paho uses null terminated strings for passwords, so the password may not contain any embedded null characters. What?
Hi @dfrey,
I am getting the below error when I try to start the mqttclient on the target.
tc/ssl/certs/fc5a8f99.0â to â/legato/systems/current/appsWriteable/mqttClient/etc/ssl/certs/fc5a8f99.0â: Already exists
Jan 6 02:24:12 swi-mdm9x28 user.info Legato: INFO | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1518 | Skipping file link â/etc/ssl/certs/fcac10e3.0â to â/legato/systems/current/appsWriteable/mqttClient/etc/ssl/certs/fcac10e3.0â: Already exists
Jan 6 02:24:12 swi-mdm9x28 user.info Legato: INFO | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1518 | Skipping file link â/etc/ssl/certs/thawte_Primary_Root_CA.pemâ to '/legato/systems/current/appsWriteable/mqttClient/etc/ssl/certs/thawte_Primary_Root_CA.
Jan 6 02:24:12 swi-mdm9x28 user.info Legato: INFO | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1518 | Skipping file link â/etc/ssl/certs/thawte_Primary_Root_CA_-G2.pemâ to '/legato/systems/current/appsWriteable/mqttClient/etc/ssl/certs/thawte_Primary_Roo
Jan 6 02:24:12 swi-mdm9x28 user.info Legato: INFO | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1518 | Skipping file link '/etc/ssl/certs/thawte_Primary_Root_CA-_G3.pemâ to '/legato/systems/current/appsWriteable/mqttClient/etc/ssl/certs/thawte_Primary_Roo
Jan 6 02:24:12 swi-mdm9x28 user.info Legato: INFO | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1518 | Skipping file link â/etc/ssl/openssl.cnfâ to â/legato/systems/current/appsWriteable/mqttClient/etc/ssl/openssl.cnfâ: Already exists
Jan 6 02:24:12 swi-mdm9x28 user.err Legato: =ERR= | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1490 | Could not stat file at â/lib/libcrypto.soâ. No such file or directory
Jan 6 02:24:12 swi-mdm9x28 user.err Legato: =ERR= | supervisor[693]/supervisor T=main | app.c CreateFileLink() 1593 | Failed to create link at â/lib/libcrypto.soâ in app âmqttClientâ.
Jan 6 02:24:12 swi-mdm9x28 user.info Legato: INFO | supervisor[693]/supervisor T=main | supervisor.c SigChildHandler() 781 | Reaping unconfigured child process 21960.
Could you let me know what is that I am doing wrong while building?
I feel I am missing something.
Kindly help.
Regards,
Devaiah
I have resolved this issue. It was due to library files location mismatch.
Hi @dfrey,
I get the error when I try to do the following:
cd pahoLegatoComponent/paho.mqtt.c/
make
This is done successfully
cd âŚ/âŚ
make wp77xx
I got an error:
FAILED: /opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y22-ext/sysroots/armv7a-neon-poky-linux-gnueabi -shared -o _build_mqttClient/wp77xx/staging/read-only/lib/libComponent_mqttClientService.so _build_mqttClient/wp77xx/component/c68a67c59d0d9427ebfaeb66c716ec6d/obj/d91f3c57118e9824ef30cf38b7727fd3.o _build_mqttClient/wp77xx/api/ee9abd22411f054b6f4b528e1cd87b2b/server/mqtt_server.o _build_mqttClient/wp77xx/component/c68a67c59d0d9427ebfaeb66c716ec6d/obj/_componentMain.c.o -lpaho-mqtt3cs -lpaho-mqtt3cs -lpaho-mqtt3cs -L/home/artem/legato/workspace/git/MqttClient/âŚ/âŚ/apps/MqttClient/pahoLegatoComponent/paho.mqtt.c/build/output -L_build_mqttClient/wp77xx/staging/read-only/lib -Wl,âenable-new-dtags,-rpath="$ORIGIN/âŚ/lib" â-L_build_mqttClient/wp77xx/component/d3833d982d14c8cf018567f6ade2027câ â-L$LEGATO_BUILD/framework/libâ -llegato -lpthread -lrt -lm
/opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/6.2.0/real-ld: cannot find -lpaho-mqtt3cs
/opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/6.2.0/real-ld: cannot find -lpaho-mqtt3cs
/opt/swi/y22-ext/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/6.2.0/real-ld: cannot find -lpaho-mqtt3cs
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Makefile: 9: failed to execute the recipe for the target âwp77xxâ
make: *** [wp77xx] Error 1
Please help
So far I decided to do this:
sudo mv build/output/lib* /opt/swi/y22-ext/sysroots/armv7a-neon-poky-linux-gnueabi/lib/
I do not know if this is correct, but the command âmake wp7702â was successful
Iâm not sure what the exact problem is that you encountered, but I just pushed an update to the use_paho_linux_version
branch which substantially changes the way the app is built. Update to the latest commit and give it another try. Let me know if youâre still stuck.