ASUSTek Computer Inc.

ASUS API
Programming Guide

Manual Rev.: 1.02
Revision Date: 2022/02/23

Revision History
Revision

Date

Change1.00

2021/10/08 Initial release

1.01

2021/11/15 Add Tinker Board 2/2S, Tinker Edge R support
Add APIs of Vehicle Co-Processors.
Add APIs of AsusBoardGet/SetComPortMode

1.02

2022/02/23 Add APIs of AsusBoardGet/SetModeOfMiniPCIeSlot
Add APIs of AsusBoardGet/SelectSIMSlot
Add PE100A support on Debian 10 OS1

Table of Contents
Revision History .................................................................................................................................................. 1
Table of Contents ................................................................................................................................................ 2
1

2

Introduction ................................................................................................................................................. 7
1.1

File Description ......................................................................................................................... 7

1.2

ASUS API Supported Functions ............................................................................................... 8

1.3

Supported OS .......................................................................................................................... 10

Function Documentation........................................................................................................................... 10
2.1

Initailization Functions ............................................................................................................ 10

2.1.1

EApiLibInitialize ..................................................................................................................... 10

2.1.2

EApiLibUnInitialize ................................................................................................................ 11

2.2

System Monitoring & Board Information ............................................................................... 11

2.2.1

EApiBoardGetStringA ............................................................................................................ 11

2.2.2

EApiBoardGetValue ............................................................................................................... 12

2.2.3

AsusBoardSetValue................................................................................................................. 14

2.2.4

AsusBoardGetComPortMode .................................................................................................. 15

2.2.5

AsusBoardSetComPortMode .................................................................................................. 16

2.2.6

AsusBoardGetModeOfMiniPCIeSlot ...................................................................................... 17

2.2.7

AsusBoardSetModeOfMiniPCIeSlot ...................................................................................... 18

2.2.8

AsusBoardGetSelectedSIMSlot .............................................................................................. 19

2.2.9

AsusBoardSelectSIMSlot ........................................................................................................ 20

2.3

GPIO Functions ....................................................................................................................... 21

2.3.1

EApiGPIOGetDirectionCaps .................................................................................................. 21

2.3.2

EApiGPIOGetDirection .......................................................................................................... 22

2.3.3

EApiGPIOSetDirection ........................................................................................................... 232

2.3.4EApiGPIOGetLevel ................................................................................................................ 24

2.3.5

EApiGPIOSetLevel ................................................................................................................. 25

2.4

Watchdog ................................................................................................................................ 26

2.4.1

EApiWDogGetCap.................................................................................................................. 26

2.4.2

EApiWDogStart ...................................................................................................................... 27

2.4.3

AsusWDogStartWdtService .................................................................................................... 28

2.4.4

EApiWDogTrigger .................................................................................................................. 29

2.4.5

EApiWDogStop....................................................................................................................... 29

2.5Power Scheduling .................................................................................................................... 30

2.5.1

AsusSystemBootSet ................................................................................................................ 30

2.5.2

AsusSystemBootGet................................................................................................................ 32

2.6

Functions for the I2C Bus ....................................................................................................... 34

2.6.1

EApiI2CGetBusCap ................................................................................................................ 34

2.6.2

EApiI2CWriteReadRaw .......................................................................................................... 35

2.6.3

EApiI2CReadTransfer ............................................................................................................. 37

2.6.4

EApiI2CWriteTransfer ............................................................................................................ 38

2.6.5

EApiI2CProbeDevice .............................................................................................................. 39

2.7

Connectivity Management ...................................................................................................... 40

2.7.1

AsusConnMgrModemGetNumberofModems ......................................................................... 40

2.7.2

AsusConnMgrModemGetModemInfo .................................................................................... 41

2.7.3

AsusConnMgrModemStartNetwork........................................................................................ 43

2.7.4

AsusConnMgrModemStopNetwork ........................................................................................ 44

2.7.5

AsusConnMgrModemPowerOn .............................................................................................. 44

2.7.6

AsusConnMgrModemPowerOff ............................................................................................. 45

2.7.7

AsusConnMgrModemRestart .................................................................................................. 46

2.7.8

AsusConnMgrModemGetKeepAliveStatus ............................................................................ 47

2.7.9

AsusConnMgrModemSetKeepAlive ....................................................................................... 47
3

2.7.10

AsusConnMgrModemGetStatus.............................................................................................. 48

2.7.11

AsusConnMgrModemGetAttachedStatus ............................................................................... 53

2.7.12

AsusConnMgrModemSwitchSIM ........................................................................................... 56

2.7.13

AsusConnMgrModemUnlockSIMByPIN ............................................................................... 57

2.7.14

AsusConnMgrModemSetFlightMode ..................................................................................... 58

2.7.15

AsusConnMgrModemSetAPN ................................................................................................ 59

2.7.16

AsusConnMgrModemSetUser ................................................................................................ 60

2.7.17

AsusConnMgrModemSetPassword......................................................................................... 60

2.7.18

AsusConnMgrModemSetIPType ............................................................................................ 61

2.7.19AsusConnMgrModemGetProfile ............................................................................................ 62

2.7.20

AsusConnMgrModemResetProfile ......................................................................................... 64

2.7.21

AsusConnMgrModemSwitchCarrier ....................................................................................... 65

2.7.22

AsusConnMgrModemCheckCarrier........................................................................................ 66

2.7.23

AsusConnMgrModemGetICCID ............................................................................................ 69

2.7.24

AsusConnMgrModemGetIMSI ............................................................................................... 70

2.7.25

AsusConnMgrModemGetSignalStrength................................................................................ 71

2.7.26

AsusConnMgrModemGetAdvancedSignalInfo ...................................................................... 72

2.7.27

AsusConnMgrModemGetCellLocationInfo ............................................................................ 75

2.7.28

AsusConnMgrSetFailover ....................................................................................................... 77

2.7.29AsusConnMgrGetFailoverStatus............................................................................................. 78

2.7.30

AsusConnMgrSetFailoverGroup ............................................................................................. 79

2.7.31

AsusConnMgrGetFailoverGroup ............................................................................................ 80

2.8

LED Control ............................................................................................................................ 81

2.8.1

AsusLedGetInfo ...................................................................................................................... 81

2.8.2

AsusLedGetNumberofLeds ..................................................................................................... 83

2.8.3

AsusLedTurnOn ...................................................................................................................... 84

2.8.4

AsusLedTurnOff ..................................................................................................................... 854

2.8.5
2.9

AsusLedSetSystemOccupied................................................................................................... 86
Vehicle Co-Processors ............................................................................................................ 87

2.9.1

AsusVcpRtcTimeSet ............................................................................................................... 87

2.9.2

AsusVcpRtcTimeGet............................................................................................................... 88

2.9.3

AsusVcpComPortInit .............................................................................................................. 89

2.9.4

AsusVcpComPortEnable ......................................................................................................... 91

2.9.5

AsusVcpComPortDisable ........................................................................................................ 92

2.9.6

AsusVcpComPortRead............................................................................................................ 92

2.9.7

AsusVcpComPortWrite ........................................................................................................... 93

2.9.8

AsusVcpWakeupEnable .......................................................................................................... 94

2.9.9

AsusVcpWakeupDisable ......................................................................................................... 95

2.9.10

AsusVcpGetWakeupStatus ..................................................................................................... 96

2.9.11AsusVcpGetLastWakeupSource ............................................................................................. 98

2.9.12

Vehicle Co-Processors Power Management (VPM) ............................................................... 99

2.9.12.1

AsusVcpPowerMgmtSetPowerOnEventDelay ....................................................................... 99

2.9.12.2

AsusVcpPowerMgmtGetPowerOnEventDelay ..................................................................... 100

2.9.12.3

AsusVcpPowerMgmtSetPowerOffEventDelay ..................................................................... 101

2.9.12.4

AsusVcpPowerMgmtGetPowerOffEventDelay .................................................................... 102

2.9.12.5

AsusVcpPowerMgmtSetLowBatteryProtectionPreBootThreshold....................................... 103

2.9.12.6

AsusVcpPowerMgmtGetLowBatteryProtectionPreBootThreshold ...................................... 104

2.9.13AsusVcpGSensorEnable ....................................................................................................... 104

2.9.14

AsusVcpGSensorDisable ...................................................................................................... 105

2.9.15

AsusVcpGSensorAvailable ................................................................................................... 106

2.9.16

AsusVcpGSensorGetStatus ................................................................................................... 106

2.9.17

AsusVcpGSensorRead .......................................................................................................... 107

2.9.18

AsusVcpGSensorGetResolution............................................................................................ 108

2.9.19AsusVcpGSensorSetResolution ............................................................................................ 109
5

2.9.20

AsusVcpGSensorGetOffset ................................................................................................... 110

2.9.21AsusVcpGSensorSetOffset ................................................................................................... 111

6

1 Introduction
ASUS API is a layer between hardware drivers and user applications. When a user application wants
to access hardware resources (fan, watchdog, GPIO), it calls the ASUS API function and thisfunction will use dirver or system calls to perform the task.
Supported functions: Obtaining general information about the system
 System monitoring: thermal, voltage, fan, etc.


Watchdog, GPIO control
Power scheduling
Connectivity management

ASUS API is compatible with EAPI specification and goes a step further to offer additional features.
ASUS API is released in the form of the dynamic-link library, so it can be easily used by an arbitrary
application delveloped in C++, C# or higher programming languages. To use ASUS API, application
developers only have to add the ASUS API library to their project.

1.1 File Description
To use the ASUS API, copy the following files to your application folder. We provide the sample
code of how to use the API library, facilitating the development of your programs.
The provided files are:Linux:
output\root\install_asus_library.sh

output\root\usr\lib\libasusapi.so

The shell script to install the library files, the header
files, and the binary files to the environment of the
ASUS device product
Shared object library

output\root\usr\lib\libasusapi.aArchive library

output\root\usr\include\asusapi\asusapi.h

Header file

output\root\usr\bin\asusapiapp

Sample application

output\root\examples\dynamic\README.md Usage of sample application
output\root\examples\dynamic\asusapiapp.c

Code of samepl application

7

1.2 ASUS API Supported Functions
ASUS API Functions
EApiBoardGetStringA
EAPI_ID_BOARD_MANUFACTURER_STR
EAPI_ID_BOARD_NAME_STR
EAPI_ID_BOARD_REVISION_STR
EAPI_ID_BOARD_SERIAL_STR
EAPI_ID_BOARD_BIOS_REVISION_STR
EAPI_ID_BOARD_HW_REVISION_STR
EAPI_ID_BOARD_PLATFORM_TYPE_STR
EApiBoardGetValueEAPI_ID_GET_EAPI_SPEC_VERSIONEAPI_ID_BOARD_BOOT_COUNTER_VAL
EAPI_ID_BOARD_RUNNING_TIME_METER_VAL
EAPI_ID_BOARD_PNPID_VAL
EAPI_ID_BOARD_PLATFORM_REV_VAL
EAPI_ID_BOARD_DRIVER_VERSION_VAL
EAPI_ID_BOARD_LIB_VERSION_VAL
EAPI_ID_HWMON_CPU_TEMP
EAPI_ID_HWMON_CHIPSET_TEMP
EAPI_ID_HWMON_SYSTEM_TEMP
EAPI_ID_HWMON_VOLTAGE_VCORE
EAPI_ID_HWMON_VOLTAGE_2V5
EAPI_ID_HWMON_VOLTAGE_3V3
EAPI_ID_HWMON_VOLTAGE_VBAT
EAPI_ID_HWMON_VOLTAGE_5V
EAPI_ID_HWMON_VOLTAGE_5VSB
EAPI_ID_HWMON_VOLTAGE_12V
EAPI_ID_HWMON_FAN_CPU
EAPI_ID_HWMON_FAN_SYSTEM
ASUS_ID_HWMON_VOLTAGE_VTT
ASUS_ID_HWMON_VOLTAGE_DCIN
ASUS_ID_HWMON_CURRENT_SYSTEM
ASUS_ID_HWMON_SENSOR_01_TEMP
ASUS_ID_HWMON_SENSOR_02_TEMP
ASUS_ID_HWMON_SENSOR_03_TEMPAsusBoardSetValue
AsusBoardGetComPortMode
AsusBoardSetComPortMode
AsusBoardGetModeOfMiniPCIeSlot
AsusBoardSetModeOfMiniPCIeSlot
AsusBoardGetSelectedSIMSlot
AsusBoardSelectSIMSlot
EApiI2CGetBusCap
EApiI2CWriteReadRaw
EApiI2CReadTransfer
EApiI2CWriteTransfer
EApiI2CProbeDevice
EApiWDogGetCap
EApiWDogStart
EApiWDogTrigger
EApiWDogStop
AsusWDogStartWdtService
EApiGPIOGetDirectionCaps
EApiGPIOGetDirection
EApiGPIOSetDirection
EApiGPIOGetLevel
EApiGPIOSetLevel

PE100A

Tinker Edge R

Tinker Board 2/2S

PV100A

V
V
V

V
V
V

V
V
V

V
V
V

V

V

V

V

V

V

V

V

V

V

V

V

V

V

V

V

V
V
V
V
V
V
V
V
V
V

V
V
V
V

V
V
V
V
V
V
V
V
V

V
V
V
V
V

V
V
V
V
V

V
V
V
V
V

8

ASUS API Functions

PE100A

Tinker Edge R

AsusConnMgrModemGetNumberofModems
AsusConnMgrModemGetModemInfo
AsusConnMgrModemStartNetwork
AsusConnMgrModemStopNetwork
AsusConnMgrModemPowerOn
AsusConnMgrModemPowerOff
AsusConnMgrModemRestart
AsusConnMgrModemSwitchSIM
AsusConnMgrModemGetAttachedStatus
AsusConnMgrModemGetStatus
AsusConnMgrModemUnlockSIMByPIN
AsusConnMgrModemSetFlightMode
AsusConnMgrModemSetAPN
AsusConnMgrModemSetUser
AsusConnMgrModemSetPassword
AsusConnMgrModemSetIPType
AsusConnMgrModemCheckCarrier
AsusConnMgrModemSwitchCarrier
AsusConnMgrModemGetICCID
AsusConnMgrModemGetIMSIAsusConnMgrModemGetSignalStrength
AsusConnMgrModemGetAdvancedSignalInfo
AsusConnMgrModemGetProfile
AsusConnMgrModemResetProfile
AsusConnMgrModemGetCellLocationInfo
AsusConnMgrModemSetKeepAlive
AsusConnMgrModemGetKeepAliveStatus
AsusConnMgrSetFailover
AsusConnMgrGetFailoverStatus
AsusConnMgrSetFailoverGroup
AsusConnMgrGetFailoverGroup
AsusVcpGSensorAvailable
AsusVcpGSensorEnable
AsusVcpGSensorDisable
AsusVcpGSensorGetStatus
AsusVcpGSensorRead
AsusVcpGSensorGetResolution
AsusVcpGSensorSetResolution
AsusVcpGSensorGetOffset
AsusVcpGSensorSetOffset
AsusVcpRtcTimeSet
AsusVcpRtcTimeGet
AsusVcpComPortInit
AsusVcpComPortEnable
AsusVcpComPortDisable
AsusVcpComPortRead
AsusVcpComPortWrite
AsusVcpWakeupEnable
AsusVcpWakeupDisable
AsusVcpGetWakeupStatus
AsusVcpGetLastWakeupSource
AsusVcpPowerMgmtSetPowerOnEventDelay
AsusVcpPowerMgmtGetPowerOnEventDelay
AsusVcpPowerMgmtSetPowerOffEventDelay
AsusVcpPowerMgmtGetPowerOffEventDelay
AsusVcpPowerMgmtSetLowBatteryProtectionPreBo
otThreshold
AsusVcpPowerMgmtGetLowBatteryProtectionPreBo
otThreshold

V₁
V₁
V₁
V₁
V₁
V₁
V₁

V₁
V₁
V₁
V₁
V₁
V₁
V₁

V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁

V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁
V₁

Tinker Board 2/2S

PV100A

V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V
V

Notes:
V₁ The support of the API depends on the modem module products. Please contact with the vendor
for more information.
91.3 Supported OS
The following table contains supported Operation Systems for the ASUS products allowed to use
ASUS API.
ASUS ProductOperation System

PE100A

Yocto 3.2 and Debian 10 since the image version v0.0.4

Tinker Edge R

Debian 10 since the image version v2.0.2

Tinker Board 2

Debian 10 since the image version v2.0.2

PV100A

Yocto Sumo since the image version v1.0.2

2 Function Documentation
2.1 Initailization Functions
2.1.1
EApiLibInitialize
uint32_t
EAPI_CALLTYPE
EApiLibInitialize (void);
Description
Initialization of ASUS API. Prior to calling any ASUS API function, the library needs to be
initialized by calling this function. The status code for all API function will be
ASUS_API_STATUS_NOT_INITIALIZED unless this function is called.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details areavailable.
Library initialized.

ASUS_API_STATUS_INITIALIZED

10

2.1.2EApiLibUnInitialize
uint32_t
EAPI_CALLTYPE
EApiLibUnInitialize (void);

Description
The function to uninitialized the API library. Should be called before program exit.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details areavailable.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZED

2.2 System Monitoring & Board Information
2.2.1
EApiBoardGetStringA
uint32_t
EAPI_CALLTYPE
EApiBoardGetStringA (__IN
uint32_t Id,
__OUT
char
*pBuffer,__INOUT
uint32_t *pBufLen);
Description
Text information about the hardware platform. Supports EAPI Id and ASUS Id.
Parameters
In/OutParameter Name

Description

__IN

Id

__OUT

pBuffer

Selects the Get String Sub function Id (refer to the following
EAPI Id Table and the ASUS Id Table)
Pointer to a buffer that receives the value’s data__INOUTpBufLen

Pointer to a variable that specifies the size, in bytes, of thebuffer pointed to by the pBuffer parameter. When the function
returns, this variable contains the size of the data copied topBuffer including the terminating null character
11

EAPI Id Table
Id

Description

Units/Format

EAPI_ID_BOARD_MANUFACTURER_STR Board Manufacturer Namestring

EAPI_ID_BOARD_NAME_STR

Board Namestring

EAPI_ID_BOARD_REVISION_STR

Board Revision

string

EAPI_ID_BOARD_SERIAL_STR

Board Serial Number

string

EAPI_ID_BOARD_BIOS_REVISION_STR

Board BIOS Revision

string

EAPI_ID_BOARD_HW_REVISION_STR
Board HW Revision
EAPI_ID_BOARD_PLATFORM_TYPE_STR Board Platform Id

stringstringReturn Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED
ASUS_API_STATUS_MORE_DATA

2.2.2

One or more of the API function callparameters are out of the defined range.
This function or Id is not supported.
The amount of available data exceeds thebuffer size.
Storage buffer overflow was prevented. Readcount was larger than the defined buffer
length.

EApiBoardGetValue
uint32_t
EAPI_CALLTYPE
EApiBoardGetValue (__INuint32_t Id,__OUT
uint32_t *pValue);

Description
Information about the hardware platform in value format. Supports EAPI Id and ASUS Id.
12

Parameters
In/OutParameter Name

Description

__IN

Id

__OUT

pValueSelects the Get Value Sub function Id (refer to the following
EAPI Id Table and the ASUS Id Table)
Pointer to a buffer that receives the value’s data

EAPI Id Table
Id

Description

Units/Format

EAPI_ID_GET_EAPI_SPEC_VERSION

EAPI Specification Version used
to implement API
Boot Counter

Boots

EAPI_ID_BOARD_RUNNING_TIME_METE
R_VAL
EAPI_ID_BOARD_PNPID_VAL

Running Time Meter

Minutes

Board Vendor PNPID

Compressed
ASCII
PNPID

EAPI_ID_BOARD_PLATFORM_REV_VAL

Platform Specification Version

EAPI_ID_BOARD_DRIVER_VERSION_VAL
EAPI_ID_BOARD_LIB_VERSION_VAL

Vendor Specific Driver Version
Vendor Specific Library Version

EAPI_ID_HWMON_CPU_TEMP

CPU Temperature

0.1 Kelvins

EAPI_ID_HWMON_CHIPSET_TEMP

Chipset Temperature

0.1 Kelvins

EAPI_ID_HWMON_SYSTEM_TEMP

System Temperature

0.1 Kelvins

EAPI_ID_HWMON_VOLTAGE_VCORECPU Core Voltage

Millivolts

EAPI_ID_HWMON_VOLTAGE_2V5

2.5V Voltage

Millivolts

EAPI_ID_HWMON_VOLTAGE_3V3

3.3V Voltage

Millivolts

EAPI_ID_HWMON_VOLTAGE_VBAT

Battery Voltage

Millivolts

EAPI_ID_HWMON_VOLTAGE_5V

5V Voltage

Millivolts

EAPI_ID_HWMON_VOLTAGE_5VSB

5V Standby Voltage

Millivolts

EAPI_ID_HWMON_VOLTAGE_12V

12V Voltage

Millivolts

EAPI_ID_HWMON_FAN_CPU

CPU Fan

RPM

EAPI_ID_HWMON_FAN_SYSTEM

System Fan

RPM

Id

Description

Units/Format

ASUS_ID_HWMON_VOLTAGE_VTTVTT Voltage

Millivolts

EAPI_ID_BOARD_BOOT_COUNTER_VAL

ASUS Id Table

13

ASUS_ID_HWMON_VOLTAGE_DCIN

DC-IN Voltage

Millivolts

ASUS_ID_HWMON_CURRENT_SYSTEM

System Current

Milliamperes

ASUS_ID_HWMON_SENSOR_01_TEMP

Sensor 01 Temperature.
In PV100A, it indicates thetemperature around MB SoC
Sensor 02 Temperature.
In PV100A, it indicates thetemperature around LTE module
Sensor 03 Temperature.
In PV100A, it indicates thetemperature around WiFi module

0.1 Kelvins

ASUS_ID_HWMON_SENSOR_02_TEMP

ASUS_ID_HWMON_SENSOR_03_TEMP

0.1 Kelvins

0.1 Kelvins

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.2.3

One or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

AsusBoardSetValue
uint32_t
ASUS_CALLTYPE
AsusBoardSetValue (__INuint32_t Id,__IN
uint32_t Value);

Description
Sets the value of the system hardware component.
Parameters
In/OutParameter Name

Description

__IN

Id

Selects the Id of the system hardware component (refer to thefollowing EAPI Id Table and the ASUS Id Table)
14

__IN

Value

Sets the value of the selected system hardware component.

EAPI Id Table
Id

Description

Units/Format

EAPI_ID_HWMON_FAN_CPU

CPU Fan

RPM

EAPI_ID_HWMON_FAN_SYSTEM

System Fan

RPM

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
AUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.2.4

AsusBoardGetComPortModeuint32_t
ASUS_CALLTYPE
AsusBoardGetComPortMode (__INuint32_t Id,__OUT
enum ASUS_COM_PORT_MODE *pMode);

Description
Gets the com port mode of the com port Id.
Parameters
In/OutParameter Name

Description

__IN

Id

The com port Id

__OUT

pMode

Pointer to a variable that receives the com port mode. Refer tothe following enum: ASUS_COM_PORT_MODE.

Enum of ASUS_COM_PORT_MODE
Parameter

Description
15

ASUS_COM_PORT_MODE_RS232

RS232

ASUS_COM_PORT_MODE_RS422

RS422

ASUS_COM_PORT_MODE_RS485

RS485

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.2.5

One or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

AsusBoardSetComPortModeuint32_t
ASUS_CALLTYPE
AsusBoardSetComPortMode (__INuint32_t Id,__INenum ASUS_COM_PORT_MODE Mode);

Description
Sets the com port mode of the com port Id.
Parameters
In/OutParameter Name

Description

__IN

Id

The com port Id

__IN

Mode

The com port mode. Refer to the following enum:
ASUS_COM_PORT_MODE.

Enum of ASUS_COM_PORT_MODE
Parameter

Description

ASUS_COM_PORT_MODE_RS232

RS232

ASUS_COM_PORT_MODE_RS422

RS422
16

ASUS_COM_PORT_MODE_RS485

RS485

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.2.6

One or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

AsusBoardGetModeOfMiniPCIeSlot
uint32_t
ASUS_CALLTYPE
AsusBoardGetModeOfMiniPCIeSlot (__INenum ASUS_BOARD_ID_OF_MPCIE_SLOT Id,__OUT
enum ASUS_BOARD_MODE_OF_MPCIE_SLOT *pMode);

Description
Gets the mode of the mPCIe slot.
Parameters
In/OutParameter Name

Description

__IN

Id

The mPCIe slot Id. Refer to the following enum:
ASUS_BOARD_ID_OF_MPCIE_SLOT.

__OUT

pMode

Pointer to a variable that receives the mode of the mPCIe slot.
Refer to the following enum:
ASUS_BOARD_MODE_OF_MPCIE_SLOT.

Enum of ASUS_BOARD_ID_OF_MPCIE_SLOTParameter

Description

MPCIE_SLOT_ID00

The mPCIe slot Id 0

Enum of ASUS_BOARD_MODE_OF_MPCIE_SLOT
17

Parameter

Description

PCIE_MODE_OF_MPCIE_SLOTThe PCIe mode

SATA_MODE_OF_MPCIE_SLOTThe SATA mode

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.2.7

One or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

AsusBoardSetModeOfMiniPCIeSlot
uint32_t
ASUS_CALLTYPE
AsusBoardSetModeOfMiniPCIeSlot (__INenum ASUS_BOARD_ID_OF_MPCIE_SLOT Id,__IN
enum ASUS_BOARD_MODE_OF_MPCIE_SLOT Mode);

Description
Sets the mode of the mPCIe slot.
Parameters
In/OutParameter Name

Description

__IN

Id

The mPCIe slot Id. Refer to the following enum:
ASUS_BOARD_ID_OF_MPCIE_SLOT.

__IN

Mode

The mode of the mPCIe slot. Refer to the following enum:
ASUS_BOARD_MODE_OF_MPCIE_SLOT.

Enum of ASUS_BOARD_ID_OF_MPCIE_SLOTParameter

Description

MPCIE_SLOT_ID00

The mPCIe slot Id 0
18

Enum of ASUS_BOARD_MODE_OF_MPCIE_SLOTParameter

Description

PCIE_MODE_OF_MPCIE_SLOTThe PCIe mode

SATA_MODE_OF_MPCIE_SLOTThe SATA mode

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.2.8

One or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

AsusBoardGetSelectedSIMSlot
uint32_t
ASUS_CALLTYPE
AsusBoardGetSelectedSIMSlot (__OUTenum ASUS_BOARD_ID_OF_SIM_SLOT *pId);

Description
Gets the current selected SIM slot Id.
Parameters
In/OutParameter Name

Description

__OUT

pId

Pointer to a variable that receives the current selected SIM slot
Id. Refer to the following enum:
ASUS_BOARD_ID_OF_SIM_SLOT.

Enum of ASUS_BOARD_ID_OF_SIM_SLOTParameter

Description

BOARD_SIM_SLOT_ID00

The SIM slot Id 0

BOARD_SIM_SLOT_ID01

The SIM slot Id 1
19

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.2.9

One or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

AsusBoardSelectSIMSlot
uint32_t
ASUS_CALLTYPE
AsusBoardSelectSIMSlot (__INenum ASUS_BOARD_ID_OF_SIM_SLOT Id);

Description
Selects the SIM slot to be used.
Parameters
In/OutParameter Name

Description

__IN

Id

The SIM slot Id. Refer to the following enum:
ASUS_BOARD_ID_OF_SIM_SLOT.

Enum of ASUS_BOARD_ID_OF_SIM_SLOTParameter

Description

BOARD_SIM_SLOT_ID00

The SIM slot Id 0

BOARD_SIM_SLOT_ID01

The SIM slot Id 1

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZED20

ASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

2.3 GPIO Functions
2.3.1
EApiGPIOGetDirectionCaps
uint32_t
EAPI_CALLTYPE
EApiGPIOGetDirectionCaps (__INuint32_t Id,__OUTPUT uint32_t *pInputs,__OUTPUT uint32_t *pOutputs);
Description
Reads the capabilities of the current GPIO implementation from the selected GPIO interface.
The direction of this port can be configurred by EApiGPIOSetDirection.
Parameters
In/OutParameter Name

Description

__IN

Id

GPIO Ids__OUTPUT

pInputs__OUTPUT

pOutputs

Pointer to a buffer that receives the bit mask of the supported
inputsPointer to a buffer that receives the bit mask of the supported
outputs

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

21

2.3.2EApiGPIOGetDirection
uint32_t
EAPI_CALLTYPE
EApiGPIOGetDirection (__IN
uint32_t Id,__IN
uint32_t Bitmask,__OUT
uint32_t *pDirection);

Description
Reads the current configuration of the selected GPIO ports.
Parameters
In/OutParameter Name

Description

__IN

Id

GPIO Ids__IN

Bitmask

Bit mask. Only selected bits are returned. Unselected bits return 0__OUT

pDirection

Pointer to a buffer that receives the direction of the selected GPIO
ports. Bits with the value EAPI_GPIO_INPUT are inputs, bitswith EAPI_GPIO_OUTPUT are outputs

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
ASUS_API_STATUS_INVALID_BITMASKThe bitmask selects bits/GPIOs which are notsupported for the current Id.

22

2.3.3

EApiGPIOSetDirection
uint32_t
EAPI_CALLTYPE
EApiGPIOSetDirection (__IN
uint32_t Id,__IN
uint32_t Bitmask,__IN
uint32_t Direction);

Description
Sets the configuration for the selected GPIO ports.
Parameters
In/OutParameter Name

Description

__IN

Id

GPIO Ids__IN

Bitmask__IN

Direction

Bit mask. Only selected bits are changed. Unselected bits remainunchanged
Sets the direction of the selected GPIO ports. Bits with the value
EAPI_GPIO_INPUT are inputs, bits with EAPI_GPIO_OUTPUT
are outputs

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
ASUS_API_STATUS_INVALID_BITMASKASUS_API_STATUS_INVALID_DIRECTION

The bitmask selects bits/GPIOs which are notsupported for the current Id.
The current direction argument attemps to set
GPIOs to unsupportted directions.

23

2.3.4EApiGPIOGetLevel
uint32_t
EAPI_CALLTYPE
EApiGPIOGetLevel (__INuint32_t Id,__IN
uint32_t Bitmask,__OUT
uint32_t *pLevel);

Description
Read the level from GPIO ports.
Parameters
In/OutParameter Name

Description

__IN

Id

GPIO Ids__IN

Bitmask

Bit mask. Only selected bits are returned. Unselected bits return 0__OUT

pLevelPointer to a buffer that receives the level of the selected GPIO
ports. Bits with the value EAPI_GPIO_HIGH are high levels, bitswith EAPI_GPIO_LOW are low levels

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
ASUS_API_STATUS_INVALID_BITMASKThe bitmask selects bits/GPIOs which are notsupported for the current Id.

24

2.3.5EApiGPIOSetLevel
uint32_t
EAPI_CALLTYPE
EApiGPIOSetLevel (__INuint32_t Id,__IN
uint32_t Bitmask,__IN
uint32_t Level);

Description
Write level to GPIO ports. Depending on the hardware implementation, writing multiple GPIO ports
with the bit mask option does not guarantee a time synchronous change of the output levels.
Parameters
In/OutParameter Name

Description

__IN

Id

GPIO Ids__IN

Bitmask

__IN

Level

Bit mask. Only selected bits are changed. Unselected bits remainunchanged
Sets the levels of the selected GPIO ports. Bits with the value
EAPI_GPIO_HIGH are high levels, bits with EAPI_GPIO_LOW
are low levels

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
ASUS_API_STATUS_INVALID_BITMASKThe bitmask selects bits/GPIOs which are notsupported for the current Id.

25

2.4 Watchdog
2.4.1
EApiWDogGetCap
uint32_t
EAPI_CALLTYPE
EApiWDogGetCap (__OUTPUT uint32_t *pMaxDelay,__OUTPUT uint32_t *pMaxEventTimeout,__OUTPUT uint32_t *pMaxResetTimeout);
Description
Get the capibilities of the watchdog timer.
Parameters
In/OutParameter Name

Description__OUTPUT

pMaxDelay__OUTPUT

pMaxEventTimeout__OUTPUT

pMaxResetTimeout

Pointer to a buffer that receives maximum supported
initial delay time of the watchdog timer in milliseconds. If
the value returns 0, it means not support event timeouot.
Pointer to a buffer that receives maximum supported event
timeout of the watchdog timer in milliseconds. If the value
returns 0, it means not support event timeouot.
Pointer to a buffer that receives maximum supported reset
timeout of the watchdog timer in milliseconds.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to thewatchdog. The caller should have root
permission.

26

2.4.2EApiWDogStart
uint32_t
EAPI_CALLTYPE
EApiWDogStart (__IN
uint32_t Delay,__IN
uint32_t EventTimeout,__IN
uint32_t ResetTimeout);

Description
Start the watchdog timer and set the parameters. To adjust the parameters, the watchdog must be
stopped via EApiWDogStop and then EApiWDogStart must be called again with the new values.
In Linux, the watchdog daemon should be disabled before calling this function. That is to say,
“RuntimeWatchdogSec” and “ShutdownWatchdogSec” need to be commented in the file/etc/systemd/system.conf
Parameters
In/OutParameter Name

Description

__IN

Delay

Initial delay for the watchdog timer in milliseconds.

__IN

EventTimeout

Watchdog timeout interval in milliseconds to trigger an event.

__IN

ResetTimeout

Watchdog timeout interval in milliseconds to trigger a reset.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_RUNNING

Watchdog timer already started.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to thewatchdog. The caller should have root
permission.
27

2.4.3AsusWDogStartWdtService
uint32_t
ASUS_CALLTYPE
AsusWDogStartWdtService (__IN
uint32_t Delay,__IN
uint32_t ResetTimeout);

Description
Start the Watchdog Timer Service (the WDT Service) and set the parameters. To adjust theparameters, the WDT Service must be stopped via EApiWDogStop and then
AsusWDogStartWdtService must be called again with the new values.
After the WDT Service has been started by the AsusWDogStartWdtService function, the WDT
Service will automatically send the first trigger within (Delay + ResetTimeouot) milliseconds as set
with AsusWDogStartWdtService function, following the first trigger every subsequent trigger will besent by the WDT Service within (ResetTimeout) milliseconds.
Parameters
In/OutParameter Name

Description

__IN

Delay

Initial delay for the watchdog timer in milliseconds.

__IN

ResetTimeout

Watchdog timeout interval in milliseconds to trigger a reset.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_RUNNING

Watchdog timer already started.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to thewatchdog. The caller should have root
permission.

28

2.4.4EApiWDogTrigger
uint32_t
EAPI_CALLTYPE
EApiWDogTrigger (void);

Description
Trigger the watchdog timer.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR
ASUS_API_STATUS_NOT_INITIALIZEDGeneric error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to thewatchdog. The caller should have root
permission.

2.4.5

EApiWDogStop
uint32_t
EAPI_CALLTYPE
EApiWDogStop (void);

Description
Stops the operation of the watchdog timer.
The Watchdog Timer Service (the WDT Service) will be stopped as well if the WDT Service isrunning.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR
ASUS_API_STATUS_NOT_INITIALIZEDGeneric error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
29

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to thewatchdog. The caller should have root
permission.

2.5 Power Scheduling
2.5.1
AsusSystemBootSetuint32_t
ASUS_CALLTYPEAsusSystemBootSet (
__IN
__IN
__IN

uint32_t Id,
uint32_t Frequency,
uint32_t DayofMonth,

__IN
__IN
__IN
__IN

uint32_t DayofWeek,
uint32_t Hour,uint32_t Minute,uint32_t Second);

Description
Power Scheduling provides the boot up, shutdown, restartr, and sleep function for the system state
management.
Be able to set Id for the action of Power Scheduling, such as boot up, shutdown, restart, sleep, etc.,
and be able to schedule the freguency, which can be daily, weekly, monthly, or one shot, on that
action.
Parameters
In/OutParameter Name

Description

__IN

Id

__IN

Frequency__IN

DayofMonth

Selects Power Scheduling function Id (refer to the following ASUS
Power Scheduling Id Table)
Selects Power Scheduling Frequency (refer to the following ASUS
Power Scheduling Frequency Table)
Selects the day of month, such as 1, 2, …, 30, and 31.

__IN

DayofWeek

__IN

Hour

Selects the day of week (refer to the following ASUS DayofWeek
Table)
Selects the hour, such as 0, 1, …, 22, and 23.

__IN

MinuteSelects the minute, such as 0, 1, …, 58, and 59.

__IN

SecondSelects the second, such as 0, 1, …, 58, and 59.
30

ASUS Power Scheduling Id Table
Id

Description

ASUS_ID_SYSTEM_BOOT_BOOTUP
ASUS_ID_SYSTEM_BOOT_SHUTDOWN

Boot up or wake up function. Boot up or wake up
the system.
Shutdown function. Shutdown the system.

ASUS_ID_SYSTEM_BOOT_SLEEP

Sleep function. Sleep the system.

ASUS_ID_SYSTEM_BOOT_RESTART

Restart function. Restart the system.

ASUS Power Scheduling Frequency Table
Id

Description

ASUS_SYSTEM_BOOT_DISABLE_FREQUENCY

Disable the selected function.
The arguments DayofMonth,DayofWeek, Hour, Minute, andSecond are useless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_DAILY
The selected function will
action daily. The arguments
DayofMonth, DayofWeek areuseless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_WEEKLY
The selected function will
action weekly. The argument
DayofMonth is useless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_MONTHLY The selected function will
action monthly. The argument
DayofWeek is useless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_ONE_SHOT The selected function will
action one shot. The arguments
DayofMonth, DayofWeek areuseless.
ASUS Power Scheduling Frequency Table
Id
ASUS_SYSTEM_BOOT_WEEKLY_SUNDAY
ASUS_SYSTEM_BOOT_WEEKLY_MONDAY
ASUS_SYSTEM_BOOT_WEEKLY_TUESDAY
ASUS_SYSTEM_BOOT_WEEKLY_WEDNESDAY
ASUS_SYSTEM_BOOT_WEEKLY_THURSDAY
ASUS_SYSTEM_BOOT_WEEKLY_FRIDAY
31

ASUS_SYSTEM_BOOT_WEEKLY_SATURDAY
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.5.2

AsusSystemBootGet
uint32_t
ASUS_CALLTYPEAsusSystemBootGet (__IN
uint32_t Id,__OUT uint32_t *pFrequency,
__OUT
__OUT
__OUT
__OUT
__OUT

uint32_t *pDayofMonth,uint32_t *pDayofWeek,
uint32_t *pHour,uint32_t *pMinute,uint32_t *pSecond);

Description
Reads the frequency and the configuration of the Power Scheduling function from the selectedfunction Id.
The frequency and the configuration of the Power Scheduling function can be set by the
AsusSystemBootSet().
Parameters
In/OutParameter Name

Description

__IN

Id

__OUT

pFrequency

Selects Power Scheduling function Id (refer to the following ASUS
Power Scheduling Id Table)
Pointer to a buffer that receives the frequency of the selectedfunction Id (refer to the following ASUS Power Scheduling32

Frequency Table)__OUT

pDayofMonth__OUT

pDayofWeek

__OUT

pHour

__OUT

pMinute__OUT

pSecond

Pointer to a buffer that receives the day of month of the selectedfunction Id
Pointer to a buffer that receives the day of week of the selectedfunction Id
Pointer to a buffer that receives the hour of the selected function Id
Pointer to a buffer that receives the minute of the selected function
Id
Pointer to a buffer that receives the second of the selected function
Id

ASUS Power Scheduling Id Table
Id

Description

ASUS_ID_SYSTEM_BOOT_BOOTUP

Boot up or wake up function.

ASUS_ID_SYSTEM_BOOT_SHUTDOWN

Shutdown function.

ASUS_ID_SYSTEM_BOOT_SLEEP

Sleep function.

ASUS_ID_SYSTEM_BOOT_RESTART

Restart function.

ASUS Power Scheduling Frequency Table
Id

Description

ASUS_SYSTEM_BOOT_DISABLE_FREQUENCY

The selected function isdisabled. The arguments
DayofMonth, DayofWeek,
Hour, Minute, and Second areuseless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_DAILY
The selected function actions
daily. The arguments
DayofMonth, DayofWeek areuseless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_WEEKLY
The selected function actions
weekly. The argument
DayofMonth is useless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_MONTHLY The selected function actions
monthly. The argument
DayofWeek is useless.
ASUS_SYSTEM_BOOT_ENABLE_FREQUENCY_ONE_SHOT The selected function actions
one shot. The arguments
DayofMonth, DayofWeek areuseless.
33

ASUS Power Scheduling Frequency Table
Id
ASUS_SYSTEM_BOOT_WEEKLY_SUNDAY
ASUS_SYSTEM_BOOT_WEEKLY_MONDAY
ASUS_SYSTEM_BOOT_WEEKLY_TUESDAY
ASUS_SYSTEM_BOOT_WEEKLY_WEDNESDAY
ASUS_SYSTEM_BOOT_WEEKLY_THURSDAY
ASUS_SYSTEM_BOOT_WEEKLY_FRIDAY
ASUS_SYSTEM_BOOT_WEEKLY_SATURDAY
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.6 Functions for the I2C Bus
2.6.1
EApiI2CGetBusCap
uint32_t
EAPI_CALLTYPE
EApiI2CGetBusCap (__IN__OUTPUT

uint32_t Id,
uint32_t *pMaxBlkLen);

Description
Gets the capabilities of the selected I2C bus.
Parameters
In/OutParameter Name

Description
34

__IN

Id

I2C bus Id__OUTPUT

pMaxBlkLen

Size in bytes. Pointer to a buffer that receives the maximum
transfer block length for the given interface.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.6.2

EApiI2CWriteReadRaw
uint32_t
EAPI_CALLTYPE
EApiI2CWriteReadRaw (
__IN
__IN
__INOPT__IN__OUTOPT__IN__IN

uint32_t Id,
uint8_t Addr,
void*pWBuffer,uint32_t WriteBCnt,
void*pRBuffer,uint32_t RBufLen,
uint32_t ReadBCnt);

Description
Universal function for read and write operations to the I2C bus.
Parameters
In/OutParameter Name

Description

__IN

Id

I2C bus Id

__IN

Addr

__INOPT

pWBuffer

Encoded 7Bit I2C Device Address. It can be derived by the macro
for address encoding: EAPI_I2C_ENC_7BIT_ADDR()
Pointer to a buffer containing the data to be transferred. Thisparameter can be NULL if the data is not required.
35

__IN

WriteBCnt__OUTOPT pRBuffer__IN

RBufLen__IN

ReadBCnt

Size, in bytes, of the information pointed to by the pWBuffer
parameter plus 1. If pWBuffer is NULL, this must be zero or one.
Pointerr to a buffer that receives the read data. This parameter canbe NULL if the data is not required.
Size, in bytes, of the buffer pointed to by the pRBuffer parameter.
If the buffer specified by pRBuffer parameter is not large enoughto hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.
If pRBuffer is NILL, this must be zero.
Size, in bytes, to be read to pRBuffer plus 1. If pRBuffer is
NULL, this must be zero or one.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error
details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_BLOCK_LENGTH This means that the block length is too
long.
ASUS_API_STATUS_BUSY_COLLISION
The selected device or Id is busy or a data
collision was detected.
ASUS_API_STATUS_NOT_FOUND
Selected device was not found.
ASUS_API_STATUS_WRITE_ERROR
ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_TIMEOUT

An error was detected during a write
operation.
The amount of available data exceeds thebuffer size.
Storage buffer overflow was prevented.
Read count was larger than the definedbuffer length.
Timeout due to clock stretching36

2.6.3

EApiI2CReadTransfer
uint32_t
EAPI_CALLTYPE
EApiI2CReadTransfer (__INuint32_t Id,__IN
uint32_t Addr,__IN
uint32_t Cmd,
__OUT
void
*pBuffer,__IN
uint32_t BufLen,__IN

uint32_t ByteCnt);

Description
Reads from a specific register in the selected I2C device.
Reads from I2C device at the I2C address Addr the amount of ByteCnt bytes to the buffer pBuffer
while using the device specific command Cmd. Depending on the addressed I2C device, Cmd can bea specific command or a byte offset.
Parameters
In/OutParameter Name

Description

__IN

Id

I2C bus Id

__IN

Addr

__IN

Cmd

Encoded 7Bit I2C Device Address. It can be derived by the macro
for address encoding: EAPI_I2C_ENC_7BIT_ADDR()
I2C command/offset__OUT

pBuffer__IN

BufLen__IN

ByteCnt

Pointerr to a buffer that receives the read data. This parameter can be
NULL if the data is not required.
Size, in bytes, of the buffer pointed to by the pBuffer parameter.
If the buffer specified by pBuffer parameter is not large enough tohold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.
Size, in bytes, of data to be read

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error
details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZED37

ASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_BLOCK_LENGTH This means that the block length is too
long.
ASUS_API_STATUS_BUSY_COLLISION
The selected device or Id is busy or a data
collision was detected.
ASUS_API_STATUS_NOT_FOUND
Selected device was not found.
ASUS_API_STATUS_WRITE_ERROR
ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_TIMEOUT

2.6.4

An error was detected during a write
operation.
The amount of available data exceeds thebuffer size.
Storage buffer overflow was prevented.
Read count was larger than the definedbuffer length.
Timeout due to clock stretching

EApiI2CWriteTransfer
uint32_t
EAPI_CALLTYPE
EApiI2CWriteTransfer (__INuint32_t Id,__IN
uint32_t Addr,__IN
uint32_t Cmd,
__IN
void
*pBuffer,__IN
uint32_t ByteCnt);

Description
Write to a specific register in the selected I2C device.
Write to an I2C device at the I2C address Addr the amount of ByteCnt bytes from the buffer*pBuffer while using the device specific command Cmd. Depending on the addressed I2C device,
Cmd can be a specific command or a byte offset.
Parameters
In/OutParameter Name

Description

__IN

Id

I2C bus Id

__IN

Addr

Encoded 7Bit I2C Device Address. It can be derived by the macro for38address encoding: EAPI_I2C_ENC_7BIT_ADDR()
__IN

Cmd

I2C command/offset__IN

pBuffer

Pointerr to a buffer containing the data to be transferred.

__IN

ByteCnt

Size, in bytes, of the information pointed to by the pBuffer parameter

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error
details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_BLOCK_LENGTH This means that the block length is too
long.
ASUS_API_STATUS_BUSY_COLLISION
The selected device or Id is busy or a data
collision was detected.
ASUS_API_STATUS_NOT_FOUND
Selected device was not found.
ASUS_API_STATUS_WRITE_ERROR
ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_TIMEOUT

2.6.5

An error was detected during a write
operation.
The amount of available data exceeds thebuffer size.
Storage buffer overflow was prevented.
Read count was larger than the definedbuffer length.
Timeout due to clock stretching

EApiI2CProbeDevice
uint32_t
EAPI_CALLTYPE
EApiI2CProbeDevice (__IN
uint32_t Id,__IN
uint32_t Addr);

Description
39

Probes I2C address to test I2C device present.
Parameters
In/OutParameter Name

Description

__IN

Id

I2C bus Id

__IN

Addr

Encoded 7Bit I2C Device Address. It can be derived by the macro foraddress encoding: EAPI_I2C_ENC_7BIT_ADDR()

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
ASUS_API_STATUS_BUSY_COLLISION
ASUS_API_STATUS_NOT_FOUND

The selected device or Id is busy or a data
collision was detected.
Selected device was not found.

ASUS_API_STATUS_TIMEOUT

Timeout due to clock stretching

2.7 Connectivity Management
2.7.1
AsusConnMgrModemGetNumberofModems
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetNumberofModems (__OUT uint32_t *pValue);
Description
Get the number of the modems.
Parameters
In/OutParameter Name

Description__OUT

pValuePointer to a variable that specifies the number of the modems.
40

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supported.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.2

AsusConnMgrModemGetModemInfo
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetModemInfo (__OUTstruct ConnMgrModemInfo_s *pModemList,__INOUT
uint32_t *pModemCnt);

Description
Gets the information of the modems.
Parameters
In/OutParameter Name

Description__OUT

pModemList

An array of the structures that receives the information of themodems (refer to the following structure: ConnMgrModemInfo_s).

41

__INOUT pModemCnt

Pointer to a variable that specifies the number of theConnMgrModemInfo_s structures pointed to by the pModemList
parameter. When the function returns, this variable contains thenumber of the modems.
If the buffer specified by pModemList parameter is not large
enough to hold the number of the modems, the function returns thevalue ASUS_API_STATUS_MORE_DATA.

Structure of ConnMgrModemInfo_s
Parameter Type

Parameter Name

Description

char

Index

The index of the modem

char[](The array size is defined by
MAX_CHAR_LENGTH_MODEM_INFO)
char[](The array size is defined by
MAX_CHAR_LENGTH_MODEM_INFO)
char[](The array size is defined by
MAX_CHAR_LENGTH_MODEM_INFO)
char[](The array size is defined by
MAX_CHAR_LENGTH_MODEM_INFO)Path

The path of the modem

Manufacturer

The manufacturer of the modem

ModemName

The modem nameFirmwareRevision The firmware revision of themodem

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTED
ASUS_API_STATUS_MORE_DATAOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supported.
The amount of available data exceeds
the buffer size.
Storage buffer overflow wasprevented. Read count was larger thanthe defined buffer length.
42

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.3

AsusConnMgrModemStartNetwork
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemStartNetwork (__IN uint32_t Index);

Description
Start the network connectivity.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

43

2.7.4

AsusConnMgrModemStopNetwork
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemStopNetwork (__IN uint32_t Index);

Description
Stop the network connectivity.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.5

AsusConnMgrModemPowerOn
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemPowerOn (__IN uint32_t Index);

Description
Power on the modem.
Parameters
44

In/Out

Parameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.7.6

AsusConnMgrModemPowerOff
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemPowerOff (__IN uint32_t Index);

Description
Power off the modem.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
One or more of the API function callparameters are out of the defined
range.

ASUS_API_STATUS_INVALID_PARAMETER

45

ASUS_API_STATUS_NOT_INITIALIZED

Library uninitialized.

ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.7

AsusConnMgrModemRestartuint32_t
ASUS_CALLTYPE
AsusConnMgrModemRestart (__IN uint32_t Index);

Description
Power off and power on the modem.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

46

2.7.8

AsusConnMgrModemGetKeepAliveStatus
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetKeepAliveStatus (__OUT
uint32_t *pStatus);

Description
Get the status of the keep alive feature.
Parameters
In/OutParameter Name

Description__OUT

pStatus

Pointer to a variable that receives the value’s data.
The value with ASUS_CMM_KEEP_ALIVE_ON means the keep
alive feature is on. The value with
ASUS_CMM_KEEP_ALIVE_OFF means the keep alive feature is
off.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.9

AsusConnMgrModemSetKeepAlive
uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSetKeepAlive (__IN uint32_t Enable);

Description
47

Allow to enable or disable the keep alive feature.
Parameters
In/OutParameter Name

Description__IN

EnableThe value with ASUS_CMM_KEEP_ALIVE_ON means to turn on
the keep alive feature. The value with
ASUS_CMM_KEEP_ALIVE_OFF means to turn off.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

ASUS_API_STATUS_NOT_INITIALIZEDGeneric error message. No further
error details are available.
One or more of the API function callparameters are out of the defined
range.
Library uninitialized.

ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

ASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.10

AsusConnMgrModemGetStatus

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetStatus (__IN
uint32_t Index,__OUT
struct ConnMgrModemStatus_s *pStatus);
Description
Get the status of the network connection and the information of IP.
Parameters
In/OutParameter Name

Description

48

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pStatus

Pointer to a structure that receives the status of the network
connection and the information of IP (refer to the following
structure: ConnMgrModemStatus_s).

Structure of ConnMgrModemStatus_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pConnected

Pointer to a variable that specifies the status of
the network connection. The variable might be
the string “yes” or the string “no”.

__INOUT uint32_t *pConnectedLen__OUT char *pInterface__INOUT uint32_t *pInterfaceLen__OUT char *pApn__INOUT uint32_t *pApnLen

Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by the
pConnected parameter. When the function
returns, this variable contains the size of thedata copied to pConnected including theterminating null character.
If the buffer specified by pConnectedparameter is not large enough to hold the data,
the function returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the interface
name.
Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by thepInterface parameter. When the function
returns, this variable contains the size of thedata copied to pInterface including theterminating null character.
If the buffer specified by pInterface parameter
is not large enough to hold the data, thefunction returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the APN
name.
Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by the pApn
parameter. When the function returns, this49

__OUT char *pRoaming__INOUT uint32_t *pRoamingLen__OUT struct
ConnMgrModemIpv4Status_s *pIpv4Status__OUT struct
ConnMgrModemIpv6Status_s *pIpv6Status

variable contains the size of the data copied topApn including the terminating null character.
If the buffer specified by pApn parameter is
not large enough to hold the data, the function
returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a variable that specifies the status of
the roaming. The variable might be the string“allowed” or the string “forbidden”.
Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by thepRoaming parameter. When the function
returns, this variable contains the size of thedata copied to pRoaming including theterminating null character.
If the buffer specified by pRoaming parameter
is not large enough to hold the data, thefunction returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a structure that receives theinformation of IPv4 (refer to the following
structure: ConnMgrModemIpv4Status_s).
Pointer to a structure that receives theinformation of IPv6 (refer to the following
structure: ConnMgrModemIpv6Status_s).

Structure of ConnMgrModemIpv4Status_s
In/Out Parameter
Type__OUT char *Parameter Name

Description

pAddress

Pointer to a buffer that receives the IP address.

__INOUT uint32_t *pAddressLen__OUT char *pGateway

Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pAddress parameter. Whenthe function returns, this variable contains the size ofthe data copied to pAddress including the terminatingnull character.
This variable will be zero if the IP address is invalid.
If the buffer specified by pAddress parameter is notlarge enough to hold the data, the function returns thevalue ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the gateway address.

__INOUT uint32_t *pGatewayLen

Pointer to a variable that specifies the size, in bytes, of50

__OUT char *pMtu__INOUT uint32_t *pMtuLen__OUT char *pDns__INOUT uint32_t *pDnsLenthe buffer pointed to by the pGateway parameter. Whenthe function returns, this variable contains the size ofthe data copied to pGateway including the terminatingnull character.
This variable will be zero if the gateway address isinvalid.
If the buffer specified by pGateway parameter is notlarge enough to hold the data, the function returns thevalue ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the MTU.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pMtu parameter. When thefunction returns, this variable contains the size of thedata copied to pMtu including the terminating nullcharacter.
This variable will be zero if the MTU is invalid.
If the buffer specified by pMtu parameter is not large
enough to hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the DNS address.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pDns parameter. When thefunction returns, this variable contains the size of thedata copied to pDns including the terminating nullcharacter.
This variable will be zero if the DNS address is invalid.
If the buffer specified by pDns parameter is not large
enough to hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.

Structure of ConnMgrModemIpv6Status_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pAddress

Pointer to a buffer that receives the IP address.

__INOUT uint32_t *pAddressLen

Pointer to a variable that specifies the size, in bytes,of the buffer pointed to by the pAddress parameter.
When the function returns, this variable contains thesize of the data copied to pAddress including theterminating null character.
This variable will be zero if the IP address is invalid.
If the buffer specified by pAddress parameter is notlarge enough to hold the data, the function returns
51the value ASUS_API_STATUS_MORE_DATA.
__OUT char *pGateway

Pointer to a buffer that receives the gateway address.

__INOUT uint32_t *pGatewayLen__OUT char *pMtu

Pointer to a variable that specifies the size, in bytes,of the buffer pointed to by the pGateway parameter.
When the function returns, this variable contains thesize of the data copied to pGateway including theterminating null character.
This variable will be zero if the gateway address isinvalid.
If the buffer specified by pGateway parameter is notlarge enough to hold the data, the function returns
the value ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the MTU.

__INOUT uint32_t *pMtuLen__OUT char *pDns__INOUT uint32_t *pDnsLen

Pointer to a variable that specifies the size, in bytes,of the buffer pointed to by the pMtu parameter.
When the function returns, this variable contains thesize of the data copied to pMtu including theterminating null character.
This variable will be zero if the MTU is invalid.
If the buffer specified by pMtu parameter is notlarge enough to hold the data, the function returns
the value ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the DNS address.
Pointer to a variable that specifies the size, in bytes,of the buffer pointed to by the pDns parameter.
When the function returns, this variable contains thesize of the data copied to pDns including theterminating null character.
This variable will be zero if the DNS address isinvalid.
If the buffer specified by pDns parameter is not large
enough to hold the data, the function returns thevalue ASUS_API_STATUS_MORE_DATA.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZED52

ASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.11

AsusConnMgrModemGetAttachedStatus

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetAttachedStatus (__IN
uint32_t Index,__OUT
struct ConnMgrModemAttachedStatus_s *pStatus);
Description
Get the attached status of the modem, including the state of the modem and the access technologythat the modem uses when registered with or connected to a network.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can bederived from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pStatus

Pointer to a structure that receives the attached status of the modem(refer to the following structure:
ConnMgrModemAttachedStatus_s).

Structure of ConnMgrModemAttachedStatus_s
Parameter Type

Parameter Name

Description
53

enum
ASUS_CMM_REGISTRATION_STATE

RegistrationStateenum
ASUS_CMM_RADIO_INTERFACERadioInterface

enum
ASUS_CMM_FLIGHT_MODE_STATE

FlightModeState

Refer to the following enum:
ASUS_CMM_REGISTRATION_
STATE
Refer to the following enum:
ASUS_CMM_RADIO_INTERFA
CE
Refer to the following enum:
ASUS_CMM_FLIGHT_MODE_S
TATEEnum of ASUS_CMM_REGISTRATION_STATE
Parameter

Description

CMMODEM_STATE_FAILED

The modem is unusable.

CMMODEM_STATE_UNKNOWNState unknown or not reportable.

CMMODEM_STATE_INITIALIZINGThe modem is currently being initialized.

CMMODEM_STATE_LOCKED

The modem needs to be unlocked.

CMMODEM_STATE_DISABLED

The modem is not enabled and is powered down.

CMMODEM_STATE_DISABLING

The modem is currently transitioning to the
MM_MODEM_STATE_DISABLED state.
The modem is currently transitioning to the
MM_MODEM_STATE_ENABLED state.
The modem is enabled and powered on but notregistered with a network provider and not available
for data connections.
The modem is searching for a network provider toregister with.
The modem is registered with a network provider,and data connections and messaging may beavailable for use.
The modem is disconnecting and deactivating the lastactive packet data bearer. This state will not beentered if more than one packet data bearer is active
and one of the active bearers is deactivated.
The modem is activating and connecting the first
packet data bearer. Subsequent bearer activations
when another bearer is already active do not cause
this state to be entered.
One or more packet data bearers is active andconnected.

CMMODEM_STATE_ENABLINGCMMODEM_STATE_ENABLED

CMMODEM_STATE_SEARCHINGCMMODEM_STATE_REGISTEREDCMMODEM_STATE_DISCONNECTINGCMMODEM_STATE_CONNECTINGCMMODEM_STATE_CONNECTED

54

Enum of ASUS_CMM_RADIO_INTERFACE
Parameter

Description

CMMODEM_ACCESS_TECHNOLOGY_UNKNOWN
CMMODEM_ACCESS_TECHNOLOGY_
POTS
CMMODEM_ACCESS_TECHNOLOGY_
GSM
CMMODEM_ACCESS_TECHNOLOGY_
GSM_COMPACTCMMODEM_ACCESS_TECHNOLOGY_GPRS
CMMODEM_ACCESS_TECHNOLOGY_EDGE
CMMODEM_ACCESS_TECHNOLOGY_
UMTS
CMMODEM_ACCESS_TECHNOLOGY_
HSDPA
CMMODEM_ACCESS_TECHNOLOGY_HSUPA
CMMODEM_ACCESS_TECHNOLOGY_
HSPA
CMMODEM_ACCESS_TECHNOLOGY_
HSPA_PLUS
CMMODEM_ACCESS_TECHNOLOGY_
1XRTT
CMMODEM_ACCESS_TECHNOLOGY_
EVDO0
CMMODEM_ACCESS_TECHNOLOGY_
EVDOA
CMMODEM_ACCESS_TECHNOLOGY_EVDOB
CMMODEM_ACCESS_TECHNOLOGY_LTE
CMMODEM_ACCESS_TECHNOLOGY_
5GNR
CMMODEM_ACCESS_TECHNOLOGY_ANY

The access technology used is unknown.
Analog wireline telephone.
GSM.
Compact GSM.
GPRS.
EDGE (ETSI 27.007: "GSM w/EGPRS").
UMTS (ETSI 27.007: "UTRAN").
HSDPA (ETSI 27.007: "UTRAN w/HSDPA").
HSUPA (ETSI 27.007: "UTRAN w/HSUPA").
HSPA (ETSI 27.007: "UTRAN w/HSDPA andHSUPA").
HSPA+ (ETSI 27.007: "UTRAN w/HSPA+").
CDMA2000 1xRTT.
CDMA2000 EVDO revision 0.
CDMA2000 EVDO revision A.
CDMA2000 EVDO revision B.
LTE (ETSI 27.007: "E-UTRAN")
5GNR (ETSI 27.007: "NG-RAN"). Since 1.14.
Mask specifying all access technologies.

Enum of ASUS_CMM_FLIGHT_MODE_STATE55

Parameter

Description

ASUS_CMM_FLIGHT_MODE_OFF

The flight mode is off.

ASUS_CMM_FLIGHT_MODE_ON

The flight mode is on.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.12

AsusConnMgrModemSwitchSIM

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSwitchSIM (__IN
uint32_t Index,__INuint32_t SimSlotId);
Description
Switch the SIM.
Parameters
In/OutParameter Name

Description

__IN

Index

__IN

SimSlotId

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().
SIM slot Ids (refer to the following ASUS SIM Slot Id Table)

ASUS SIM Slot Id Table
56

Id

Description

Value

ASUS_CMM_SIM_SLOT_0

SIM Slot 00ASUS_CMM_SIM_SLOT_1

SIM Slot 1

1

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.13

AsusConnMgrModemUnlockSIMByPIN

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemUnlockSIMByPIN (__IN
uint32_t Index,__INchar *pPinCode);
Description
Unlock the SIM by PIN code.
Parameters
In/OutParameter Name

Description

__IN

Index

__IN

pPinCode

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().
Pointer to a buffer containing the PIN code to be transferred.

Return Status Code57

Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
2.7.14

AsusConnMgrModemSetFlightModeuint32_t
ASUS_CALLTYPE
AsusConnMgrModemSetFlightMode (__INuint32_t Index,__INenum ASUS_CMM_FLIGHT_MODE_STATE FlightMode);
Description
Turm on or turn off the flight mode.
Parameters
In/OutParameter Name

Description

__IN

Index

__IN

FlightMode

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().
Refer to the following enum:
ASUS_CMM_FLIGHT_MODE_STATE
The value with ASUS_CMM_FLIGHT_MODE_ON means to turnon the flight mode. The value with
ASUS_CMM_FLIGHT_MODE_OFF means to turn off.

Enum of ASUS_CMM_FLIGHT_MODE_STATE
Parameter

Description

ASUS_CMM_FLIGHT_MODE_OFF

The flight mode is off.

ASUS_CMM_FLIGHT_MODE_ON

The flight mode is on.

Return Status Code
Return Value

Description
58

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.15

AsusConnMgrModemSetAPN

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSetAPN (__INchar *pApn);
Description
Set the APN to the profile.
Parameters
In/OutParameter Name

Description

__IN

pApn

Pointer to a buffer containing the APN to be transferred.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

59

2.7.16

AsusConnMgrModemSetUser

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSetUser (__INchar *pUser);
Description
Set the user name to the profile.
Parameters
In/OutParameter Name

Description

__IN

pUser

Pointer to a buffer containing the user name to be transferred.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.17

AsusConnMgrModemSetPassword

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSetPassword (__INchar *pPassword);
Description
Set the password to the profile.

60

Parameters
In/OutParameter Name

Description__IN

pPassword

Pointer to a buffer containing the password to be transferred.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.18

AsusConnMgrModemSetIPType

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSetIPType (__IN
uint32_t IpType);
Description
Set the IP type to the profile.
Parameters
In/OutParameter Name

Description__IN

IpTypeThe IP type (refer to the following ASUS IP Type Table)

ASUS IP Type Table
Id

Description

Value

ASUS_CMM_IP_TYPE_IPV4

IPv4 method0

ASUS_CMM_IP_TYPE_IPV6

IPv6 method

161

ASUS_CMM_IP_TYPE_IPV4V6

IPv4/IPv6 method

2

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.19AsusConnMgrModemGetProfile

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetProfile (__OUTstruct ConnMgrModemProfile_s *pProfile);
Description
Get the information of the profile.
Parameters
In/OutParameter Name

Description__OUT

pProfile

Pointer to a structure that receives the information of the profile(refer to the following structure: ConnMgrModemProfile_s).

Structure of ConnMgrModemProfile_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pApn__INOUT uint32_t *pApnLen

Pointer to a buffer that receives the APN name of the
profile.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pApn parameter. When62

__OUT char *pUser__INOUT uint32_t *pUserLen__OUT char *pPassword__INOUT uint32_t *pPasswordLen__OUT char *pIpv4Method__INOUT uint32_t *pIpv4MethodLen__OUT char *pIpv6Method__INOUT uint32_t *pIpv6MethodLen

the function returns, this variable contains the size ofthe data copied to pApn including the terminating nullcharacter.
If the buffer specified by pApn parameter is not large
enough to hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the user name of the
profile.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pUser parameter. Whenthe function returns, this variable contains the size ofthe data copied to pUser including the terminatingnull character.
If the buffer specified by pUser parameter is not large
enough to hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the password of the
profile.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pPassword parameter.
When the function returns, this variable contains thesize of the data copied to pPassword including theterminating null character.
If the buffer specified by pPassword parameter is notlarge enough to hold the data, the function returns thevalue ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the IPv4 configuration
method which supports "disabled", "auto", "manual","link-local", etc.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pIpv4Method parameter.
When the function returns, this variable contains thesize of the data copied to pIpv4Method including theterminating null character.
If the buffer specified by pIpv4Method parameter is
not large enough to hold the data, the function returns
the value ASUS_API_STATUS_MORE_DATA.
Pointer to a buffer that receives the IPv6 configuration
method which supports "disabled", "auto", "manual","link-local", etc.
Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pIpv6Method parameter.
63

When the function returns, this variable contains thesize of the data copied to pIpv6Method including theterminating null character.
If the buffer specified by pIpv6Method parameter is
not large enough to hold the data, the function returns
the value ASUS_API_STATUS_MORE_DATA.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.20

AsusConnMgrModemResetProfile

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemResetProfile ();Description
Set the profile to the default value.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.
64ASUS_API_STATUS_ERROR
ASUS_API_STATUS_NOT_INITIALIZEDGeneric error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.21

AsusConnMgrModemSwitchCarrier

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemSwitchCarrier (
__IN
__IN
__IN

uint32_t Index,
struct ConnMgrModemCarrierMcc_s *pMcc
struct ConnMgrModemCarrierMnc_s *pMnc);

Description
Switch to the carrier network with the input of the carrier name.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

__IN

pMcc

Pointer to a structure containing the data to be transferred (refer tothe following structure: ConnMgrModemCarrierMcc_s).

__IN

pMnc

Pointer to a structure containing the data to be transferred (refer tothe following structure: ConnMgrModemCarrierMnc_s).

Structure of ConnMgrModemCarrierMcc_s
In/Out Parameter Type

Parameter Name

Description65

__IN char *pMcc__IN uint32_t *pMccLen

Pointer to a buffer containing the MCC to betransferred.
Pointer to a variable that specifies the size, in bytes,of the buffer pointed to by the pMcc parameter.

Structure of ConnMgrModemCarrierMnc_s
In/Out Parameter Type

Parameter Name

Description__IN char *pMnc__IN uint32_t *pMncLen

Pointer to a buffer containing the MNC to betransferred.
Pointer to a variable that specifies the size, in bytes,of the buffer pointed to by the pMnc parameter.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.7.22

AsusConnMgrModemCheckCarrier

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemCheckCarrier (__IN
uint32_t Index,__OUT
struct ConnMgrModemCarrierInfo_s *pCarrierInfo);
Description
Get the information of the carrier including MCC, MNC, and the name of the carrier.
Parameters
In/OutParameter Name

Description

66

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pCarrierInfo

Pointer to a structure that receives the information of the carrier(refer to the following structure: ConnMgrModemCarrierInfo_s).

Structure of ConnMgrModemCarrierInfo_s
In/Out Parameter Type

Parameter Name

Description__OUT struct
ConnMgrModemCarrierMcc_s *pMcc

Pointer to a structure that receives MCC(refer to the following structure:
ConnMgrModemCarrierMcc_s).

__OUT struct
ConnMgrModemCarrierMnc_s *pMnc

Pointer to a structure that receives MNC(refer to the following structure:
ConnMgrModemCarrierMnc_s).

__OUT struct
ConnMgrModemCarrierName_s *pName

Pointer to a structure that receives the nameof the carrier (refer to the following
structure:
ConnMgrModemCarrierName_s).

Structure of ConnMgrModemCarrierMcc_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pMcc

Pointer to a buffer that receives MCC.

__INOUT uint32_t *pMccLen

Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pMcc parameter. Whenthe function returns, this variable contains the size ofthe data copied to pMcc including the terminating nullcharacter.
If the buffer specified by pMcc parameter is not large
enough to hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.

Structure of ConnMgrModemCarrierMnc_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pMnc

Pointer to a buffer that receives MNC.
67

__INOUT uint32_t *pMncLen

Pointer to a variable that specifies the size, in bytes, ofthe buffer pointed to by the pMnc parameter. Whenthe function returns, this variable contains the size ofthe data copied to pMnc including the terminating nullcharacter.
If the buffer specified by pMnc parameter is not large
enough to hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.

Structure of ConnMgrModemCarrierName_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pOperatorName__INOUT uint32_t *pOperatorNameLen

Pointer to a buffer that receives the name of thecarrier.
Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by thepOperatorName parameter. When the function
returns, this variable contains the size of the data
copied to pOperatorName including theterminating null character.
If the buffer specified by pOperatorName
parameter is not large enough to hold the data, thefunction returns the value
ASUS_API_STATUS_MORE_DATA.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.
68ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.23

AsusConnMgrModemGetICCID

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetICCID (__IN
uint32_t Index,__OUT__INOUT

char *pBuffer,uint32_t *pBufLen);

Description
Get the Integrate Circuit Card Identity.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can bederived from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pBuffer

Pointer to a buffer that receives the value’s data.

__INOUTpBufLen

Pointer to a variable that specifies the size, in bytes, of thebuffer pointed to by the pBuffer parameter. When the function
returns, this variable contains the size of the data copied topBuffer including the terminating null character.
If the buffer specified by pBuffer parameter is not large enoughto hold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

One or more of the API function callparameters are out of the defined69

range.
ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTED

The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.24

AsusConnMgrModemGetIMSI

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetIMSI (__IN
uint32_t Index,__OUT
char *pBuffer,__INOUT
uint32_t *pBufLen);
Description
Get the International Mobile Subscriber Identity.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can bederived from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pBuffer

Pointer to a buffer that receives the value’s data.

__INOUTpBufLen

Pointer to a variable that specifies the size, in bytes, of the buffer
pointed to by the pBuffer parameter. When the function returns,
this variable contains the size of the data copied to pBuffer
including the terminating null character.
If the buffer specified by pBuffer parameter is not large enough tohold the data, the function returns the value
ASUS_API_STATUS_MORE_DATA.

Return Status Code70

Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.25

AsusConnMgrModemGetSignalStrength

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetSignalStrength (__INuint32_t Index,__OUT
uint32_t *pValue);
Description
Get the percentage of the signal strength.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can be derived
from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pValuePointer to a variable that receives the value’s data.

Return Status Code71

Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.26

AsusConnMgrModemGetAdvancedSignalInfo

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetAdvancedSignalInfo (__IN
uint32_t Index,__OUT

struct ConnMgrModemAdvSignalInfo_s *pAdvSignalInfo);

Description
Get the signal strength of the different measurement.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can bederived from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pAdvSignalInfo

Pointer to a structure that receives the signal strength of thedifferent measurement (refer to the following structure:
ConnMgrModemAdvSignalInfo_s).

Structure of ConnMgrModemAdvSignalInfo_s
Parameter Type

Parameter Name Description72

struct ConnMgrModemEvdoSignalInfo_s

Evdo

A structure that describes the signal
strength of the different
measurement of EVDO technology(refer to the following structure:
ConnMgrModemEvdoSignalInfo_s).

struct ConnMgrModemGsmSignalInfo_s

Gsm

A structure that describes the signal
strength of the different
measurement of GSM technology(refer to the following structure:
ConnMgrModemGsmSignalInfo_s).

struct ConnMgrModemUmtsSignalInfo_s

Umts

A structure that describes the signal
strength of the different
measurement of UMTS technology(refer to the following structure:
ConnMgrModemUmtsSignalInfo_s).

struct ConnMgrModemLteSignalInfo_s

Lte

A structure that describes the signal
strength of the different
measurement of LTE technology(refer to the following structure:
ConnMgrModemLteSignalInfo_s).

Structure of ConnMgrModemEvdoSignalInfo_s
Parameter Type

Parameter Name

Description

float

rssi

float

ecio

float

sinr

The CDMA EV-DO RSSI (Received Signal Strength
Indication), in dBm, given as a floating point value.
The CDMA EV-DO Ec/Io, in dBm, given as a floating pointvalue.
CDMA EV-DO SINR level, in dB, given as a floating pointvalue.

float

io

The CDMA EV-DO Io, in dBm, given as a floating pointvalue.

uint32_tvalidFlag

Used to specify that the specific signal strength is valid ornot.
RSSI mapped to Bit 0. Ec/Io mapped to Bit 1. SINR mapped
to Bit 3. Io mapped to Bit 4.

Structure of ConnMgrModemGsmSignalInfo_s
Parameter Type

Parameter Name

Description

float

rssi

The GSM RSSI (Received Signal Strength Indication), in73

dBm, given as a floating point value.
uint32_tvalidFlag

Used to specify that the specific signal strength is valid or not.
RSSI mapped to Bit 0.

Structure of ConnMgrModemUmtsSignalInfo_s
Parameter Type

Parameter Name

Description

float

rssi

The UMTS RSSI (Received Signal Strength Indication), in
dBm, given as a floating point value.

float

rscp

The UMTS RSCP (Received Signal Code Power), in dBm,
given as a floating point value.

float

ecio

The UMTS Ec/Io, in dB, given as a floating point value.

uint32_tvalidFlag

Used to specify that the specific signal strength is valid or not.
RSSI mapped to Bit 0. RSCP mapped to Bit 1. Ec/Io mapped
to Bit 3.

Structure of ConnMgrModemLteSignalInfo_s
Parameter Type

Parameter Name

Description

float

rssi

The LTE RSSI (Received Signal Strength Indication), in
dBm, given as a floating point value.

float

rsrq

The LTE RSRQ (Reference Signal Received Quality), indB, given as a floating point value.

float

rsrp

The LTE RSRP (Reference Signal Received Power), in
dBm, given as a floating point value.

float

snr

The LTE S/R ratio, in dB, given as a floating point value.

uint32_tvalidFlag

Used to specify that the specific signal strength is valid ornot.
RSSI mapped to Bit 0. RSRQ mapped to Bit 1. RSRP
mapped to Bit 3. S/R ratio mapped to Bit 4.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZED74

ASUS_API_STATUS_INVALID_PARAMETER

One or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_UNSUPPORTED

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.27

AsusConnMgrModemGetCellLocationInfo

uint32_t
ASUS_CALLTYPE
AsusConnMgrModemGetCellLocationInfo (
__IN
__OUT

uint32_t Index,
struct ConnMgrModemCellLocationInfo_s *pCellLocInfo);

Description
Get the information of the cell location.
Parameters
In/OutParameter Name

Description

__IN

Index

A variable that specifies the index of the modem that can bederived from the API: AsusConnMgrModemGetModemInfo ().

__OUT

pCellLocInfo

Pointer to a structure that receives the information of the cell
location (refer to the following structure:
ConnMgrModemCellLocationInfo_s).

Structure of ConnMgrModemCellLocationInfo_s
In/Out Parameter Type

Parameter Name

Description__OUT char *pOperatorCode__INOUT uint32_t *pOperatorCodeLen

Pointer to a buffer that receives the operator
code.
Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by thepOperatorCode parameter. When the function
returns, this variable contains the size of thedata copied to pOperatorCode including theterminating null character.
If the buffer specified by pOperatorCodeparameter is not large enough to hold the data,
75

__OUT char *the function returns the value
ASUS_API_STATUS_MORE_DATA.
pOperatorName
Pointer to a buffer that receives the operator
name.
pOperatorNameLen
Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by thepOperatorName parameter. When the function
returns, this variable contains the size of thedata copied to pOperatorName including theterminating null character.
If the buffer specified by pOperatorName
parameter is not large enough to hold the data,
the function returns the value
ASUS_API_STATUS_MORE_DATA.
pLocationAreaCode
Pointer to a buffer that receives the location area
code.
pLocationAreaCodeLen Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by thepLocationAreaCode parameter. When thefunction returns, this variable contains the sizeof the data copied to pLocationAreaCode
including the terminating null character.
If the buffer specified by pLocationAreaCodeparameter is not large enough to hold the data,
the function returns the value
ASUS_API_STATUS_MORE_DATA.
pTrackingAreaCode
Pointer to a buffer that receives the tracking
area code.
pTrackingAreaCodeLen Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by the
pTrackingAreaCode parameter. When thefunction returns, this variable contains the sizeof the data copied to pTrackingAreaCode
including the terminating null character.
If the buffer specified by pTrackingAreaCodeparameter is not large enough to hold the data,
the function returns the value
ASUS_API_STATUS_MORE_DATA.
pCellId
Pointer to a buffer that receives the cell Id.

__INOUT uint32_t *pCellIdLen__OUT char *__INOUT uint32_t *__OUT char *__INOUT uint32_t *__OUT char *__INOUT uint32_t *Pointer to a variable that specifies the size, in
bytes, of the buffer pointed to by the pCellIdparameter. When the function returns, this76

variable contains the size of the data copied topCellId including the terminating null character.
If the buffer specified by pCellId parameter is
not large enough to hold the data, the function
returns the value
ASUS_API_STATUS_MORE_DATA.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.28

AsusConnMgrSetFailover

uint32_t
ASUS_CALLTYPE
AsusConnMgrSetFailover (__IN
uint32_t Enable);
Description
Allow to enable or disable the failover feature.
Parameters
In/OutParameter Name

Description
77

__IN

EnableThe value with ASUS_CM_FAILOVER_ON means to turn on the
failover feature. The value with ASUS_CM_FAILOVER_OFF means
to turn off.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

ASUS_API_STATUS_NOT_INITIALIZEDGeneric error message. No further
error details are available.
One or more of the API function callparameters are out of the defined
range.
Library uninitialized.

ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

ASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.29AsusConnMgrGetFailoverStatus

uint32_t
ASUS_CALLTYPE
AsusConnMgrGetFailoverStatus (__OUT
uint32_t *pStatus);
Description
Get the status of the failover feature.
Parameters
In/OutParameter Name__OUT pStatus

Description
Pointer to a variable that receives the value’s data.
The value with ASUS_CM_FAILOVER_ON means the failoverfeature is on. The value with ASUS_CM_FAILOVER_OFF means
the failover feature is off.

Return Status Code
Return Value

Description

78ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.30

AsusConnMgrSetFailoverGroup

uint32_t
ASUS_CALLTYPE
AsusConnMgrSetFailoverGroup (__INchar **pInterface,__INuint32_t InterfaceCnt);
Description
Set the failover group on the failover feature to determine the priority of the network interface.
Parameters
In/OutParameter Name

Description__IN

pInterface

Pointer to a buffer containing the list of the network interface name to
be transferred.

__IN

InterfaceCnt

The number of the network interfaces in the group.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

One or more of the API function callparameters are out of the defined79

range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.7.31

AsusConnMgrGetFailoverGroup

uint32_t
ASUS_CALLTYPE
AsusConnMgrGetFailoverGroup (__OUTchar **pInterface,__INOUT
uint32_t *ByteCntOfRow,__IN
uint32_t ByteCntOfColumn);
Description
Get the failover group of the failover feature. The output of this function is the list of the network
interface name.
Parameters
In/OutParameter Name

Description__OUT

pInterface

Pointer to a buffer that receives the list of the network interface
name.

__INOUT

ByteCntOfRow__IN

Pointer to a variable that specifies the size, in bytes, of the buffer
pointed to by the pInterface parameter. When the function
returns, this variable contains the number of the network
interfaces.
This variable will be zero if there is no group set on the failoverfeature.
If the buffer specified by pInterface parameter is not large
enough to hold the number of the network interfaces, the function
returns the value ASUS_API_STATUS_MORE_DATA.
ByteCntOfColumn The column size, in bytes, of the buffer pointed to by thepInterface parameter.
If ByteCntOfColumn parameter is not large enough to hold thesize, in bytes, of the return interface name, the function returns
the value ASUS_API_STATUS_MORE_DATA.

Return Status Code80

Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

ASUS_API_STATUS_MORE_DATA

ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined
range.
The amount of available data exceeds
the buffer size. Stroage buffer
overflow was prevented. Read count
was larger than the defined buffer
length.
This function or Id is not supportted.

ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to theConnectivity Management. The caller
should have root permission.

2.8 LED Control
2.8.1

AsusLedGetInfo
uint32_t
ASUS_CALLTYPE
AsusLedGetInfo (__OUTstruct LedInfo_s *pLedInfo,__INOUT
uint32_t *pLedCnt);

Description
Gets the information of the LEDs.
Parameters
In/OutParameter Name

Description__OUT

pLedInfo

An array of the structures that receives the information of the LEDs
(refer to the following structure: LedInfo_s).

81

__INOUT

pLedCnt

Pointer to a variable that specifies the number of the LedInfo_s
structures pointed to by the pLedInfo parameter. When the function
returns, this variable contains the number of the LEDs.
This variable will be zero if there is no LED support.
If the buffer specified by pLedInfo parameter is not large enough tohold the number of the LEDs, the function returns the value
ASUS_API_STATUS_MORE_DATA.

Structure of LedInfo_s
Parameter Type

Parameter Name

Description

uint32_t

LedId

LED Iduint32_t

SupportedColor

uint32_t

SystemOccupied

Used to specify that the specific color is supported or not by
this LED.
For instance, Bit 0 corresponds to “Color Blue”, and Bit 1 to“Color Green”. If Bit 0 is set, the LED is able to light up
blue. Refer to the following LED Color Table for the detailed
color assignment.
Used to specify whether this LED is occupied by the system
or not. The value with LED_OCCUPIED_BY_SYSTEM
means the LED is only controlled by the system. The value
with LED_OCCUPIED_BY_USER means users orapplications have the permission to control the LED.

LED Color Table
Id

Value

Description

LED_LIGHT_COLOR_BLUE

0x00000001“Color Blue” mapped to Bit 0 of the
SupportedColor parameter.

LED_LIGHT_COLOR_GREEN 0x00000002“Color Green” mapped to Bit 1 of the
SupportedColor parameter.

LED_LIGHT_COLOR_RED“Color Red” mapped to Bit 2 of the

0x00000004

SupportedColor parameter.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZED82

ASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supported.
ASUS_API_STATUS_MORE_DATA

2.8.2

The amount of available data exceeds the buffer
size.
Storage buffer overflow was prevented. Readcount was larger than the defined buffer length.

AsusLedGetNumberofLeds
uint32_t
ASUS_CALLTYPE
AsusLedGetNumberofLeds (__OUT

uint32_t *pValue);

Description
Get the number of LEDs that can be controlled.
Parameters
In/OutParameter Name

Description__OUT

pValuePointer to a variable that specifies the number of the LEDs.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

83

2.8.3AsusLedTurnOn
uint32_t
ASUS_CALLTYPE
AsusLedTurnOn (__IN
uint32_t LedId,__IN
uint32_t Color);

Description
Turn on the LED with the specific color.
Parameters
In/OutParameter Name

Description

__IN

LedId

LED Id

__IN

Color

The value to specify that the specific color (refer to the following
LED Color Table for the detailed color assignment).

LED Color Table
Id

Value

Description

LED_LIGHT_COLOR_BLUE

0x00000001

Color Blue

LED_LIGHT_COLOR_GREEN 0x00000002

Color Green

LED_LIGHT_COLOR_RED

Color Red

0x00000004

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

One or more of the API function callparameters are out of the defined
range.
ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to the LED.
Please use
AsusLedSetSystemOccupied() withthe parameter:
LED_OCCUPIED_BY_USER to
allow the system not to occupy the
84

LED.
ASUS_API_STATUS_UNSUPPORTED

2.8.4

This function or Id is not supportted.

AsusLedTurnOff
uint32_t
ASUS_CALLTYPE
AsusLedTurnOff (__IN
uint32_t LedId);

Description
Turn off the LED.
Parameters
In/OutParameter Name

Description

__IN

LedId

LED IdReturn Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further
error details are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER

One or more of the API function callparameters are out of the defined
range.
ASUS_API_STATUS_INVALID_PERMISSION_ACCESS Invalid permission access to the LED.
Please use
AsusLedSetSystemOccupied() withthe parameter:
LED_OCCUPIED_BY_USER to
allow the system not to occupy theLED.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

85

2.8.5AsusLedSetSystemOccupied
uint32_t
ASUS_CALLTYPE
AsusLedSetSystemOccupied (__IN
uint32_t LedId,__IN
uint32_t SystemOccupied);

Description
Allow the system to occupy the control permission of the LED or not.
Parameters
In/OutParameter Name

Description

__IN

LedId

LED Id__IN

SystemOccupied

Used to specify whether this LED is occupied by the system or not.
The value with LED_OCCUPIED_BY_SYSTEM means the LED will
be only controlled by the system. The value with
LED_OCCUPIED_BY_USER means users or applications will havethe permission to control the LED.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

862.9 Vehicle Co-Processors
2.9.1
AsusVcpRtcTimeSet
uint32_t
ASUS_CALLTYPE
AsusVcpRtcTimeSet (__IN
uint32_t Year,__IN
uint32_t Month,__IN
uint32_t DayofMonth,__IN
uint32_t Hour,
__IN
__IN
__IN

uint32_t Minute,uint32_t Second,
uint32_t DayofWeek);

Description
Sets time to RTC.
Parameters
In/OutParameter Name

Description

__IN

Year

The year.

__IN

Month

Selects the month, such as 1, 2, …, 11, and 12.

__IN

DayofMonth

Selects the day of month, such as 1, 2, …, 30, and 31.

__IN

Hour

Selects the hour, such as 0, 1, …, 22, and 23.

__IN

MinuteSelects the minute, such as 0, 1, …, 58, and 59.

__IN

SecondSelects the second, such as 0, 1, …, 58, and 59.

__IN

DayofWeek

Selects the day of week, such as 1, 2, …, 6, and 7.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supported.
872.9.2AsusVcpRtcTimeGet
uint32_t
ASUS_CALLTYPE
AsusVcpRtcTimeGet (__OUT
uint32_t *pYear,__OUT
uint32_t *pMonth,__OUT
uint32_t *pDayofMonth,__OUT
uint32_t *pHour,__OUT
uint32_t *pMinute,
__OUT
__OUT

uint32_t *pSecond,
uint32_t *pDayofWeek);

Description
Gets time from RTC.
Parameters
In/OutParameter Name

Description

__OUT

pYear

Pointer to a buffer that receives the year.

__OUT

pMonthPointer to a buffer that receives the month.

__OUT

pDayofMonth

Pointer to a buffer that receives the day of month.

__OUT

pHour

Pointer to a buffer that receives the hour.

__OUT

pMinutePointer to a buffer that receives the minute.

__OUT

pSecond

Pointer to a buffer that receives the second.

__OUT

pDayofWeek

Pointer to a buffer that receives the day of week.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTEDOne or more of the API function callparameters are out of the defined range.
This function or Id is not supported.

882.9.3AsusVcpComPortInit
uint32_t
ASUS_CALLTYPE
AsusVcpComPortInit (__INuint32_t Id,__INenum ASUS_COM_PORT_MODE Mode,__IN
enum ASUS_COM_PORT_BAUD_RATE BaudRate,__IN
enum ASUS_COM_PORT_PARITY Parity,__INenum ASUS_COM_PORT_DATA_WIDTH DataWidth,
__IN
__IN

enum ASUS_COM_PORT_STOP_BIT StopBit,
enum ASUS_COM_PORT_FLOW_CONTROL FlowControl);Description
Initializes the com port with the settings.
Parameters
In/OutParameter Name

Description

__IN

Id

The com port Id.

__IN

Mode

The com port mode. Refer to the following enum:
ASUS_COM_PORT_MODE.

__IN

BaudRate

The baud rate of the com port. Refer to the following enum:
ASUS_COM_PORT_BAUD_RATE.

__IN

ParityThe parity of the com port. Refer to the following enum:
ASUS_COM_PORT_PARITY.

__IN

DataWidth

The data width of the com port. Refer to the following enum:
ASUS_COM_PORT_DATA_WIDTH.

__IN

StopBit

The stop bit of the com port. Refer to the following enum:
ASUS_COM_PORT_STOP_BIT.

__IN

FlowControl

The flow control of the com port. Refer to the following enum:
ASUS_COM_PORT_FLOW_CONTROL.

Enum of ASUS_COM_PORT_MODE
Parameter

Description

ASUS_COM_PORT_MODE_RS232

RS232

ASUS_COM_PORT_MODE_RS422

RS422

ASUS_COM_PORT_MODE_RS485

RS485
89

Enum of ASUS_COM_PORT_BAUD_RATEParameter

Description

ASUS_COM_PORT_BAUD_RATE_2400

A maximum of 2400 bits per second

ASUS_COM_PORT_BAUD_RATE_4800

A maximum of 4800 bits per second

ASUS_COM_PORT_BAUD_RATE_9600

A maximum of 9600 bits per second

ASUS_COM_PORT_BAUD_RATE_19200

A maximum of 19200 bits per second

ASUS_COM_PORT_BAUD_RATE_38400

A maximum of 38400 bits per second

ASUS_COM_PORT_BAUD_RATE_57600

A maximum of 57600 bits per second

ASUS_COM_PORT_BAUD_RATE_115200

A maximum of 115200 bits per second

Enum of ASUS_COM_PORT_PARITY
Parameter

Description

ASUS_COM_PORT_PARITY_NONE

no parity

ASUS_COM_PORT_PARITY_EVEN

even parity

ASUS_COM_PORT_PARITY_ODD

odd parity

Enum of ASUS_COM_PORT_DATA_WIDTH
Parameter

Description

ASUS_COM_PORT_DATA_7_BIT

7 data bits

ASUS_COM_PORT_DATA_8_BIT

8 data bits

ASUS_COM_PORT_DATA_9_BIT

9 data bits

Enum of ASUS_COM_PORT_STOP_BIT
Parameter

Description

ASUS_COM_PORT_STOP_0_5_BIT

0.5 stop bits

ASUS_COM_PORT_STOP_1_BIT

1 stop bits

ASUS_COM_PORT_STOP_1_5_BIT

1.5 stop bits

ASUS_COM_PORT_STOP_2_BIT

2 stop bits

Enum of ASUS_COM_PORT_FLOW_CONTROL
Parameter

Description

ASUS_COM_PORT_FLOW_CONTROL_DISABLED

Flow control on

ASUS_COM_PORT_FLOW_CONTROL_ENABLED

Flow control off
90

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.4

AsusVcpComPortEnable
uint32_t
ASUS_CALLTYPE
AsusVcpComPortEnable (__INuint32_t Id);

Description
Enables the com port.
Parameters
In/OutParameter Name

Description

__IN

Id

The com port Id.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

912.9.5

AsusVcpComPortDisable
uint32_t
ASUS_CALLTYPE
AsusVcpComPortDisable (__INuint32_t Id);

Description
Disables the com port.
Parameters
In/OutParameter Name

Description

__IN

Id

The com port Id.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.6

AsusVcpComPortRead
uint32_t
ASUS_CALLTYPE
AsusVcpComPortRead (
__IN
__OUT

uint32_t Id,
struct VcpComPortReadBuffer_s *pReadBuffer);

Description
Reads from the selected com port.
Parameters
In/OutParameter Name

Description
92

__IN

Id

The com port Id__OUT

pReadBuffer

Pointer to a structure that receives the read data (refer to thefollowing structure: VcpComPortReadBuffer_s).

Structure of VcpComPortReadBuffer_s
Parameter Typechar[](The array size is defined by
ASUS_VCP_COM_PORT_READ_BUFFER_LENGTH)

ParameterNamepBuffer

Description
The read data

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.9.7

One or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

AsusVcpComPortWrite
uint32_t
ASUS_CALLTYPE
AsusVcpComPortWrite (__INuint32_t Id,__INstruct VcpComPortWriteBuffer_s *pWriteBuffer);

Description
Writes to the selected com port.
Parameters
In/OutParameter Name

Description

__IN

Id

The com port Id__IN

pWriteBuffer

Pointer to a structure containing the data to be written (refer to thefollowing structure: VcpComPortWriteBuffer_s).
93

Structure of VcpComPortWriteBuffer_s
In/Out Parameter Type

Parameter Name

Description__IN char[]pBuffer

Pointer to a buffer containing the data to be written.

__IN uint32_t

ByteCnt

Size, in bytes, of data to be written

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER
ASUS_API_STATUS_UNSUPPORTED

2.9.8

One or more of the API function callparameters are out of the defined range.
This function or Id is not supportted.

AsusVcpWakeupEnable
uint32_t
ASUS_CALLTYPE
AsusVcpWakeupEnable (__INenum VCP_WAKEUP_TYPE WakeupType);

Description
Enables the function of the selected wakeup type.
Parameters
In/OutParameter Name

Description__IN

WakeupType

The type of wakeup. Refer to the following enum:
VCP_WAKEUP_TYPE.

Enum of VCP_WAKEUP_TYPE
Parameter

Value

VCP_WAKEUP_TYPE_DI0

0x00000001 The function to wakeup device form digital
input 00x00000002 The function to wakeup device form digital

VCP_WAKEUP_TYPE_DI1

Description

94input 1
VCP_WAKEUP_TYPE_DI2

0x00000004 The function to wakeup device form digital
input 2
VCP_WAKEUP_TYPE_DI3
0x00000008 The function to wakeup device form digital
input 3
VCP_WAKEUP_TYPE_IGNITION_OFF 0x00000010 The function to shutdown device if theignition is switched off
VCP_WAKEUP_TYPE_GSENSOR
0x00000040 The function to wakeup device form
GSensor
VCP_WAKEUP_TYPE_LTE
0x00000080 The function to wakeup device form LTE
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.9

AsusVcpWakeupDisable
uint32_t
ASUS_CALLTYPE
AsusVcpWakeupDisable (__INenum VCP_WAKEUP_TYPE WakeupType);

Description
Disables the function of the selected wakeup type.
Parameters
In/OutParameter Name

Description__IN

WakeupType

The type of wakeup. Refer to the following enum:
VCP_WAKEUP_TYPE.

Enum of VCP_WAKEUP_TYPE
95

Parameter

Value

Description

VCP_WAKEUP_TYPE_DI0

0x00000001 The function to wakeup device form digital
input 0VCP_WAKEUP_TYPE_DI1
0x00000002 The function to wakeup device form digital
input 1
VCP_WAKEUP_TYPE_DI2
0x00000004 The function to wakeup device form digital
input 2
VCP_WAKEUP_TYPE_DI3
0x00000008 The function to wakeup device form digital
input 3
VCP_WAKEUP_TYPE_IGNITION_OFF 0x00000010 The function to shutdown device if theignition is switched off
VCP_WAKEUP_TYPE_GSENSOR
0x00000040 The function to wakeup device form
GSensor
VCP_WAKEUP_TYPE_LTE
0x00000080 The function to wakeup device form LTE
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.10

AsusVcpGetWakeupStatus

uint32_t
ASUS_CALLTYPE
AsusVcpGetWakeupStatus (__OUT
uint32_t *pWakeupType);
Description
Gets the status of each wakeup type.
Bit with the value 1 means Enable; otherwise 0 means Disable.
Parameters
96

In/Out

Parameter Name

Description__OUT

pWakeupType

Pointer to a variable that specifies whether wakeup types are enabledor disabled. Each bit of this variable corresponds to a specificwakeup type. Refer to the enum of VCP_WAKEUP_TYPE and thefollowing table: Condition Table of pWakeupType.

Condition Table of pWakeupType
Condition

ReturnValue(VCP_WAKEUP_TYPE_DI0 & (*pWakeupType)) 0x01
(VCP_WAKEUP_TYPE_DI1 & (*pWakeupType)) 0x02

Description
Wakeup type of digital input 0 is
enabled
Wakeup type of digital input 1 isenabled(VCP_WAKEUP_TYPE_DI2 & (*pWakeupType)) 0x04

Wakeup type of digital input 2 isenabled(VCP_WAKEUP_TYPE_DI3 & (*pWakeupType)) 0x08

Wakeup type of digital input 3 isenabled(VCP_WAKEUP_TYPE_IGNITION_OFF &(*pWakeupType))

0x10

If the ignition is switched off, thedevice will be shutdown.

(VCP_WAKEUP_TYPE_IGNITION_ON &(*pWakeupType))

0x20

Wakeup type of ignition off to on isenabled(VCP_WAKEUP_TYPE_GSENSOR &(*pWakeupType))

0x40

Wakeup type of gsensor is enabled(VCP_WAKEUP_TYPE_LTE &(*pWakeupType))

0x80

Wakeup type of LTE is enabled(VCP_WAKEUP_TYPE_PMIC &(*pWakeupType))

0x100

Wakeup type of PMIC is enabled

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.
972.9.11

AsusVcpGetLastWakeupSource

uint32_t
ASUS_CALLTYPE
AsusVcpGetLastWakeupSource (__OUT
uint32_t *pWakeupType);
Description
Gets the last wakeup source.
Parameters
In/OutParameter Name

Description__OUT

pWakeupType

Pointer to a variable that specifies the last wakeup source. Each bitof this variable corresponds to a specific wakeup type. Refer to theenum of VCP_WAKEUP_TYPE and the following table: Condition
Table of pWakeupType.

Condition Table of pWakeupType
Condition

ReturnValue(VCP_WAKEUP_TYPE_DI0 & (*pWakeupType)) 0x01
(VCP_WAKEUP_TYPE_DI1 & (*pWakeupType)) 0x02

Description
Wakeup type of digital input 0 is thelast wakeup source
Wakeup type of digital input 1 is thelast wakeup source(VCP_WAKEUP_TYPE_DI2 & (*pWakeupType)) 0x04

Wakeup type of digital input 2 is thelast wakeup source(VCP_WAKEUP_TYPE_DI3 & (*pWakeupType)) 0x08

Wakeup type of digital input 3 is thelast wakeup source(VCP_WAKEUP_TYPE_IGNITION_ON &(*pWakeupType))

0x20

Wakeup type of ignition off to on is
the last wakeup source(VCP_WAKEUP_TYPE_GSENSOR &(*pWakeupType))

0x40

Wakeup type of gsensor is the last
wakeup source(VCP_WAKEUP_TYPE_LTE &(*pWakeupType))

0x80

Wakeup type of LTE is the last
wakeup source(VCP_WAKEUP_TYPE_PMIC &(*pWakeupType))

0x100

Wakeup type of PMIC is the last
wakeup source98Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.12
Vehicle Co-Processors Power Management (VPM)
The feature of Vehicle Co-Processors Power Management (VPM) is provided for users to fulfill the
special requirements for in-vehicle applications.
2.9.12.1 AsusVcpPowerMgmtSetPowerOnEventDelay
uint32_t
ASUS_CALLTYPE
AsusVcpPowerMgmtSetPowerOnEventDelay (__INuint32_t Second);

Description
Sets the delay time of the power on event.
When ignition status is switched from OFF to ON, the VPM will count “Power ON delay” period to
wait signal become stable. After count, the device will be powered on.
If the ignition signal unstable the conditions (e.g switched from ON to OFF) during the “Power ON
delay”, the device will not be booted.
The “Power ON delay” can be adjusted by AsusVcpPowerMgmtSetPowerOnEventDelay(seconds)
and can be gotten by AsusVcpPowerMgmtGetPowerOnEventDelay(seconds).
Parameters
In/OutParameter Name

Description__IN

SecondThe delay time. The unit is second.

Return Status Code
Return Value

Description
99ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.12.2 AsusVcpPowerMgmtGetPowerOnEventDelay
uint32_t
ASUS_CALLTYPE
AsusVcpPowerMgmtGetPowerOnEventDelay (__OUT

uint32_t *pSecond);

Description
Gets the delay time of the power on event.
When ignition status is switched from OFF to ON, the VPM will count “Power ON delay” period to
wait signal become stable. After count, the device will be powered on.
If the ignition signal unstable the conditions (e.g switched from ON to OFF) during the “Power ON
delay”, the device will not be booted.
The “Power ON delay” can be adjusted by AsusVcpPowerMgmtSetPowerOnEventDelay(seconds)
and can be gotten by AsusVcpPowerMgmtGetPowerOnEventDelay(seconds).
Parameters
In/OutParameter Name

Description__OUT

pSecond

Pointer to a variable that specifies the delay time. The unit is second.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
100ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.12.3 AsusVcpPowerMgmtSetPowerOffEventDelay
uint32_t
ASUS_CALLTYPE
AsusVcpPowerMgmtSetPowerOffEventDelay (__INuint32_t Second);
Description
Sets the delay time of the power off event.
When ignition status is switched from ON to OFF, the VPM will count “Power OFF delay”. Afterthe “Power OFF delay” period expired, the system power will be cut off abruptly. Application
programs could watch this event to do pre-defined tasks, like storing data and preparing to turn off
the system. The “Power OFF delay” can be adjusted by
AsusVcpPowerMgmtSetPoweOffEventDelay(seconds) and can be gotten by
AsusVcpPowerMgmtGetPowerOffEventDelay(seconds).
Parameters
In/OutParameter Name

Description__IN

SecondThe delay time. The unit is second.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

101

2.9.12.4 AsusVcpPowerMgmtGetPowerOffEventDelay
uint32_t
ASUS_CALLTYPE
AsusVcpPowerMgmtGetPowerOffEventDelay (__OUT
uint32_t *pSecond);
Description
Gets the delay time of the power off event.
When ignition status is switched from ON to OFF, the VPM will count “Power OFF delay”. Afterthe “Power OFF delay” period expired, the system power will be cut off abruptly. Application
programs could watch this event to do pre-defined tasks, like storing data and preparing to turn off
the system. The “Power OFF delay” can be adjusted by
AsusVcpPowerMgmtSetPoweOffEventDelay(seconds) and can be gotten by
AsusVcpPowerMgmtGetPowerOffEventDelay(seconds).
Parameters
In/OutParameter Name

Description__OUT

pSecond

Pointer to a variable that specifies the delay time. The unit is second.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

102

2.9.12.5 AsusVcpPowerMgmtSetLowBatteryProtectionPreBootThresholduint32_t
ASUS_CALLTYPE
AsusVcpPowerMgmtSetLowBatteryProtectionPreBootThreshold (__IN
float Voltage);
Description
VPM provides low battery protection (LBP) functions which monitor whether the voltage of battery
is above specified threshold and control the power of the device.
VPM is able to do the battery voltage check before the system boot up and decide whether to boot up
the device. If the battery voltage is above the specified threshold, VCM allows the system to boot up;otherwise, the system will not boot up.
This function is used to set the threshold.
Parameters
In/OutParameter Name

Description__IN

Voltage

The threshold. The unit is voltage.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

103

2.9.12.6 AsusVcpPowerMgmtGetLowBatteryProtectionPreBootThresholduint32_t
ASUS_CALLTYPE
AsusVcpPowerMgmtGetLowBatteryProtectionPreBootThreshold (__OUTfloat *pVoltage);
Description
VPM provides low battery protection (LBP) functions which monitor whether the voltage of battery
is above specified threshold and control the power of the device.
VPM is able to do the battery voltage check before the system boot up and decide whether to boot up
the device. If the battery voltage is above the specified threshold, VCM allows the system to boot up;otherwise, the system will not boot up.
This function is used to get the threshold.
Parameters
In/OutParameter Name

Description__OUT

pVoltage

Pointer to a variable that specifies the threshold. The unit is voltage.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.13AsusVcpGSensorEnable

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorEnable ();Description
Enables G-Sensor function.
104

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.14

AsusVcpGSensorDisable

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorDisable ();Description
Disables G-Sensor function.
Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

105

2.9.15

AsusVcpGSensorAvailable

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorAvailable (__OUTchar *pSupported);
Description
Gets supported status of G-Sensor.
Parameters
In/OutParameter Name

Description__OUT

pSupported

Pointer to a variable that specifies the supported status of G-Sensor.
The variable with the value 1 means the platform supports G-Sensor.
Otherwise, the platform does not support G-Sensor.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.16

AsusVcpGSensorGetStatus

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorGetStatus (__OUTchar *pStatus);
Description
Gets status of G-Sensor.
Parameters
In/OutParameter Name

Description
106

__OUT

pStatus

Pointer to a variable that specifies the status of G-Sensor. The
variable with the value 1 means G-Sensor is enabled. Otherwise,
G-Sensor is disabled.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.17

AsusVcpGSensorRead

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorRead (__OUTstruct VcpGSensorValue_s *pGsensorValue);

Description
Gets the value of gravity acceleration from G-Sensor.
Parameters
In/OutParameter Name Description__OUT pGsensorValue

Pointer to a structure that receives the value of gravity accelerationfrom G-Sensor (refer to the following structure: VcpGSensorValue_s).

Structure of VcpGSensorValue_s
Parameter Type

Parameter Name

Description

int

x_mg

The x-axis acceleration of gravity value. The unit is mg.

int

y_mg

The y-axis acceleration of gravity value. The unit is mg.

int

z_mg

The z-axis acceleration of gravity value. The unit is mg.

Return Status Code107

Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.18

AsusVcpGSensorGetResolution

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorGetResolution (__OUT
enum VCP_GSENSOR_RES *pGsensorRes);
Description
Gets the resolution of G-Sensor.
Parameters
In/OutParameter Name Description__OUT pGsensorRes

Pointer to a variable that receives the resolution of G-Sensor. Refer tothe following enum: VCP_GSENSOR_RES.

Enum of VCP_GSENSOR_RES
Parameter

Description

VCP_GSENSOR_RES_2G

The G-Sensor resolution of +2g/-2g

VCP_GSENSOR_RES_4G

The G-Sensor resolution of +4g/-4g

VCP_GSENSOR_RES_8G

The G-Sensor resolution of +8g/-8g

VCP_GSENSOR_RES_16G

The G-Sensor resolution of +16g/-16g

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
108are available.
ASUS_API_STATUS_NOT_INITIALIZED

Library uninitialized.

ASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

2.9.19AsusVcpGSensorSetResolution

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorSetResolution (__INenum VCP_GSENSOR_RES GsensorRes);
Description
Sets the resolution of G-Sensor.
Parameters
In/OutParameter Name Description__IN

GsensorRes

The resolution of G-Sensor. Refer to the following enum:
VCP_GSENSOR_RES.

Enum of VCP_GSENSOR_RES
Parameter

Description

VCP_GSENSOR_RES_2G

The G-Sensor resolution of +2g/-2g

VCP_GSENSOR_RES_4G

The G-Sensor resolution of +4g/-4g

VCP_GSENSOR_RES_8G

The G-Sensor resolution of +8g/-8g

VCP_GSENSOR_RES_16G

The G-Sensor resolution of +16g/-16g

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
109

ASUS_API_STATUS_UNSUPPORTED

2.9.20This function or Id is not supportted.

AsusVcpGSensorGetOffset

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorGetOffset (__OUTstruct VcpGSensorValue_s *pGsensorValue);
Description
Gets the offset value of G-Sensor axis.
Parameters
In/OutParameter Name Description__OUT pGsensorValue

Pointer to a structure that receives the offset value of G-Sensor axis
(refer to the following structure: VcpGSensorValue_s).

Structure of VcpGSensorValue_s
Parameter Type

Parameter Name

Description

int

x_mg

The offset value of x-axis. The unit is mg.

int

y_mg

The offset value of y-axis. The unit is mg.

int

z_mg

The offset value of z-axis. The unit is mg.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

1102.9.21

AsusVcpGSensorSetOffset

uint32_t
ASUS_CALLTYPE
AsusVcpGSensorSetOffset (__INstruct VcpGSensorValue_s GsensorValue);
Description
Sets the offset value of G-Sensor axis.
Parameters
In/OutParameter Name Description__IN

GsensorValue

The offset value of G-Sensor axis (refer to the following structure:
VcpGSensorValue_s).

Structure of VcpGSensorValue_s
Parameter Type

Parameter Name

Description

int

x_mg

The offset value of x-axis. The unit is mg.

int

y_mg

The offset value of y-axis. The unit is mg.

int

z_mg

The offset value of z-axis. The unit is mg.

Return Status Code
Return Value

Description

ASUS_API_STATUS_SUCCESSThe operation was successful.

ASUS_API_STATUS_ERROR

Generic error message. No further error details
are available.
Library uninitialized.

ASUS_API_STATUS_NOT_INITIALIZEDASUS_API_STATUS_INVALID_PARAMETER One or more of the API function call parameters
are out of the defined range.
ASUS_API_STATUS_UNSUPPORTEDThis function or Id is not supportted.

111