Instructions for building an AirVantage package are incorrect

#1

Hello,

At the link:
http://legato.io/legatodocs/latest/howToAirVantageExchangeData.html#howToAirVantageExchangeData_uploadAV_createPkg

You get these instructions:

==================================
This step is run on the Host, in Terminal #1:
av-pack -f assetDataTutorial.wp85.update
where shall be globally unique (e.g. assetTutorialAppV3), AirVantage uses it to uniquely identify multiple versions of our app

Unfortuately, this command does not work in Legato 16.10. In fact, if I try it as suggested, I get:

$ av-pack -f assetDataTutorial.wp750x.update assetTutorialAppV3
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

I then decided to run the –help option; it seems that the suggested ’-f’ option isn’t there.

I tried the –u, -b and –t options in various combinations and got other errors.

What is the right way to generate an AirVantage package?

thanks
BR
Luigi

0 Likes

#2

Hi,

try

av-pack “unique_name” -f “update_file_name” “___build__directory”

It works for me.

0 Likes

#3

Hi,

I tried:
$ av-pack -f assetDataTutorial.wp750x.update assetTutorialAppV3
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

$ av-pack -f “assetDataTutorial.wp750x.update” “assetTutorialAppV3”
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

$ av-pack “assetTutorialAppV3” -f “assetDataTutorial.wp750x.update”
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

$ av-pack assetTutorialAppV3 -f assetDataTutorial.wp750x.update
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

In fact, the -f option is not avaiable:

$ av-pack --help

NAME
av-pack - Generate package for upload to AirVantage.

SYNOPSIS
av-pack [OPTIONS]
av-pack -h
av-pack --help

DESCRIPTION

Generates a package for a legato application or system that can be uploaded to AirVantage
and pushed to devices.

Options:

-u, --update-file, <string>
    Include an update file.  This gets pushed to the device when an "install application" is 
requested for this application.

-b, --build-dir, <string>
    File system path of the build directory to be searched for the manifest.app file. Please ensure
that the build directory specified corresponds to your *.update file. This will be used to
determine whether av-pack should be generating an application pack or system pack.

-n, --name, <string>
    (Optional) Identify the name of the system.

-t, --type, <string>
    (Optional) Internal type field used by AirVantage to identify the system or application.

-h, --help
    Display this help text.  (Cannot be used with other options.)
0 Likes

#4

yeah, try

av-pack assetTutorialAppV3 -f assetDataTutorial.wp750x.update build-directory

where build-directory would be something like

build_assetDataTutorial/wp85

you have to check your directory structure to find where the app, component and staging directories are, then the path to directory that is your build directory path…

The quotes weren’t meant to be literal, they were “insert your filename here” quotes. There shouldn’t be any quote marks in the command.

Note if you use the windows IDE, it generates the AV pack file automatically when you build. Obviously in linux there would be a way to do it by adding a rule to the makefile.

0 Likes

#5

hi,

the directory structure for this sample application is:
$ ls -l
total 92
-rw-rw-r-- 1 acal acal 383 jun 13 2016 assetDataTutorial.adef
-rw-rw-r-- 1 acal acal 27959 apr 27 15:43 assetDataTutorial.wp750x.update
-rw-rw-r-- 1 acal acal 27948 apr 27 15:41 assetDataTutorial.wp85.update
drwxrwxr-x 4 acal acal 4096 apr 27 15:43 _build_assetDataTutorial
drwxrwxr-x 2 acal acal 4096 jun 13 2016 componentAssetData
-rw-rw-r-- 1 acal acal 11364 jun 13 2016 datahistory.png
-rw-rw-r-- 1 acal acal 282 apr 27 15:43 Makefile
-rw-rw-r-- 1 acal acal 275 jun 13 2016 Makefile_backup
-rw-rw-r-- 1 acal acal 3301 jun 13 2016 README.md

the build directory is _build_assetDataTutorial
Within this directory I have:
$ ls -l
total 8
drwxrwxr-x 6 acal acal 4096 apr 27 15:43 wp750x
drwxrwxr-x 6 acal acal 4096 apr 27 15:41 wp85

I tried the following:
$ av-pack assetTutorialAppV3 -f assetDataTutorial.wp750x.update _build_assetDataTutorial/wp750x
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

$ av-pack assetTutorialAppV3 -f assetDataTutorial.wp750x.update /_build_assetDataTutorial/wp750x
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

$ av-pack assetTutorialAppV3 -f assetDataTutorial.wp750x.update ./_build_assetDataTutorial/wp750x
***ERROR: Invalid option
Try ‘av-pack --help’ for usage instructions.

I think the “-f” option is not allowed.
I use Legato 16.10
Which version do you use?

thanks
BR
Luigi

0 Likes

#6

Hi,

if you actually do type av-pack --help, you will get the proper instructions, the ones on the website are out of date.

I’m using legato 16.07 but I don’t think av-pack has changed. But if all else fails, you can do it manually - just use any zip utility and zip the manifest file (it should be in the app directory under the wp750x directory) and update file together and make sure the zip file name is unique. That’s all av-pack does. If you have to, you can edit the manifest.app file to include the type.

The -f option works for me, like I said.

0 Likes

#7

Hi,

Seems like the parameters have evolved and now it should be:

$ av-pack -u assetDataTutorial.wp85.update -b _build_assetDataTutorial
Generating an airvantage package for a legato application.
  adding: assetDataTutorial.wp85.update (stored 0%)
  adding: manifest.app (deflated 72%)

I created a ticket as to fix the doc.

0 Likes

#8

this command worked for me!
thanks!
/Luigi

0 Likes