Hi,
New on the forum and relatively new to MBED. I’ve been working with a Nucleeo-H743ZI2 and mbed-os-example-pelion project. Alongside the lwM2M that pelion uses I would like to get mqtt going. To begin with I set up a broker on Hive MQ and used their web and CLI tools to publish and subscribe to data.
I’ve not been able to work out how to get my on-board debugger or segger to work on my target, so I figured it might be easier to do the learning on Linux, so I then checked out the Paho code and got the Linux examples building and publishing data to my Broker on Hive MQ. Once i had this working I was expecting it to be a case of replicating within MBED studio, but I am struggling a little.
The HelloMQTT example is quite old now and doesn’t build out the box, I had a bit of a go at fixing this but, felt like I was spending too much time getting something “old” working. I decdided to imported the mbed-mqtt library from https://github.com/ARMmbed/mbed-mqt into my MBED Studio mbed-os-example-pelion project and then tried to replicate the main.cpp functionality from. HelloMQTT.
Best example(IMO) is this one.
I needed to make a minor change to the init code to make it build as the
ret = socket->connect(MQTT_SERVER_HOST_NAME, MQTT_SERVER_PORT);
to
const SocketAddress sa = {MQTT_SERVER_HOST_NAME,MQTT_SERVER_PORT};
ret = socket->connect(sa);
But at runtime, this is failing
ret = socket->set_root_ca_cert(SSL_CA_PEM); with -3003(NSAPI_ERROR_PARAMETER)
Anyone got and idea’s what the issue might be?
Thanks In Advance
D