Configuration Tips for AirVantage

We've included some configuration tips to help when connecting to AirVantage, if you haven't registered your device yet follow the steps in Register a Target on AirVantage and AirVantage Getting Started.

Check Running Services

The AirVantage Connector (avcService) relies on the data connection services (dataConnectionService) for network connectivity. The data connection service is in turn relies on the modem service (modemService) and the cellnet service (cellNetService). Before you can connect to AirVantage, check that the avcService, dataConnectionService, modemService and cellNetService are running.

Command: app status


# app status

[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcCompat
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] positioningService
[running] powerMgr
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp

If you are running into errors, check what IPC bindings are needed for the avcService use the sdir tool.

# sdir list         #  list of all the IPC services known by the Service Directory

Check the Data Connection

The dataConnectionService can be used to connect to WiFi or the Cellular network. If all WIFI related services are stopped the dataConnectionService will default to the Cellular Network. To connect to cellular network we need to make sure that the SIM is registered to the network and the signal strength is good.

Command: cm radio


cm radio

Power: ON
Current Network Operator: BLOGS
Status: Registered, home network (LE_MRC_REG_HOME)
Signal: Strong signal strength (4)
PS: Packet Switched Registered, home network (LE_MRC_REG_HOME)

The SIM is registered and has a strong signal strength on the UMTS network.

To make sure there is an Access Point Name (APN) set up for data connectivity:

Command: cm data


# cm data

Index: 1
PDP Type: IPV4
Connected: no

AirVantage server only supports IPV4 for PDP. If your PDP connection is not using IPV4 you can change it with the following:

Command: cm data pdp IPV4

Check the IP Address

To establish a data connection, make sure the data connection is established, and an IP address can be obtained.

Command: cm data connect


# cm data connect

Setting up profile 1
Setting access point name ... ok
Setting packet data protocol ... ok
Setting Authentication ... ok
Connecting ... ok
Checking if device is up ... ok
Routing ... ok
Updating /etc/resolv.conf ... ok
Updating /etc/resolv.conf ... ok
Testing connection ... ok

From the above output the device is currently using profile 1 which is the APN ( and that the routing table is ok. Verify the IP address with the following command.

Command: cm data


# cm data

Index: 1
PDP Type: IPV4
Connected: yes
Interface: rmnet0
Family: inet
IP: 123.345.567.789

Check Network Connections

You should now be able to ping the outside world.


# ping
PING ( 56(84) bytes of data.
64 bytes from ( icmp_seq=1 ttl=54 time=6.19 ms
64 bytes from ( icmp_seq=2 ttl=54 time=9.55 ms
64 bytes from ( icmp_seq=3 ttl=54 time=6.07 ms
64 bytes from ( icmp_seq=4 ttl=54 time=5.73 ms
64 bytes from ( icmp_seq=5 ttl=54 time=19.3 ms
64 bytes from ( icmp_seq=6 ttl=54 time=5.80 ms

Ping the AirVantage bootstrap server.

# ping
PING ( 56 data bytes
64 bytes from seq=0 ttl=234 time=269.007 ms
64 bytes from seq=1 ttl=234 time=258.111 ms
64 bytes from seq=2 ttl=234 time=707.798 ms
64 bytes from seq=3 ttl=234 time=237.510 ms
64 bytes from seq=4 ttl=234 time=246.483 ms

Configure user agreements

Before starting a session with the AirVantage server, check the user agreements and configure them if needed using APIs le_avc_GetUserAgreement()/le_avc_SetUserAgreement() or using the AT command.

By default, user agreements are disabled. This means that avcService automatically accepts requests from the server without asking for user approval: it initiates a connection to the server, download/install packages and reboots the target if needed.

If you want to have control on these operations and be able to accept or defer them, you need to enable the corresponding user agreement for each operation (connect, download, install, uninstall, reset). Thus, avcService notifies registered apps each time a pending request is ongoing and waits for your approval.

Example for WPX5XX/WP76XX/FX30 Customers:


+WDSC: 0,0 # user agreement for connection to server disabled
+WDSC: 1,0 # user agreement for package download disabled
+WDSC: 2,0 # user agreeemnt for package install disabled
+WDSC: 3,0
+WDSC: 4,15,60,240,480,1440,2880,0,0
+WDSC: 5,0 # user agreement for reboot disabled
+WDSC: 6,0 # user agreeemnt for package uninstall disabled


AT+WDSC=3,1 # activates user agreement for package download
AT+WDSC=4,1 # activates user agreement for package install

Connect to the AirVantage server

At this point the target is ready to be connected to the AirVantage server. Use the api le_avc_StartSession() to start a session or use the AT command to connect the device to AirVantage.

Steps to connect to the AirVantage server with AT commands:

  • ssh to device: ssh
  • open an AT connection: microcom -E /dev/ttyAT
  • enable all notification: AT+WDSI=4479
  • connect to the AirVantage server: AT+WDSS=1,1

Example for WPX5XX/WP76XX/FX30 Customers:

# microcom -E /dev/ttyAT
AT+WDSI=4479  # activates all AirVantage server notifications
AT+WDSS=1,1   # starts a connection to the AirVantage server
+WDSI: 4      # displays the current state of authentication notification
+WDSI: 6      # displays that the session has succeeded and has started
+WDSI: 23,1   # displays that the target has successfully connected to the AirVantage Service

For information on AT Commands download the AT Command Reference from your module provider.

AirPrime WPX5XX/WP76XX AT Command Reference

If you check on the AirVantage Web Admin Console you will see that the "Comm. Status" should be green and the Last Seen should indicate very recent.

Configure Frequency of Connections

Within your Polling Timer, Hearbeat and Lifetime are all set the same and indicate how frequently the device connects to the AirVantage server.

The Polling Timer can be enabled by setting it to a non-zero value either with le_avc_SetPollingTimer(), or by using the following AT commands:

Example of setting the polling timer to 1 minute.

# microcom /dev/ttyAT
AT+WDSC=3,1           # 3 specifies the polling timer, and 1 sets the number of minutes

Retry timers are built into the AVC API to build resiliency into the system.

Example Scenario: Let's say we set the polling timer to connect to the server every 24 hours. The mobile device may be in an area where there is a network loss that happens everyday and prevents the target from connecting. The device will never be able to establish a connection to the AirVantage server in this case because it's trying to connect to server only when there is no network. To prevent this Retry timers should be set at a variety of times enabling a greater chance of strong network connections.

Retry Timers can be initiated by using either le_avc_StartSession() or by setting the polling timer. If the session fails, the retry timers can use up to 8 attempts to connect back to the AirVantage server.

The retry timer can be set using le_avc_SetRetryTimers() or by using the following AT commands:

Example of setting the retry timer:

# microcom /dev/ttyAT
AT+WDSC=4,15,60,240,480,1440,2880,0,0  # 4 specifies the retry timer

Above command indicates that a retry will be attempted retried after 15 minutes, 1 hour, 4 hours, 8 hours, 1 day and 2 days, the last two retries are disabled.