Communication protocol supported in Legato-af 15.01

Hi Everyone,
I am working on Legato-af 15.01 and i want to use MQTT or LWM2M communication protocol to communicate with airvantage cloud service.
I want to know wheather Legato-af 15.01 supports these protocols??

Thanks

I have found some the information about MQTT usage in [url]https://doc.airvantage.net/av/howto/hardware/samples/generic-mqtt/[/url] but i want to know about is there support for LWM2M??

Kindly share the link if any for the usage of LWM2M.

Thanks

Legato only supports M3DA protocol to communicate with airvantage at the moment (carmd-ev-cto01/Jenkins-Doxygen/t … t_lib.html).
However, Legato will support LWM2M sometime later this year.

hello… I am very new to the airvantage platform…and i am creating an airvantage app by following this document:
[url]LEGATO: AirVantage Agent Connector library

Also, i have come across this link:
[url]https://doc.airvantage.net/av/howto/hardware/samples/generic-mqtt/[/url]
in application modelits this:


i am using this:
swi_av_asset_Create ( swi_av_Asset_t ** asset,
const char * assetIdPtr
)

here i have defined the asset id. But i am confused where to defined the default label and path…as in syntax of api its not there.

I want to know, are these apllication model and apllication given on legato website are linked.
If so, i want to know what are the paths, label etc in case of application format mentioned in legato site with respect to application model.

thanks

Hello,

you are merging two different procedure.
Either you have to follow the legato website which uses the M3DA protocol (deprecated protocol on AirVantage)
or you have to follow the airvantage doc one which uses the MQTT protocol.

To use MQTT, you have to get a linux, Posix library. The Eclipse Paho project [1] supplies libraries for several languages, c-ANSI included [2]. You can find full example as well on the Paho website.

We have implemented a sample code for linux processor which is used in our tutorial for Linux/Raspberry Pi which uses this library [3]. As it is linux compatible, you may use it as is or with very few changes to implement your application.

This tutorial will show you the application model to use (what I see in your quote seems fine).
Finally:

  1. Check the app model with the tutorial one:

[code]

<data>
  <encoding type="MQTT">
    <asset default-label="Greenhouse" id="machine">
      <variable default-label="Temperature" path="temperature" 
                                            type="double"/>
      <variable default-label="Luminosity" path="luminosity" 
                                           type="double"/>
      <setting default-label="Threshold" path="threshold" 
                                         type="int"/>
    </asset>
  </encoding>
</data>

[/code]

  1. Use the sample code to send your data to AirVantage (think to change the device Id, hard coded in the sample).
  2. Check your device Id is exactly the same in the serial system’s field on AirVantage
  3. Check in the timeline view, all communication is ok (you may see a communication without any data for the connection first and then some communication with the data you send)

Last but not least, this is just a sample to show you and help you to implement communication to AirVantage using MQTT, it is not a full industrial library.

[1] eclipse.org/paho/
[2] eclipse.org/paho/clients/c/embedded/
[3] doc.airvantage.net/av/howto/har … pi-mqtt-c/