Need more information about AirVantage

Hi All,

I have now two mangOH boards, is it possible to connect these two boards to AirVantage at the same time?

It just likes that AirVantage receives some data from one board and does some coordination action, then sends the result to the other board. The value from one board should influence the value to another board, such as according to the values of sensor setting the temperature of a room.

As far as I know that AirVantage supports one mangOH board under a Monitorsystem. Is that possible to register two boards under the same system or is ther any way to establish a communication between two board or two systems in the AirVantage?

Any Information would be very appreciated.

Thx
Genfory

Hi Genfory,

Yes, it is possible to register as many as hardware you want.

You can follow this tutorial here: http://mangoh.io/getting-started.html

In a few words:

  • Log in to AirVantage
  • Go to Register Activity
  • click on the mangOH tile
  • fill the field (name, serial number, IMEI)
    You can then go to Monitor > Systems and click on the mangoh you want to use, add application, build a dashboard, define alert rule, …
    Then you can publish your data to /messages/json and the other board can subscribe to this topic as well.

Also, please be aware that you can not register the same mangOH board on different Airvantage accounts.

Hi,

Thx for reply.
I have found a mangOH project containing two apps about data router and mqtt client that support my idea in the following links

So I tried to set it up but met some problems.

legato@legato-VM:~$ source ~/legato/packages/legato.sdk.latest/resources/configlegatoenv
bash: /home/legato/legato/packages/legato.sdk.latest/resources/configlegatoenv: No such file or directory

I checked the version about framework in the system,there are more than one.

In the terminal the paths were still old.
Module: wp85
SDK Path: /home/legato/legato/packages/legato.sdk.16.1.0.wp85-native-x86_64-201602240919
Framework Path: /home/legato/legato/packages/legato.framework.16.1.0.Beta
Toolchain Path: /home/legato/legato/packages/legato.toolchain.1.7.2.fw_SWI9X15Y_07080200-wp85-native-x86_64-201602121108
Device Image Path: /home/legato/legato/packages/legato.device.image.7.8.2.00.wp85-201602240913
Recovery tools Path: /home/legato/legato/packages/legato.recovery.16.1.0.linux-wp85-201602121442

But if I tried to build a new application, I could select the new one.

Then I tried to load Legato development environment with both paths, but it did not work.

legato@legato-VM:~ source ~/home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources/configlegatoenv bash: /home/legato/home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources/configlegatoenv: No such file or directory legato@legato-VM:~/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources chmod u+x configlegatoenv
legato@legato-VM:~/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources$ configlegatoenv
configlegatoenv: command not found
legato@legato-VM:~/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources$ ./configlegatoenv
ERROR: this script needs to be sourced
legato@legato-VM:~$ source ~/home/legato/legato/packages/legato.sdk.16.1.0.wp85-native-x86_64-201602240919/resources/configlegatoenv
bash: /home/legato/home/legato/legato/packages/legato.sdk.16.1.0.wp85-native-x86_64-201602240919/resources/configlegatoenv: No such file or directory

Is there anyway to change the paths?
How could I set up the project?

Genfory

Hi @genfory,

It looks like there is a mistake in your command line.
~ path is equivalent to /home/legato in your context (the home directory of your legato user)

So either you do: source /home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources/configlegatoenv
or: source ~/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources/configlegatoenv

But the ~/home/legato/xxx paths certainly don’t exist! :wink:

By the way, the legato.sdk.latest link is updated only when you use legato-spm command-line utility. My guess is that you installed the Legato 16.07 version with Developer Studio.
Anyway, you can refresh the link after the install, by doing a legato-spm --update-link --> this will set the legato.sdk.latest link to the latest installed SDK (here your 16.07 version)

I hope this will help.

Hi daav,

U are right, I updated the Legato 16.07 with Developer Studio.

I have followed ur suggestion, both of that works.

legato@legato-VM:~$ source /home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources/configlegatoenv
Modules: wp85, wp750x
SDK Path: /home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259
Framework Path: /home/legato/legato/packages/legato.framework.16.7.0.201609081601 - $LEGATO_ROOT
Toolchain Path: /home/legato/legato/packages/legato.toolchain.1.7.3.fw_SWI9X15Y_07110900-wp85-wp750x-native-x86_64-201608171142 - $WP85_TOOLCHAIN_DIR $WP750X_TOOLCHAIN_DIR
Device Image Path: /home/legato/legato/packages/legato.device.image.7.11.11.00.wpX5-201610241233 - $WPX5_DEVICE_IMAGE
Recovery tools Path: /home/legato/legato/packages/legato.recovery.4.0.0.linux-201607191626 - $WPX5_RECOVERY
No toolchain found for target ‘ar7’.
Unable to find compatible cross-build toolchain for target ‘ar7’.
No toolchain found for target ‘ar86’.
Unable to find compatible cross-build toolchain for target ‘ar86’.
/home/legato
legato@legato-VM:~$ legato-spm --update-link
legato-spm: command not found
legato@legato-VM:~$ source ~/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259/resources/configlegatoenv
Modules: wp85, wp750x
SDK Path: /home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259
Framework Path: /home/legato/legato/packages/legato.framework.16.7.0.201609081601 - $LEGATO_ROOT
Toolchain Path: /home/legato/legato/packages/legato.toolchain.1.7.3.fw_SWI9X15Y_07110900-wp85-wp750x-native-x86_64-201608171142 - $WP85_TOOLCHAIN_DIR $WP750X_TOOLCHAIN_DIR
Device Image Path: /home/legato/legato/packages/legato.device.image.7.11.11.00.wpX5-201610241233 - $WPX5_DEVICE_IMAGE
Recovery tools Path: /home/legato/legato/packages/legato.recovery.4.0.0.linux-201607191626 - $WPX5_RECOVERY
No toolchain found for target ‘ar7’.
Unable to find compatible cross-build toolchain for target ‘ar7’.
No toolchain found for target ‘ar86’.
Unable to find compatible cross-build toolchain for target ‘ar86’.
/home/legato

legato@legato-VM:~$ legato-spm --update-link
Refreshing installed packages
Update latest link to SDK version 16.7.0.wp85-wp75-native-x86_64-201610241259

When I open a new terminal, the paths are still old.

Module: wp85
SDK Path: /home/legato/legato/packages/legato.sdk.16.1.0.wp85-native-x86_64-201602240919
Framework Path: /home/legato/legato/packages/legato.framework.16.1.0.Beta
Toolchain Path: /home/legato/legato/packages/legato.toolchain.1.7.2.fw_SWI9X15Y_07080200-wp85-native-x86_64-201602121108
Device Image Path: /home/legato/legato/packages/legato.device.image.7.8.2.00.wp85-201602240913
Recovery tools Path: /home/legato/legato/packages/legato.recovery.16.1.0.linux-wp85-201602121442
bash: bin/configlegatoenv: No such file or directory
/home/legato

It looks like there is something wrong in your .bashrc file.
Please can you dump its content here?

Is those the content of bashrc file?

~/.bashrc: executed by bash(1) for non-login shells.

see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)

for examples

If not running interactively, don’t do anything

case $- in
i) ;;
*) return;;
esac

don’t put duplicate lines or lines starting with space in the history.

See bash(1) for more options

HISTCONTROL=ignoreboth

append to the history file, don’t overwrite it

shopt -s histappend

for setting history length see HISTSIZE and HISTFILESIZE in bash(1)

HISTSIZE=1000
HISTFILESIZE=2000

check the window size after each command and, if necessary,

update the values of LINES and COLUMNS.

shopt -s checkwinsize

If set, the pattern “**” used in a pathname expansion context will

match all files and zero or more directories and subdirectories.

#shopt -s globstar

make less more friendly for non-text input files, see lesspipe(1)

[ -x /usr/bin/lesspipe ] && eval “$(SHELL=/bin/sh lesspipe)”

set variable identifying the chroot you work in (used in the prompt below)

if [ -z “${debian_chroot:-}” ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi

set a fancy prompt (non-color, unless we know we “want” color)

case “$TERM” in
xterm-color|*-256color) color_prompt=yes;;
esac

“~/.bashrc” 123L, 5151C

But I can load the Legato development environment now.

legato@legato-VM:~$ source ~/legato/packages/legato.sdk.latest/resources/configlegatoenv
Modules: wp85, wp750x
SDK Path: /home/legato/legato/packages/legato.sdk.16.7.0.wp85-wp75-native-x86_64-201610241259
Framework Path: /home/legato/legato/packages/legato.framework.16.7.0.201609081601 - $LEGATO_ROOT
Toolchain Path: /home/legato/legato/packages/legato.toolchain.1.7.3.fw_SWI9X15Y_07110900-wp85-wp750x-native-x86_64-201608171142 - $WP85_TOOLCHAIN_DIR $WP750X_TOOLCHAIN_DIR
Device Image Path: /home/legato/legato/packages/legato.device.image.7.11.11.00.wpX5-201610241233 - $WPX5_DEVICE_IMAGE
Recovery tools Path: /home/legato/legato/packages/legato.recovery.4.0.0.linux-201607191626 - $WPX5_RECOVERY
No toolchain found for target ‘ar7’.
Unable to find compatible cross-build toolchain for target ‘ar7’.
No toolchain found for target ‘ar86’.
Unable to find compatible cross-build toolchain for target ‘ar86’.
/home/legato

So I get the source code
git clone --recursive git://github.com/mangOH/mangOH

and build the mangOH Legato system
legato@legato-VM:~ cd mangOH legato@legato-VM:~/mangOH make --include-dir=$LEGATO_ROOT wp85
export MANGOH_ROOT=/home/legato/mangOH &&
mksys
-C “-DPCM_IF=“AUX”” -C “-DI2S_IF=“PRI”” -C “-DUSB_IF=“AFE_PCM”” -C “-DCODEC_IF=“PRI”” -C "-DMM_1_ALSA_MIXER_CTRL=“MultiMedia1"” -C “-DMM_1_ALSA_PCM_DEVICE_ID=0” -C "-DMM_2_ALSA_MIXER_CTRL=“MultiMedia2"” -C “-DMM_2_ALSA_PCM_DEVICE_ID=1” -C “-DADC_BEGIN_NUM=0” -C “-DADC_COUNT=4”
-t wp85
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/supervisor”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/positioning”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/airVantage”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/modemServices”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/atServices”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/wifi”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/secureStorage”
-i “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/interfaces/logDaemon”
-s “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/modules/WiFi/service”
-s “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/components”
-s “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/modules/WiFi/apps/tools/wifi”
-s “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/platformServices/airVantage”
-s “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/platformServices”
-s “/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/tools”
-s “/home/legato/mangOH/apps/GpioExpander/gpioExpanderService”
-C -g -X -g -L -g
mangOH_Green.sdef
Looked in the following places:
‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/modules/WiFi/service’
‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/components’
‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/modules/WiFi/apps/tools/wifi’
‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/platformServices/airVantage’
‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/platformServices’
‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/tools’
‘/home/legato/mangOH/apps/GpioExpander/gpioExpanderService’
‘.’
** ERROR:
/home/legato/mangOH/mangOH_Green.sdef:31:4: error: Can’t find definition file (.adef) for app specification ‘/home/legato/legato/packages/legato.framework.16.7.0.201609081601/resources/legato/apps/platformServices/spiService’.
Makefile:25: recipe for target ‘wp85’ failed
make: *** [wp85] Error 1

Is that right?
I checked the app status, it was not installed and in the mangOH folder I didn’t find the update pack file.

So how could I install it in the board?

master branch on MangOH github repo is compatible with Legato 16.10
You should either checkout the 16.07 branch if you want to stay with Legato 16.07, or upgrade your development environment to 16.10

Please update to 16.10. If there is a reason why you can’t update to 16.10 or don’t want to then I would like to hear about that so we can improve the experience in future.