I need to make a prototype with Legato/Mangoh green/WP7502 where the application sends data to AirVantage and receives settings and commands from AirVantage.
A sample application that shows how to do that would be greatly appreciated.
the repository that you are pointing to is the main Legato repository, so the sample apps in there are building and should be functional. If you encounter any issue please report a bug on GitHub (Issues Ā· legatoproject/legato-af Ā· GitHub) or here.
As for the version, these sample apps are kept up-to-date so if you checkout tag 17.06.0, you should have a sample app that works with this Legato version.
Note that to build all sample apps you can do make tests_wp85.
I have been working with the sample application āassetDataā.
I have:
set up my host environment for Legato 17.6;
compiled the app āassetDataā for WP750x (assetData.wp750x.update);
created an AirVantage package for this application (assetData.zip);
edited the file āmanifest.appā inside the āassetData.zipā to specify the data model used by the app (variables, settings, commands) (see below)
uploaded the package to my account on AirVantage; it appears in the dash board of my Mangoh system in the āSystem Applicationsā widget;
installed the app on my Mangoh board (via command line: āupdate assetData.wp750x.update <IP"ADDRESS>ā);
started the application (āapp startā) on the target;
checked that the application is ārunningā on the target;
checked that the app connects to AirVantage; this happens only once when I start the application;
Now I would need some help with the following questions:
Why canāt I see in AV UI any app data being sent by the app to AV? The app updates the app variables by periodically calling the function āValueUpdateā. Do I need to configure anything to have the data sent to AV?
Why do I see only a few application variables in AV UI (āmonitorā page, āsystem applicationsā widget, āassetDataā application)?
home1.room1.0.SmartCam
home1.room1.0.roomName
home1.room1.0.isVacant
home1.room1.0.thermostat
How do I issue the asset command defined by the application?
I wonder whether or not it is necessary to upload to AirVantage not just the assetData.zip containing the application compiled for 17.6, but also a custom system bundle where all the other applications that need to be run along with assetData are also included.
The LWM2M AirVantage service has significantly changed in Legato 17.06 (when compared to 16.10.1).
There is now no explicitly defined app model that has to be uploaded to AV ā¦ but the ONLY way Iāve been able to see my data in AV is via the timeline process.
And I found that the Sample App as provided doesnāt work out of the box either - you need to add a Push() function call after Set()ing the data before the data will be pushed up to AV. Previously, Set()ting the data would trigger the LWM2M upload to AV, but this is no longer the case.
Iāve had to go back to 16.10.1 to use AV for my customer at the moment.
thanks a lot for your reply: it is good to know that I am not the only one having problems with āassetDataā
I have been (and still am) struggling with this sample application; I think it is important as it demonstrates very important features.
I want to try your suggestions with the Push() function. Is there any documentation/example on how to use it?
Could you please have a look and let us know if it works better for you.
If there is any area that you think it should explore more or bugs or there is any surprising behavior, please let us know and we will try to improve things!
@CoRfr I just tested the assetData sample to work on patch 17.07.1 and it works like a charm. I feel its now a perfectly working sample which other developers can tweak to develop their application.
Hi @CoRfr. I followed the same procedure as @luigitondo did, but I got stuck in uploading the app to Airvantage. After I upload the .zip file, the application installation is always in progress. I tried with helloWorld sample app before, the same issue happened and still cannot figure out what went wrong. Could you help me with this?
Besides, it confuses me what is the purpose of uploading app on Airvantage. Is that just to let Airvantage know what variables, settings and commands it can expect in this application from manifest.app? Or otherwise what purpose could be? As mentioned in How To -- Use Airvantage -- Create App Bundles in Legato_Reference_Manual,
This topic provides details on how to build and update app bundles and upload them to Air Vantage to deploy on your target.
I understand this paragraph as Airvantage will deploy this app on the registered target device through air ( upload the app to target via wireless transmission ). But it seems not to be this case since I have to also install manually the app onto device. Well, how to understand this?
Hey @davidc, I am hoping you may be able to help me out. If there is no explicitly defined app model that has to be uploaded to AV, is there any documentation on how to send commands to the app from AV? I can run the asset data app and push data to AV, but I canāt seem to find any information of using the app from AV to talk back to the mangoh.