An update on MQTT support

I have done a bit of work on the use_paho_linux_version branch of the MqttClient app. I have enabled TLS support for for server side certificates. What this means is that if you specify your URI as ssl://eu.airvantage.net:8883 instead of tcp://eu.airvantage.net:1883 your messages will be encrypted. I have only tested this with the AirVantage MQTT broker, but I would expect it to work for others as well.

Unfortunately, the ArduinoBridge app used on mangOH Green depends on the DataRouter app which depends on the API exposed by the master branch of MqttClient. This makes it difficult to promote the use_paho_linux_version branch to become master until the DataRouter can be updated. I think the DataRouter update requires quite a bit of work, so I don’t know when that will happen.

If you’re interested in contributing to the mangOH project and you want something small to start out on, take a look at trying to add support for “will” messages to the use_paho_linux_version branch of MqttClient.

Another small update…

I have updated the use_paho_linux_version branch of MqttClient to make use of the externalBuild feature in the Component.cdef. What this means is that it’s not longer necessary to run a separate command to build the paho library before trying to build the MqttClient app. Now mksys or mkapp will build it automatically.

seems like its not completely there doing a make green_wp85 however i can build and install it manually from the apps/MqttClient directory

make green_wp85
mksys -t wp85 -s /home/dingo/mangOH/apps/GpioExpander/gpioExpanderService mangOH_Green.sdef
** Warning: Ignoring empty app specification
** Warning: Ignoring empty app specification
** ERROR:
/home/dingo/mangOH/apps/MqttClient/mqttClientService/Component.cdef:11:8: error: Couldn’t find component ‘pahoLegatoComponent’.
Makefile:22: recipe for target ‘green_wp85’ failed
make: *** [green_wp85] Error 1

@dingo,

I forgot to mention that in order to make the system build, you will have to remove dataRouter from the system and add an entry to the Makefile. In the Makefile, you need to add -s $(MANGOH_ROOT)/apps/MqttClient in MKSYS_ARGS_COMMON so that mksys knows how to find the pahoLegatoComponent component.

so it appears not only do you need to remove DataRouter, but also anything that depends on it
ie… ArduinoTools and Dr… there should really be a way to do this without loosing functionalities

I mentioned that issue in the original post. Currently, I think the use_paho_linux_version is a better MQTT client, but it means that you can’t use the DataRouter and thus can’t use the ArduinoBridge.