<br />

APIs for interacting with Ultra-Wideband vendor drivers.
Added: HEAD

## **PROTOCOLS**

## Device

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=136)*

### OpenUci

Opens a UCI channel to the UWB controller. This will power on the
device. The device will be powered off when the `uci` channel is closed
(either by the client or by calling `Uci.PowerOff()`).

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#DeviceOpenUciRequest` |

## Snoop

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=54)*

The Snoop protocol is an output-only channel for monitoring UCI traffic. The
snoop channel contains messages that are sent from the Host to the
Controller (e.g. control packets, data packets). The snoop channel also
contains responses sent from the Controller to the Host (e.g. response
packets, notification packets, data packets).

<br />

### WatchPacket

A hanging-get method that returns when packets have been transmitted or
received. The server is allowed to drop packets if the client takes too
long to call WatchPacket().

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Snoop_WatchPacket_Result` |

## Uci

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=74)*

The UCI protocol is the way the UWB HAL interfaces with the vendor chip via
the Driver.

<br />

### OnInitialized

Sent by the server when the UWB Controller has been initialized. The
`status` indicates whether initialization was successful. If `status` is
`ZX_OK`, the controller is ready to receive UCI packets. The client
should wait for this event before sending data to ensure the controller
is in a known ready state, though the Driver may buffer a limited number
of packets sent before initialization is complete.

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#UciOnInitializedRequest` |

### PowerOff

Request the UWB Controller to power off and close the UCI channel. The
server will close the channel after the device has been powered off.

#### Request

\<EMPTY\>

### Send

Send serialized UCI packets to the UWB Controller via the Driver. The
server isn't responsible for performing any packet segmentation or
reassembly. Bytes will be sent to the UWB Controller as is.

NOTE: The UWB spec requires the host to wait for a response to a sent
command before sending another (FiRa UWB UCI Generic Specification
Version 3.0.0 Section 4.3.1). The client should wait for a response
before sending another command. One `Send()` may be queued by the Driver
if called before `OnInitialized()` is received, which will be answered
once initialization is complete.

NOTE: This method and `SessionInit` are mutually exclusive. The client
must ensure that only one of these operations is active at a time.

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#UciSendRequest` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci_Send_Result` |

### SessionInit

Perform vendor specific session initialization for a given session id.

Session initialization is done via the Session Init UCI command
(FiRa UWB UCI Generic Specification Version 3.0.0 Section 7.2.1). This
command is normally sent by the upper layers of the stack via Send(...).
However, some Controllers may require vendor specific configuration
during session initialization. This command instructs the Driver to
perform that vendor specific initialization, inserting the necessary
bytes into the UCI data stream.

NOTE: The client should wait for a response before sending another
command. One command may be queued by the Driver if `SessionInit()` is
called before `OnInitialized()` is received, which will be answered once
initialization is complete.

NOTE: This method and `Send` are mutually exclusive. The client must
ensure that only one of these operations is active at a time.

#### Request

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#UciSessionInitRequest` |

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci_SessionInit_Result` |

### WatchReceive

Watch for UCI packets from the UWB Controller. The server isn't
responsible for performing any packet segmentation or reassembly. Bytes
will be sent to the UWB Host as is.

#### Request

\<EMPTY\>

#### Response

| Name | Type |
|---|---|
| `payload` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci_WatchReceive_Result` |

## **STRUCTS**

### Uci_Send_Response

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=100)*

\<EMPTY\>

### Uci_SessionInit_Response

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=121)*

\<EMPTY\>

## **TABLES**

### DeviceOpenUciRequest [resource](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#value-vs-resource)

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=140)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `uci` | `server_end:https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci` |   |

### Packet

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=29)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `data` | `vector<uint8>:65500` |   |

### Snoop_WatchPacket_Response

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=58)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `packets` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#SnoopPacket>` |   |
| ### 2 | `dropped_sent` | `uint32` | The number of outbound packets dropped since the last response to WatchPacket(). These packets are excluded from `packets`. This is only non-zero when WatchPacket() is slow to poll. |
| ### 3 | `dropped_received` | `uint32` | The number of inbound packets dropped since the last response to WatchPacket(). These packets are excluded from `packets`. This is only non-zero when WatchPacket() is slow to poll. |

### UciOnInitializedRequest

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=81)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `status` | `https://fuchsia.dev/reference/zx//https://fuchsia.dev/reference/zx#Result` |   |

### UciSendRequest

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=98)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `packets` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet>` |   |

### UciSessionInitRequest

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=119)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `session_id` | `uint32` |   |

### Uci_WatchReceive_Response

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=126)*

| Ordinal | Field | Type | Description |
|---|---|---|---|
| ### 1 | `packets` | `vector<https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet>` |   |

## **UNIONS**

### SnoopPacket [flexible](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=40)*

The full packet sent between the controller and the host, including
packet headers.

Note: if the host or controller performed packet segmentation, the bytes
represented here won't be reassembled and will be in segmented form. See
FiRa UWB UCI Generic Specification Version 3.0.0 Section 4.4 for more
information on segmentation and reassembly.

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `to_controller_data` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet` |   |
| ### 2 | `from_controller_data` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet` |   |
| ### 3 | `command` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet` |   |
| ### 4 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet` |   |
| ### 5 | `notification` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Packet` |   |

<br />

### Snoop_WatchPacket_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=58)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Snoop_WatchPacket_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Uci_Send_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=100)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci_Send_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Uci_SessionInit_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=121)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci_SessionInit_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

### Uci_WatchReceive_Result [strict](https://fuchsia.dev/fuchsia-src/reference/fidl/language/language#strict-vs-flexible)

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=126)*

| Ordinal | Variant | Type | Description |
|---|---|---|---|
| ### 1 | `response` | `https://fuchsia.dev/reference/fidl/fuchsia.hardware.uwb#Uci_WatchReceive_Response` |   |
| ### 3 | `framework_err` | `internal` |   |

<br />

## **CONSTANTS**

| Name | Value | Type | Description |
|---|---|---|---|
| [MAX_PACKET_SIZE](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=27) | `65500` | `uint32` |   |

## **SERVICES**

### Vendor

*Defined in [fuchsia.hardware.uwb/vendor.fidl](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=147)*

| Name | Type | Transport |
|---|---|---|
| [device](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=148) | `fuchsia.hardware.uwb/Device` | Channel |
| [snoop](https://cs.opensource.google/fuchsia/fuchsia/+/main:sdk/fidl/fuchsia.hardware.uwb/vendor.fidl;l=149) | `fuchsia.hardware.uwb/Snoop` | Channel |

<br />