Develop application sending data to Air Vantage with Legato using MQTT protocol


#1

Hi all,

I am new to Mangoh Green and Legato. I want to develop an application with Lagato framework using MQTT protocol to send sensor data from Mangoh green board to Air Vantage cloud but I do not know how and where to start. I also cannot find any document or guide about using Legato with MQTT. Is there any reference document, guide or sample application about this that I can refer to?

Many thanks!


#2

Is there a reason why you want to use MQTT to push the data to AirVantage rather than the COAP based solution provided by le_avdata?


#3

Hi dfrey, thanks for your reply.

I can find that MQTT protocol is supported with AirVantage. Refer to this link, we can simulate a device sending data to AirVantage, so I wonder it is possible to write a Legato app for Mangoh Green using MQTT. It’s just my idea to use MQTT as a solution.

Does Legato only provide us COAP based solution?


#4

AirVantage supports MQTT, but the Legato application framework doesn’t include anything by default which enables the use of MQTT. That’s why we created the MqttClient app in the mangOH repository. The MqttClient app has two branches (master and use_paho_linux). If you’re going with MQTT, then I suggest the use_paho_linux branch because it has a more natural API. There are still limitations with our MQTT app. For example, we haven’t had time to figure out how to enable encryption yet. The CoAP based le_avdata is probably better supported right now, so I suggest that you look at that if you can.