Note
This API has been available since API level 13.
This API has been available since API level 13.
Provides UWB (Ultra Wideband) service for wireless connectivity based on IEEE 802.15.4a/z. This service connects to Luna bus to interact with other system components that require UWB services.
This service is developed to support webOS devices to communicate via a UWB device (either embedded or externally connected) to remote UWB enabled devices.
The service supports the following:
API level 13
Retrieves ranging info for a session. Subscribe to this API to get a continuous notification of the ranging data.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Required | Boolean | Subscribe for notifications on changes. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
sessionId | Optional | Number | The session ID to which the ranging data belongs. |
rangingInfo | Optional | Object: rangingInfo | Ranging information received from the UWB module. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | The reason for the failure of the operation. See the 'API Error Codes Reference' section for details. |
Name | Required | Type | Description |
---|---|---|---|
sessionId | Optional | Number | Session ID to which the ranging data belongs. |
rangingInfo | Optional | Object: rangingInfo | Ranging information received from the UWB module. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. |
returnValue | Required | Boolean | Indicates the status of the operation. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.uwb/getRangingInfo '{}'
Response:
{
"subscribed": false,
"returnValue": true,
"sessionId": 0,
"rangingInfo": {
"rangingDataLgeAirCond": [
{
"condition": 1,
"remoteDeviceAddress": "01",
"receivedData": [
{
"status": "Success",
"angle": 30,
"distance": 100
}
],
"connectionStatus": false
}
]
}
}
API level 13
API level 21
Retrieves the state of the UWB service.
If subscribe is set to true, the method sends an update if the values change.
Name | Required | Type | Description |
---|---|---|---|
subscribe | Required | Boolean | Subscribe for notifications on changes in the values. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
serviceAvailability | Required | Boolean | Indicates the state of UWB service. Possible values are:
|
stateChangeReason | Optional | String | Indicates the reason why the state has been changed. Possible values are:
|
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | The reason for the failure of the operation. See the 'API Error Codes Reference' section for details. |
subscribed | Required | Boolean | Indicates if subscribed to get notifications. |
Name | Required | Type | Description |
---|---|---|---|
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. |
serviceAvailability | Required | Boolean | Indicates the state of UWB service. |
stateChangeReason | Optional | String | Indicates the reason why the state has been changed. |
Example scenario
# luna-send -f -n 1 luna://com.webos.service.uwb/getUwbServiceState '{}'
Response:
{
"subscribed": false,
"returnValue": true,
"serviceAvailability": false
}
API level 13
API level 21
Provides the capabilities and features of the device (supported UWB protocols and parameters).
Name | Required | Type | Description |
---|---|---|---|
subscribe | Required | Boolean | Subscribe for notifications on changes. Possible values are:
|
Name | Required | Type | Description |
---|---|---|---|
modState | Optional | Boolean | Indicates the state of UWB module. Possible values are:
|
fwVersion | Optional | String | The firmware version of UWB module. |
fwCrc | Optional | String | The firmware CRC of UWB module. |
returnValue | Required | Boolean | Indicates the status of the operation. Possible values are:
|
errorCode | Optional | Number | The error code for the failed operation. |
errorText | Optional | String | The reason for the failure of the operation. See the 'API Error Codes Reference' section for details. |
subscribed | Optional | Boolean | Indicates if subscribed to get notifications. |
Name | Required | Type | Description |
---|---|---|---|
subscribed | Required | Boolean | Indicates if subscribed to get notifications. |
modState | Optional | Boolean | Indicates the state of UWB module. |
fwVersion | Optional | String | The firmware version of UWB module. |
fwCrc | Optional | String | The firmware CRC of UWB module. |
returnValue | Required | Boolean | Indicates the status of the operation. |
Example scenario
# luna-send -n 1 -f luna://com.webos.service.uwb/getUwbSpecificInfo '{}'
Response:
{
"subscribed": false,
"returnValue": true,
"fwVersion": "0",
"modState": false,
"fwCrc": "0"
}
Ranging information for common standard protocol.
Name | Required | Type | Description |
---|---|---|---|
remoteDeviceAddress | Required | String | The address of the remote device. |
status | Required | String | The status of the ranging measurement. Possible values are:
|
receivedCommonData | Optional | Object: receivedCommonData | The ranging information from the UWB module. |
Ranging information for LGE Air Conditioner product.
Name | Required | Type | Description |
---|---|---|---|
RemoteDeviceAddress | Required | String | The address of the remote device. |
connectionStatus | Required | Boolean | The connection status of the UWB module. Possible values are:
|
receivedData | Optional | Object | The ranging data from the UWB module when the connectionStatus is true. |
Ranging information received from UWB module.
Name | Required | Type | Description |
---|---|---|---|
rangingDataLgeAirCond | Optional | Object array: rangingDataLgeAirCond | The ranging information received from UWB module for LGE Air Conditioner product. |
rangingDataCommon | Optional | Object array: rangingDataCommon | The ranging information received from UWB module for common standard protocol. |
rangingDataLgeAutom | Optional | Object array | The ranging information received from UWB module for LGE Automotive products. Note: These values will be extended for OEM-specific use cases/data-sheets. |
rangingDataLgeTv | Optional | Object array | The ranging information received from UWB module for LGE TV product. |
Provide a ranging information from the UWB module.
Name | Required | Type | Description |
---|---|---|---|
elapsedRealTimeNanos | Optional | Number (int32_t) | The elapsed real time in nanoseconds when the ranging measurement occurred. |
distanceMeasure | Optional | Object | The values for calculating distance. |
aoaMeasure | Optional | Object | The values for calculating altitude angle. |
Contents