API Reference - connectivity.status
This API allows to work with vehicle network connectivity status (WiFi & Cellular).
Info: Application is recommended to use the signal strength/service table to display WiFi signal indicator on HMI:
- 90% — Perfect signal
- 70% — Excellent signal
- 60% — Reliable signal
- 50% — Average signal, suitable for light, browsing and email
- 40% — Poor connection
- less than 30% — Unstable connection, link loss
Input Parameter | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
connectivityTypes | Type of connectivity to filter in the reponse. |
array of string |
- wifi
- cellular
|
[ "wifi" ]
|
false |
Output Data | ||||
---|---|---|---|---|
Data name | Description | Type | Unit/Values | Example |
wifi
.signalStrength |
Signal strength in percentage. |
int |
|
50
|
wifi
.status |
Availability of the wifi interface. |
Enum of strings |
- up
- down
- NOT_AVAILABLE
|
up
|
cellular
.status |
Availability of the cellular interface. |
Enum of strings |
- up
- down
- NOT_AVAILABLE
|
down
|
cellular
.signalQuality |
Quality of the cellular signal. |
Enum of strings |
- good
- average
- acceptable
- bad
- lost
- notAvailable
|
good
|
cellular
.networkType |
Cellular network type. |
Enum of strings |
- 4G (default)
- 3G
|
4G
|
cellular
.networkInfo .rssi |
Current RSSI (Received Signal Strengh Indicator). |
number |
|
42
|
cellular
.networkInfo .rsrq |
Current RSRQ (Reference Signal Received Quality) of the cellular network. |
number |
|
15
|
cellular
.networkInfo .rsrp |
Current RSRP (Reference Signal Received Power) of the cellular network. |
number |
|
42
|
cellular
.networkInfo .snr |
Current SNR (Signal-to-noise ratio) of the cellular network. |
number |
|
42
|
1
2
3
4
5
6
7
8
9
10
11
12
13
webportal.get(
/* api name */
"connectivity.status",
/* parameters */
"wifi"
)
/* callback for `REPLY` messages */
.then((message) => {
if (message.status === 200) {
/* handle `REPLY` success */
}
else { /* handle `REPLY` error */ }
})
1
2
3
4
5
6
{
"id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
"type": "GET",
"api": "connectivity.status",
"params": "wifi"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// --- format of the `REPLY` message ---
{
"id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
"type": "REPLY",
"api": "connectivity.status",
"status": 200,
"statusText": "OK",
"data": {
"wifi": {
"status": "up",
"signalStrength": 50
},
"cellular": {
"status": "up",
"signalQuality": "good",
"networkType": "4G",
"networkInfo": {
"rssi": -70,
"rsrq": -9,
"rsrp": -85,
"snr": 3
}
}
}
}
false
This API allows to work with vehicle network connectivity status (WiFi & Cellular).
Info: Application is recommended to use the signal strength/service table to display WiFi signal indicator on HMI:
- 90% — Perfect signal
- 70% — Excellent signal
- 60% — Reliable signal
- 50% — Average signal, suitable for light, browsing and email
- 40% — Poor connection
- less than 30% — Unstable connection, link loss
Input Parameter | |||||
---|---|---|---|---|---|
Param name | Description | Type | Unit/Values | Example | Required |
connectivityTypes | Type of connectivity to filter in the reponse. |
array of string |
- wifi
- cellular
|
[ "wifi" ]
|
false |
extendedInfo | Return |
boolean |
|
false
|
false |
Output Data | ||||
---|---|---|---|---|
Data name | Description | Type | Unit/Values | Example |
wifi
.signalStrength |
Signal strength in percentage. |
int |
|
50
|
wifi
.status |
Availability of the wifi interface. |
Enum of strings |
- up
- down
- NOT_AVAILABLE
|
up
|
cellular
.status |
Availability of the cellular interface. |
Enum of strings |
- up
- down
- NOT_AVAILABLE
|
down
|
cellular
.signalQuality |
Quality of the cellular signal. |
Enum of strings |
- good
- average
- acceptable
- bad
- lost
- notAvailable
|
good
|
cellular
.networkType |
Cellular network type. |
Enum of strings |
- 4G (default)
- 3G
|
4G
|
cellular
.networkInfo .rssi |
Current RSSI (Received Signal Strengh Indicator). |
number |
|
42
|
cellular
.networkInfo .rsrq |
Current RSRQ (Reference Signal Received Quality) of the cellular network. |
number |
|
15
|
cellular
.networkInfo .rsrp |
Current RSRP (Reference Signal Received Power) of the cellular network. |
number |
|
42
|
cellular
.networkInfo .snr |
Current SNR (Signal-to-noise ratio) of the cellular network. |
number |
|
42
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
webportal.subscribe(
/* api name */
"connectivity.status",
/* parameters */
{
"connectivityTypes": "wifi",
"extendedInfo": false
},
/* callback for `NOTIFY` messages */
async (notifyMessage) => {
if (notifyMessage.status === 200) {
/* handle `NOTIFY` response */
}
else { /* handle `NOTIFY` error */ }
}
)
/* callback for `REPLY` messages */
.then((message) => {
if (message.status === 200) {
/* handle `REPLY` success */
}
else { /* handle `REPLY` error */ }
})
1
2
3
4
5
6
7
8
9
{
"id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
"type": "SUBSCRIBE",
"api": "connectivity.status",
"params": {
"connectivityTypes": "wifi",
"extendedInfo": false
}
}
1
2
3
4
5
6
7
8
9
10
11
// --- format of the `REPLY` message ---
// type: acknowledge the status of the subscription
// reception: only once after the subscription request
// contains outputed data: no
{
"id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
"type": "REPLY",
"status": 200,
"statusText": "OK"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// --- format of the `NOTIFY` message ---
// type: event message about the subscription
// reception: each time the conditions of the subscription are met
// contains outputed data: yes
{
"id": "7372c16f-5f2f-42c9-84a7-5490e35f1be0",
"type": "NOTIFY",
"api": "connectivity.status",
"status": 200,
"statusText": "OK",
"data": {
"wifi": {
"status": "up",
"signalStrength": 50
},
"cellular": {
"status": "up",
"signalQuality": "good",
"networkType": "4G",
"networkInfo": {
"rssi": -70,
"rsrq": -9,
"rsrp": -85,
"snr": 3
}
}
}
}