# Airvantage autostart issue

**URL:** <https://mangoh.discourse.group/t/airvantage-autostart-issue/397>\
**Category:** Services\
**Created:** [February 27, 2017, 9:10am UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397 "2017-02-27T09:10:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://mangoh.discourse.group/u/tomalex)\
**Post date:** [February 27, 2017, 9:10am UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/1 "2017-02-27T09:10:05Z")

</div>

Dear Community,

We are evaluating the WP with mango board and having an issue to autostart the Airvantage service. (fw: SWI9X15Y\_07.11.22.00, Legato version 16.10.1) It works fine when started manually sends statuses according to the setting but after reboot the service simply does not connect to Airvantage.

Current configuration:  
AT+WDSC?  
+WDSC: 0,0  
+WDSC: 1,1 //it should be 0 by default according to the AT manual  
+WDSC: 2,1 //it should be 0 by default according to the AT manual  
+WDSC: 3,1 //only changed this value from 15 --\> 1, (does not work with 15 either)  
+WDSC: 4,0

OK

AT+WDSE  
OK  
AT+WDSG  
+WDSG: 0,3  
+WDSG: 1,0

OK

Airvantage login starts only manually with command:  
AT+WDSS=1,1

OK

+WDSI: 4

+WDSI: 6

+WDSI: 23,1

Does anybody have an idea or do i miss something?

Thanks,  
tom

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [February 27, 2017, 11:23pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/2 "2017-02-27T23:23:27Z")

</div>

Hi Tom,

When you restart your unit, there needs to be an app that tells the airvantageservice to connect to Airvantage.

Can you install the following app:  
[http://cgit-legato/Legato/tree/apps/sample/lwm2mAirVantageControl](http://cgit-legato/Legato/tree/apps/sample/lwm2mAirVantageControl)

on your platform and run it? this should allow your system to connect to AV on bootup. Note that the app is manual start, you may want to change that.

cheers,  
Ashish

---

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://mangoh.discourse.group/u/tomalex)\
**Post date:** [March 5, 2017, 8:45pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/3 "2017-03-05T20:45:28Z")

</div>

Hi Ashish,

Thank you for clearing that up!  
You mean this app?  
[https://github.com/legatoproject/legato-af/tree/master/apps/sample/lwm2mAirVantageControl](https://github.com/legatoproject/legato-af/tree/master/apps/sample/lwm2mAirVantageControl)

It wasn’t evident for me from the AT documentation. I think you should be able to configure the airvantage agent with only at commands without an extra app/configuration as it is with non legato modules (if i remember correctly) It makes me confused!

Thanks again for the answer,  
Tom

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [March 5, 2017, 8:48pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/4 "2017-03-05T20:48:56Z")

</div>

Hi Tom,

Yes, that’s the correct git location 🙂

There could be a way to do it using AT commands besides the the legato app. I’ll dig into it, ask internally and let you know.

cheers,  
Ashish

---

<div class="post-metadata">

**Author:** ![asyal](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/asyal/32/78_2.png) [@asyal](https://mangoh.discourse.group/u/asyal)\
**Post date:** [March 8, 2017, 4:40am UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/5 "2017-03-08T04:40:01Z")

</div>

Can you try:

AT+WDSC Device service configuration

3 Polling mode  
The embedded module will initiate a connection to the Device Services server according to the defined timer

AT+WDSC=3,  
For = 3; value in range = 0 – 525600 in min  
0 Polling mode is deactivated

Not 100% sure whether this works but let me know if it does.

---

<div class="post-metadata">

**Author:** ![rjacolin](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@rjacolin](https://mangoh.discourse.group/u/rjacolin)\
**Post date:** [March 8, 2017, 8:22pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/6 "2017-03-08T20:22:01Z")

</div>

Hi Tom,

When you try at+wdss command, the module is connected to AirVantage.  
You may do at+wdss=1,0 in order to stop the connection. You may see:  
+WDSI: 8 (for success)  
at+wdsc=3,1 is a bit low. I prefer you set at+wdsc=3,2 (2 minutes).

at+wdsc command works. Do you have some +WDSI notification if you do nothing each 2 minutes?

---

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://mangoh.discourse.group/u/tomalex)\
**Post date:** [March 8, 2017, 8:28pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/7 "2017-03-08T20:28:24Z")

</div>

Hello Asya & Rjacolinl,

experience was that it worked till the reset but after repower the module forgot the setting but i will double check it again a try out the AirVantageControl app and i will let you know!

BR  
tom

---

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://mangoh.discourse.group/u/tomalex)\
**Post date:** [March 12, 2017, 7:10pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/8 "2017-03-12T19:10:07Z")

</div>

Hello All,

Strange things, the module is keeping now the settings after reset so at+wdsc=3,x works. I haven’t done anything differently, or at least i don’t know about it.  
Thanks for the help!

BTW, We would like to update the application with Airvantage.  
I have tried to update the app several times but i always get update failure. Should i open an other topic? Here is the log:

I have received this sometimes:  
avcDaemon[511]/avcAppUpdate T=main | avcAppUpdate.c Object9FieldActivityHandler() 1481 | Duplicate attempt detected.  
But usually i get these messages:  
avcDaemon[517]/avcDaemon T=main | avcServer.c QueryUninstall() 717 | Automatically accepting uninstall  
Mar 12 19:05:54 | avcDaemon[517]/avcDaemon T=main | assetData.c assetData\_DeleteInstance() 3160 | Deleting instance tmCore/0/0  
Mar 12 19:05:54 | avcDaemon[517]/avcDaemon T=main | assetData.c assetData\_DeleteInstance() 3160 | Deleting instance tmCore/1/0

/\* Here i See that my application sends some debug messages, so obviously delete was not successful\*/

/\* After 60 seconds \*/  
avcDaemon[517]/le\_pa\_avc T=unknown | pa\_avc\_qmi.c ProcessAvmsState() 358 | Received User App update  
Mar 12 19:06:54 | avcDaemon[517]/le\_pa\_avc T=unknown | pa\_avc\_qmi.c ProcessAvmsState() 406 | Download failed. Avms update\_complete\_status 500.

If somebody has an idea please share it…

Thanks,  
tom

---

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://mangoh.discourse.group/u/tomalex)\
**Post date:** [March 13, 2017, 1:10pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/9 "2017-03-13T13:10:49Z")

</div>

After some restart the Mangoh board does not connect to the Airvantage again. I have also tested it with a “brand” new Mangoh with different Sim card and it shows the same behaviour.  
AT+WDSC?  
+WDSC: 0,0  
+WDSC: 1,0  
+WDSC: 2,0  
+WDSC: 3,10  
+WDSC: 4,0  
OK  
And the application update is not working either. What is he meaning of the Customer ID in the firmware? (1102816 by me)  
Isn’t it possible that there is a problem with avcService? I presume it is checking these AT settings.  
I will try out the AirVantage control application later but the avcService should be as robust as possible…

tom

---

<div class="post-metadata">

**Author:** ![tomalex](https://avatars.discourse-cdn.com/v4/letter/t/71e660/32.png) [@tomalex](https://mangoh.discourse.group/u/tomalex)\
**Post date:** [March 20, 2017, 4:10pm UTC](https://mangoh.discourse.group/t/airvantage-autostart-issue/397/10 "2017-03-20T16:10:28Z")

</div>

I tried the AirVantage control application and it works. I used the le\_avc\_SetPollingTimer() function and it seems to do the job. Only using AT commands the avcDaeom sometimes “forgets” to connect to the airvantage after reboot. I still have issue updating the application, i opened a new topic for it here:

> [@Airvantage Application update failes with code 500 from avcDaemon](http://mangoh.discourse.group/t/airvantage-application-update-failes-with-code-500-from-avcdaemon/447):
>
> Dear community, I have spent too much time for this issue but i have no idea how to do anything differently. I always get the following error message: “avcDaemon[505]/le\_pa\_avc T=unknown | pa\_avc\_qmi.c ProcessAvmsState() 406 | Download failed. Avms update\_complete\_status 500.” It is some kind of timeout but i don’t know why. Here is the complete log: Mar 20 16:00:46 | lwm2mCtrlDaemon[4638]/lwm2mControl T=main | lwm2mControl.c StatusHandler() 128 | Air Vantage agent reported update status:…

Thanks for the help!  
tom
