Skip to main content

Device and Internet Status

Device and Internet Connection related commands.

Get Device ID​

Returns a unique device ID.

Login required: No

CmdProc Code: OVS_CMD_GET_DEVICEID

Command number: 7

Input: Not required

Response: OVS_NOTIFY_GET_DEVICEID

OVS_NOTIFY_GET_DEVICEID Successful response

OVS_ERR_OK
data will contain
{ "device_id" : "unique_device_id"}

OVS_NOTIFY_GET_DEVICEID Failed response

data is null

Code sample:

vpnsdk.CmdProc(.OVS_CMD_GET_DEVICEID, [:])

Check Internet Connection​

Attempts to establish a connection to the back-end server. If connection fails, returns OVS_ERR_INTERNET_DISCONNECTED error.

Login required: No

CmdProc Code: OVS_CMD_CHECK_INTERNET

Command number: 6

Input: Not required

Response: OVS_NOTIFY_CHECK_INTERNET

OVS_NOTIFY_CHECK_INTERNET Successful response

OVS_ERR_OK
data is null

OVS_NOTIFY_CHECK_INTERNET Failed response

OVS_ERR_INTERNET_DISCONNECTED
data is null

Code sample:

vpnsdk.CmdProc(.OVS_CMD_CHECK_INTERNET, [:])

Check Open Port​

Attempts to establish a connection to a specified host and port. Returns OVS_ERR_PORT_CLOSED error if connection fails

Login required: No

CmdProc Code: OVS_CMD_CHECK_PORT

Command number: 8

Input:

{
"ip_addr": "178.79.183.206",
"proto": "tcp",
"port": 1194
}

Response: OVS_NOTIFY_CHECK_PORT

OVS_NOTIFY_CHECK_PORT Successful response

OVS_ERR_OK
data is null

OVS_NOTIFY_CHECK_PORT Failed response

OVS_ERR_PORT_CLOSED
data is null

Code sample:

vpnsdk.CmdProc(.OVS_CMD_CHECK_PORT, ["ip_addr": "178.79.183.206", "proto": "tcp", "port": "1194"])

Get Ping​

Attempts to establish a connection to a given VPN server and, if connection could be established, measures ping time

Login required: No

CmdProc Code: OVS_CMD_GET_PING_RESULT

Command number: 11

Input:

{
"ip_addr": "104.192.3.90"
}

Response: OVS_NOTIFY_GET_PING_RESULT

OVS_NOTIFY_GET_PING_RESULT Successful response

OVS_ERR_OK
data will contain the IP address and the response time in ms
{
"ip_addr": "104.192.3.90",
"time": 30
}

OVS_NOTIFY_GET_PING_RESULT Failed response

OVS_ERR_MISSING_PARAMS
OVS_ERR_WEB_API
data is null

Code sample:

vpnsdk.CmdProc(.OVS_CMD_GET_PING_RESULT, ["ip_addr": "104.192.3.90"])