com.webos.service.uwb

Caution
This API has been retired since API level 22.

API Summary

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.

Overview of the API

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:

  • Discovery
  • Pairing
  • Session control
  • Ranging functionalities

Methods

getRangingInfo

ACG: uwb.operation
Retired
  • Added: API level 13
  • Retired: API level 22

Description

Retrieves ranging info for a session. Subscribe to this API to get a continuous notification of the ranging data.

Parameters

Name

Required

Type

Description

subscribeRequiredBoolean

Subscribe for notifications on changes.

Possible values are:

  • true: Subscribed.
  • false: Not subscribed.

Call Returns

Name

Required

Type

Description

sessionIdOptionalNumber

The session ID to which the ranging data belongs.

rangingInfoOptionalObject: rangingInfo

Ranging information received from the UWB module.

subscribedRequiredBoolean

Indicates if subscribed to get notifications.

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

Subscription Returns

Name

Required

Type

Description

sessionIdOptionalNumber

Session ID to which the ranging data belongs.

rangingInfoOptionalObject: rangingInfo

Ranging information received from the UWB module.

subscribedRequiredBoolean

Indicates if subscribed to get notifications.

returnValueRequiredBoolean

Indicates the status of the operation.

Example

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
                }
            ]
        }
}

getUwbServiceState

ACG: uwb.operation
Retired
  • Added: API level 13
  • Deprecated: API level 21
  • Retired: API level 22

Description

Retrieves the state of the UWB service. 

If subscribe is set to true, the method sends an update if the values change.

Parameters

Name

Required

Type

Description

subscribeRequiredBoolean

Subscribe for notifications on changes in the values.

Possible values are:

  • true: Subscribed.
  • false: Not subscribed.

Call Returns

Name

Required

Type

Description

serviceAvailabilityRequiredBoolean

Indicates the state of UWB service. 

Possible values are:

  • true: Service is available.
  • false: Service is not available
stateChangeReasonOptionalString

Indicates the reason why the state has been changed.

Possible values are:

  • Unknown: Changed for an unknown reason.
  • SessionStarted: Changed because a session started.
  • AllSessionsClosed: Changed because all sessions were closed.
  • SystemPolicy: Changed because of a device system change.
  • SystemBoot: Used to signal the first adapter state message after boot.
returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

subscribedRequiredBoolean

Indicates if subscribed to get notifications.

Subscription Returns

Name

Required

Type

Description

subscribedOptionalBooleanIndicates if subscribed to get notifications.
serviceAvailabilityRequiredBoolean

Indicates the state of UWB service.

stateChangeReasonOptionalString

Indicates the reason why the state has been changed.

Example

Example scenario

# luna-send -f -n 1 luna://com.webos.service.uwb/getUwbServiceState '{}'

Response:

{
    "subscribed": false,
    "returnValue": true,
    "serviceAvailability": false
}

getUwbSpecificInfo

ACG: uwb.operation
Retired
  • Added: API level 13
  • Deprecated: API level 21
  • Retired: API level 22

Description

Provides the capabilities and features of the device (supported UWB protocols and parameters).

Parameters

Name

Required

Type

Description

subscribeRequiredBoolean

Subscribe for notifications on changes.

Possible values are:

  • true: Subscribed.
  • false: Not subscribed.

Call Returns

Name

Required

Type

Description

modStateOptionalBoolean

Indicates the state of UWB module.

Possible values are:

  • true: Module is normal.
  • false: Module is not normally initiated.
fwVersionOptionalString

The firmware version of UWB module.

fwCrcOptionalString

The firmware CRC of UWB module.

returnValueRequiredBoolean

Indicates the status of the operation.

Possible values are:

  • true: Operation is successful.
  • false: Operation has failed. Check the 'errorCode' and 'errorText' fields.
errorCodeOptionalNumber

The error code for the failed operation.

errorTextOptionalString

The reason for the failure of the operation. See the 'API Error Codes Reference' section for details.

subscribedOptionalBooleanIndicates if subscribed to get notifications.

Subscription Returns

Name

Required

Type

Description

subscribedRequiredBoolean

Indicates if subscribed to get notifications.

modStateOptionalBoolean

Indicates the state of UWB module.

fwVersionOptionalString

The firmware version of UWB module.

fwCrcOptionalString

The firmware CRC of UWB module.

returnValueRequiredBoolean

Indicates the status of the operation. 

Example

Example scenario

# luna-send  -n 1 -f luna://com.webos.service.uwb/getUwbSpecificInfo '{}'

Response:

{
    "subscribed": false,
    "returnValue": true,
    "fwVersion": "0",
    "modState": false,
    "fwCrc": "0"
}

Objects

rangingDataCommon

Ranging information for common standard protocol.

Name

Required

Type

Description

remoteDeviceAddressRequiredString

The address of the remote device.

statusRequiredString

The status of the ranging measurement.

Possible values are:

  • Success: Ranging was successful.
  • OutOfRange: The remote device is out of range.
  • UnknownError: Unknown failures.
receivedCommonDataOptionalObject: receivedCommonData

The ranging information from the UWB module.

rangingDataLgeAirCond

Ranging information for LGE Air Conditioner product.

Name

Required

Type

Description

RemoteDeviceAddressRequiredString

The address of the remote device.

connectionStatusRequiredBoolean

The connection status of the UWB module.

Possible values are:

  • true: Connected.
  • false: Disconnected.
receivedDataOptionalObject

The ranging data from the UWB module when the connectionStatus is true.

rangingInfo

Ranging information received from UWB module.

Name

Required

Type

Description

rangingDataLgeAirCondOptionalObject array: rangingDataLgeAirCond

The ranging information received from UWB module for LGE Air Conditioner product.

rangingDataCommonOptionalObject array: rangingDataCommon

The ranging information received from UWB module for common standard protocol.

rangingDataLgeAutomOptionalObject 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.

rangingDataLgeTvOptionalObject array

The ranging information received from UWB module for LGE TV product.

receivedCommonData

Provide a ranging information from the UWB module.

Name

Required

Type

Description

elapsedRealTimeNanosOptionalNumber (int32_t)

The elapsed real time in nanoseconds when the ranging measurement occurred.

distanceMeasureOptionalObject

The values for calculating distance.

aoaMeasureOptionalObject

The values for calculating altitude angle.

Contents