Google is committed to advancing racial equity for Black communities. See how.

fuchsia.weave

PROTOCOLS

FactoryDataManager

Defined in fuchsia.weave/auth.fidl

This protocol is used to retrieve factory data that may be encrypted at rest.

GetPairingCode

Return the device |pairing_code| on success.

Request

NameType

Response

NameType
result FactoryDataManager_GetPairingCode_Result

GetWeaveCertificate

Returns the factory provisioned Weave certificate in PEM format.

Request

NameType

Response

NameType
result FactoryDataManager_GetWeaveCertificate_Result

PairingStateWatcher

Defined in fuchsia.weave/weavestack.fidl

Watches for changes in pairing state in Weave. Retrieved from Stack.GetPairingStateWatcher.

WatchPairingState

Returns the state of pairing.

First call returns the current pairing state or blocks until the pairing state is available. Subsequent calls will block until the pairing state changes.

Calling WatchPairingState when a previous call is still pending will cause the channel to be closed with ZX_ERR_BAD_STATE.

Request

NameType

Response

NameType
state PairingState

Signer

Defined in fuchsia.weave/auth.fidl

This protocol is used for signing operations with the factory-provisioned Weave key.

SignHash

Sign the provided |hash| with the factory provisioned key. On success the result is returned in |signature|. The signature must be of a type that is supported by Weave, and must take the standard form of an ASN.1 DER SEQUENCE. This operation must support SHA1 and SHA256 hash values.

Currently, Weave only supports ECDSA signatures using the P224 curve, however, to allow this protocol to support future changes to supported Weave signatures the maximum size of the returned signature is set to 139 bytes which is the largest amount of space needed to return an encoded ECDSA P521 signature.

Request

NameType
hash vector<uint8>[32]

Response

NameType
result Signer_SignHash_Result

Stack

Defined in fuchsia.weave/weavestack.fidl

Calls and services available from WeaveStack. These calls are designed to wrap the Weave adaptation and provide information or capabilities to Weave applications or components that are interested in information that Weave exposes.

GetPairingStateWatcher

Returns a PairingStateWatcher to watch for changes in pairing state.

Request

NameType
watcher request<PairingStateWatcher>

GetQrCode

Returns a QR code that can be used in the pairing process.

Request

NameType

Response

NameType
result Stack_GetQrCode_Result

GetSvcDirectoryWatcher

Returns a SvcDirectoryWatcher to watch changes in the Weave service directory for a particular endpoint.

Request

NameType
endpoint_id ServiceEndpointId
watcher request<SvcDirectoryWatcher>

ResetConfig

Reset the Weave configuration.

Request

NameType
flags ResetConfigFlags

Response

NameType
result Stack_ResetConfig_Result

SvcDirectoryWatcher

Defined in fuchsia.weave/weavestack.fidl

Watches for changes in Weave Service Directory entries for a particular endpoint ID. The endpoint ID is specified in, and this protocol retrieved from Stack.GetServiceDirectoryWatcher.

WatchServiceDirectory

Returns a vector of HostPorts for the watched endpoint ID.

First call returns the current list of HostPorts or blocks until the list is available from the service. Subsequent calls will block until a new ServiceDirectory lookup is made and will return the list associated with the watched endpoint ID, which may or may not be the same as prior values.

Calling WatchServiceDirectory when a previous call is still pending will cause the channel to be closed with ZX_ERR_BAD_STATE.

Request

NameType

Response

NameType
host_port_list vector<HostPort>[256]

STRUCTS

FactoryDataManager_GetPairingCode_Response

Defined in fuchsia.weave/auth.fidl

NameTypeDescriptionDefault
pairing_code vector<uint8>[16] No default

FactoryDataManager_GetWeaveCertificate_Response

Defined in fuchsia.weave/auth.fidl

NameTypeDescriptionDefault
certificate fuchsia.mem/Buffer No default

HostPort

Defined in fuchsia.weave/weavestack.fidl

A tuple of host and port to represent a connectable endpoint.

NameTypeDescriptionDefault
host Host No default
port uint16 No default

QrCode

Defined in fuchsia.weave/weavestack.fidl

QR Code data for pairing.

NameTypeDescriptionDefault
data string[256]

QR code data in string format, supplying this string in a QR code should be sufficient for pairing.

No default

Signer_SignHash_Response

Defined in fuchsia.weave/auth.fidl

NameTypeDescriptionDefault
signature vector<uint8>[139] No default

Stack_GetQrCode_Response

Defined in fuchsia.weave/weavestack.fidl

NameTypeDescriptionDefault
qr_code QrCode No default

Stack_ResetConfig_Response

Defined in fuchsia.weave/weavestack.fidl

NameTypeDescriptionDefault

ENUMS

ErrorCode

Type: uint32

Defined in fuchsia.weave/common.fidl

NameValueDescription
FILE_NOT_FOUND 1

Key/pairing code not found in storage.

CRYPTO_ERROR 2

Error occurred during cryptographic operations.

INVALID_ARGUMENT 3

An invalid argument was supplied.

INVALID_STATE 4

Weave is in an invalid state to support the operation.

UNSPECIFIED_ERROR 2147483647

An unknown or non-specific error occurred.

TABLES

PairingState

Defined in fuchsia.weave/weavestack.fidl

Current state of pairing/provisioning. At the point of a completely unprovisioned or factory reset device, all states will be false. Outside of an explicit ResetConfig call or factory reset, the provisioning states will only transition from false to true as Weave profiles are provisioned.

OrdinalNameTypeDescription
1 is_weave_fully_provisioned bool

Has Weave been fully provisioned? This implies that all provisioning has been completed as expected as specified in the configuration.

2 is_wlan_provisioned bool

Has WiFi been provisioned? Defaults to false.

3 is_thread_provisioned bool

Has Thread been provisioned? Defaults to false.

4 is_fabric_provisioned bool

Has the fabric been provisioned? Defaults to false.

5 is_service_provisioned bool

Has the service been provisioned? Defaults to false.

UNIONS

FactoryDataManager_GetPairingCode_Result

Defined in fuchsia.weave/auth.fidl

NameTypeDescription
response FactoryDataManager_GetPairingCode_Response
err ErrorCode

FactoryDataManager_GetWeaveCertificate_Result

Defined in fuchsia.weave/auth.fidl

NameTypeDescription
response FactoryDataManager_GetWeaveCertificate_Response
err ErrorCode

Host

Defined in fuchsia.weave/weavestack.fidl

Representation of a host either in the form of a hostname or IP address.

NameTypeDescription
hostname string[255]
ip_address fuchsia.net/IpAddress

Signer_SignHash_Result

Defined in fuchsia.weave/auth.fidl

NameTypeDescription
response Signer_SignHash_Response
err ErrorCode

Stack_GetQrCode_Result

Defined in fuchsia.weave/weavestack.fidl

NameTypeDescription
response Stack_GetQrCode_Response
err ErrorCode

Stack_ResetConfig_Result

Defined in fuchsia.weave/weavestack.fidl

NameTypeDescription
response Stack_ResetConfig_Response
err ErrorCode

BITS

ResetConfigFlags

Type: uint32

NameValueDescription
NETWORK_CONFIG 1

Reset network configuration information.

FABRIC_CONFIG 2

Reset fabric configuration information.

SERVICE_CONFIG 4

Reset service configuration information.

OPERATIONAL_CREDENTIALS 8

Reset device operational credentials.

CONSTANTS

NameValueTypeDescription
MAX_HOST_PORTS 256 uint32

The maximum number of HostPorts that Weave can return in a HostPortList, as weave indexes HostPortLists by a uint8.

MAX_QR_CODE_SIZE 256 uint32

The largest supported size of a QR code encoded in string format may be.

RESET_CONFIG_ALL 255 uint32

Reset all device configuration information.

TYPE ALIASES

NameValueDescription
ServiceEndpointId uint64

An endpoint ID used for identifying which service endpoints are of interest when looking up endpoints in the Weave Service Directory.