# Avms

**URL:** <https://forum.legato.io/t/avms/57>\
**Category:** Legato Application Framework\
**Created:** [July 9, 2014, 1:07pm UTC](https://forum.legato.io/t/avms/57 "2014-07-09T13:07:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.legato.io/u/krima919)\
**Post date:** [July 9, 2014, 1:07pm UTC](https://forum.legato.io/t/avms/57/1 "2014-07-09T13:07:25Z")

</div>

I would like to connect to AVMS using the agent in legato. At the moment I have not managed to connect and it seems to be an APN releated problem. The log look like below. How do you set the APN in the agent?

13:02:01 -WRN- | modemDaemon[1035]/MdmSvc T=main | le\_mdc.c ReadAPNConfiguration() 665 | No APN configuration set for internet profile  
13:02:01 =ERR= | dcsDaemon[1052]/dcsDaemon T=Data Thread | serverMain.c StartDataSession() 286 | Failed to start session.  
13:02:16 -WRN- | modemDaemon[1035]/MdmSvc T=main | le\_mdc.c ReadAPNConfiguration() 665 | No APN configuration set for internet profile  
13:02:16 =ERR= | dcsDaemon[1052]/dcsDaemon T=Data Thread | serverMain.c StartDataSession() 286 | Failed to start session.  
13:02:31 -WRN- | dcsDaemon[1052]/framework T=main | mem.c le\_mem\_ForceAlloc() 612 | Memory pool ‘Data Command-reports’ overflowed. Expanded to 8 blocks.  
13:02:31 =ERR= | AirVantage[1060]/AirVantage T=main | NETMAN(netman.lua) () 28 | NM request failed: Timeout expired, unable to request connection  
13:02:31 =ERR= | AirVantage[1060]/AirVantage T=main | SRVCON(srvcon.lua) () 115 | Error while sending data to server: Timeout expired, unable to request connection  
13:02:31 -WRN- | modemDaemon[1035]/MdmSvc T=main | le\_mdc.c ReadAPNConfiguration() 665 | No APN configuration set for internet profile  
13:02:31 =ERR= | dcsDaemon[1052]/dcsDaemon T=Data Thread | serverMain.c StartDataSession() 286 | Failed to start session.

---

<div class="post-metadata">

**Author:** ![esun](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@esun](https://forum.legato.io/u/esun)\
**Post date:** [July 9, 2014, 7:06pm UTC](https://forum.legato.io/t/avms/57/2 "2014-07-09T19:06:31Z")

</div>

Hi,

You are right, it looks like you haven’t set the APN that will be used to start a data connection in the configDB yet. To do so, use the on target ‘apn’ tool to set this configuration:

```auto
apn set <apn name>
```

-Enoch

---

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.legato.io/u/krima919)\
**Post date:** [July 10, 2014, 1:29pm UTC](https://forum.legato.io/t/avms/57/3 "2014-07-10T13:29:42Z")

</div>

Thanks, now I get a little bit further. But I still can’t connect to the server. I can see that the agent set up the data connection since the rmnet interface get an IP. I have changed the URL to tcp://eu.airvantage.net:44900 and verified in the debug log that it is used. I have added a system with correct IMEI in AVMS. But I get a connection error, see part of the log below. Does anyone have an idea what might be wrong?

`Jul 10 12:35:04 swi-mdm9x15 user.info Legato: INFO | dcsDaemon[2653]/dcsDaemon T=Data Thread | serverMain.c SetDnsConfiguration() 194 | Set DNS '80.251.201.177' '80.251.201.178'
Jul 10 12:35:09 swi-mdm9x15 user.info Legato: INFO | AirVantage[2661]/AirVantage T=main | agent_platform_core_nm.c ConnectionStateHandler() 89 | Network interface 'rmnet0' is connected
Jul 10 12:35:09 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(=[C]) () -1 | SIGNAL netman-legato.connected
Jul 10 12:35:09 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 182 | SIGNAL table: 0x52bc8.read
Jul 10 12:35:09 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(platform.lua) () 51 | STEP thread: 0x90740
Jul 10 12:35:09 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(netman.lua) () 32 | SIGNAL NETMAN.CONNECTED
Jul 10 12:35:09 swi-mdm9x15 user.info Legato: INFO | AirVantage[2661]/AirVantage T=main | M3DA-SESSION(default.lua) () 74 | Opening default session #1
Jul 10 12:35:09 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 96 | WAIT emitter = tcp{client}: 0xee688, events = { write, error, closed } )
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 182 | SIGNAL tcp{client}: 0xee688.write
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(platform.lua) () 51 | STEP thread: 0x90740
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(tcp.lua) () 38 | SCHEDULE thread: 0xd8468
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | M3DA-TRANSPORT(tcp.lua) () 39 | Opening socket
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | BYSANT-M3DA(bysant.lua) () 229 | Streaming header
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | BYSANT-M3DA(bysant.lua) () 237 | Streaming footer nil
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | M3DA-SESSION(default.lua) () 82 | Waiting for server response...
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(init.lua) () 873 | Registered cell for 60s timeout event
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(default.lua) () 83 | WAIT emitter = table: 0x9ec30, events = { status, connection_closed, 60 } )
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(platform.lua) () 51 | STEP thread: 0xd8468
Jul 10 12:35:10 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 96 | WAIT emitter = tcp{client}: 0xee688, events = { read, error, closed } )
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 182 | SIGNAL tcp{client}: 0xee688.read
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(platform.lua) () 51 | STEP thread: 0xd8468
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(default.lua) () 42 | SIGNAL table: 0x9ec30.connection_closed
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | M3DA-TRANSPORT(tcp.lua) () 66 | Closing socket: closed
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 77 | SIGNAL tcp{client}: 0xee688.closed
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(init.lua) () 566 | SIGNAL thread: 0xd8468.die
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(platform.lua) () 51 | STEP thread: 0x90740
Jul 10 12:35:11 swi-mdm9x15 user.err Legato: =ERR= | AirVantage[2661]/AirVantage T=main | M3DA-SESSION(default.lua) () 85 | Closed session #1 with error connection_closed
Jul 10 12:35:11 swi-mdm9x15 user.err Legato: =ERR= | AirVantage[2661]/AirVantage T=main | SRVCON(srvcon.lua) () 115 | Error while sending data to server: connection_closed
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(init.lua) () 566 | SIGNAL thread: 0x90740.die
Jul 10 12:35:11 swi-mdm9x15 user.debug Legato: DBUG | AirVantage[2661]/AirVantage T=main | SCHED(fd.lua) () 77 | SIGNAL tcp{client}: 0xee688.closed`

---

<div class="post-metadata">

**Author:** ![lbarthelemy](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@lbarthelemy](https://forum.legato.io/u/lbarthelemy)\
**Post date:** [July 11, 2014, 7:35am UTC](https://forum.legato.io/t/avms/57/4 "2014-07-11T07:35:06Z")

</div>

Hi,

Thank you for the logs.  
I would like to know what application model you used when you created the system on [eu.airvanatage.net](http://eu.airvanatage.net).

Regards,

---

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.legato.io/u/krima919)\
**Post date:** [July 11, 2014, 11:49am UTC](https://forum.legato.io/t/avms/57/5 "2014-07-11T11:49:02Z")

</div>

At the moment I don’t have an application model. I did see in some documentation that you should select an app called legato\_beta but I did not find it, is it necessary? Where can I find application model legato\_beta?

---

<div class="post-metadata">

**Author:** ![lbarthelemy](https://avatars.discourse-cdn.com/v4/letter/l/94ad74/32.png) [@lbarthelemy](https://forum.legato.io/u/lbarthelemy)\
**Post date:** [July 11, 2014, 1:17pm UTC](https://forum.legato.io/t/avms/57/6 "2014-07-11T13:17:58Z")

</div>

Hi,

Yes you need to use a model: it is used by airvantage server to describe what are the capabilities of your device: like what protocol does it use to communicate with the server etc.  
The error you see in the device logs is the server rejecting the device because the device is trying to communicate with the server whereas the server doesn’t have the required information/configuration to allow this communication.

I’ll try to find out why you don’t have access to the model to use with Legato devices, we’ll get back to you about that.

Regards,

---

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.legato.io/u/krima919)\
**Post date:** [October 23, 2014, 7:45am UTC](https://forum.legato.io/t/avms/57/7 "2014-10-23T07:45:25Z")

</div>

Again I am trying to use Legato together with AVMS using my [eu.airvantage.net](http://eu.airvantage.net) account. The Legato\_beta application model is still not available.

---

<div class="post-metadata">

**Author:** ![esun](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@esun](https://forum.legato.io/u/esun)\
**Post date:** [November 3, 2014, 8:21pm UTC](https://forum.legato.io/t/avms/57/8 "2014-11-03T20:21:10Z")

</div>

Sorry for taking so long. The Legato\_Beta application model should now be available on EU airvantage.
