blob: 0c8e42653db638a38792ebe81f1ec54e381383fb [file] [log] [blame]
#
# Copyright (c) 2018 Nest Labs, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Description:
# Configuration options OpenWeave within the ESP32 ESP-IDF environment.
#
#
# Options for configuring OpenWeave core
#
menu "OpenWeave Core"
menu "General Options"
config MAX_EXCHANGE_CONTEXTS
int "Max Weave Exchange Contexts"
range 0 65535
default 8
help
The maximum number of simultaneously active Weave exchange contexts.
An exchange context object is used to track the state of an ongoing Weave message
exchange (conversation) with a peer, e.g. a cloud service, a mobile application, or
another device.
config MAX_BINDINGS
int "Max Bindings"
range 0 65535
default 8
help
The maximum number of simultaneously active Weave Binding objects.
A Binding object is used to configure how the local device communicates with
a remote entity, be it a cloud service, a mobile application, or another device.
config MAX_PEER_NODES
int "Max Peer Nodes"
range 0 65535
default 16
help
The maximum number of peer nodes that the local node can communicate with using
connectionless communication (e.g. UDP). This value sizes a table that tracks
communication state with peer nodes by their Weave node id.
config MAX_UNSOLICITED_MESSAGE_HANDLERS
int "Max Unsolicited Message Handlers"
range 0 65535
default 16
help
The maximum number of simultaneously active unsolicited message handlers.
Applications or protocol libraries acting as a Weave server register unsolicited
message handlers with the Weave message layer to direct incoming messages to
their code.
config WRMP_TIMER_DEFAULT_PERIOD
int "Default WRMP Timer Tick Interval (ms)"
range 0 65535
default 50
help
The default interval, in milliseconds, at which items in the WRMP pending
message list are processed for the purpose of retransmission or timeout.
This value can be overridden by the application at runtime.
config SHORT_ERROR_STR
bool "Use Short Error Strings"
default n
help
Configure the Weave ErrorStr() function to return short error strings
containing only the error, without any descriptive text.
This option is generally used to reduce flash usage.
# TODO: add log level selection
endmenu # "General Options"
menu "Networking Options"
config NUM_TCP_ENDPOINTS
int "Max TCP EndPoints"
default 8
help
The maximum number of simultaneously active TCP EndPoint objects.
Weave generally needs one TCP EndPoint object for each active Weave TCP
connection, plus up to 3 additional EndPoints to listen for incoming
connections.
config NUM_UDP_ENDPOINTS
int "Max UDP EndPoints"
default 8
help
The maximum number of simultaneously active UDP EndPoint objects.
Weave generally needs one UDP EndPoint object for each local network
interface, plus 2 additional EndPoints for general UDP communcation.
config MAX_CONNECTIONS
int "Max Weave Connections"
range 0 65535
default 8
help
The maximum number of simultaneously active Weave connections, either locally
or remotely initiated. This limit covers both Weave TCP connections, and
Weave-over-BLE (WoBLE) connections.
endmenu # "Networking Options"
menu "System Options"
config NUM_TIMERS
int "Max System Timers"
default 32
help
The maximum number of simultaneously timers in the Weave System Layer.
endmenu # "System Options"
menu "Security Options"
config MAX_SESSION_KEYS
int "Max Session Keys"
range 0 65535
default 8
help
The maximum number of simultaneously active session keys.
config DEFAULT_SECURITY_SESSION_ESTABLISHMENT_TIMEOUT
int "Default Security Session Establishment Timeout (ms)"
range 0 65535
default 30000
help
The default amount of time, in milliseconds, after which an in-progess
session establishment will fail due to a timeout.
This value can be overridden by the application at runtime.
config DEFAULT_SECURITY_SESSION_IDLE_TIMEOUT
int "Default Security Session Idle Timeout (ms)"
range 0 65535
default 15000
help
The default minimum amount of time, in milliseconds, that an unreserved
and idle security session will be allowed to exist before being destroyed.
In practice, unreserved idle sessions can exist for up to twice this value.
This value can be overridden by the application at runtime.
menu "Protocols"
config ENABLE_PASE_INITIATOR
bool "Enable PASE Initiator"
default n
help
Enable support for initiating PASE security sessions with a remote node.
This feature is rarely needed in device applications of Weave.
(PASE = Password Authenticated Session Establishment).
config ENABLE_PASE_RESPONDER
bool "Enable PASE Responder"
default y
help
Enable support for responding to a request from a remote node to initiate
a PASE security session.
This feature is necessary to support standard Weave pairing.
(PASE = Password Authenticated Session Establishment).
config ENABLE_CASE_INITIATOR
bool "Enable CASE Initiator"
default y
help
Enable support for initiating CASE security sessions with a remote node.
This feature is necessary to support interacting with Weave cloud services.
(CASE = Certificate Authenticated Session Establishment).
config ENABLE_CASE_RESPONDER
bool "Enable CASE Responder"
default y
help
Enable support for responding to a request from a remote note to initiate
a CASE security session.
This feature is necessary to support standard Weave pairing.
(CASE = Certificate Authenticated Session Establishment).
endmenu # "Protocols"
menu "Group Keys"
config USE_APP_GROUP_KEYS_FOR_MSG_ENC
bool "Enable Group Keys for Weave Message Encryption"
default y
help
Enable the use of application group keys for Weave message encryption.
config MAX_CACHED_MSG_ENC_APP_KEYS
int "Group Key Cache Size"
range 0 255
default 5
depends on USE_APP_GROUP_KEYS_FOR_MSG_ENC
help
The size of the cache (in number of keys) used to store derived application
group encryption keys.
This value is only meaningful when group keys are enabled for Weave message
encryption.
config MAX_APPLICATION_EPOCH_KEYS
int "Max Application Epoch Keys"
range 0 8
default 4
help
The maximum number of simultaneously supported application epoch keys.
(Epoch keys are a kind of symmetric key that gets mixed together with
other key material to form a group encryption key which can be used
for private communication amongst a set of related Weave nodes).
This value should be set to the maximum number of epoch keys that
can be simultaneously provisioned on the local Weave node. The
maximum supported value is 8, however, in most cases only two such
keys will exist at any given point in time.
config MAX_APPLICATION_GROUPS
int "Max Application Master Keys"
range 0 255
default 4
help
The maximum number of simultaneously supported application group master keys.
(Application group master keys are a kind of symmetric key that gets mixed
together with other key material to form a group encryption key which can
be used for private communication amongst a set of related Weave nodes).
This value should be set to the number of Weave application groups
in which the local Weave device will be a member.
endmenu # "Group Keys"
menu "Debugging"
config SECURITY_TEST_MODE
bool "Enable Weave Security Test Mode"
default n
help
Enable various features that make it easier to debug secure Weave communication.
WARNING: This option makes it possible to circumvent basic Weave security functionality,
including message encryption. Because of this it SHOULD NEVER BE ENABLED IN PRODUCTION BUILDS.
config DISABLE_PROVISIONING_AUTH
bool "Disable Provisioning Authentication Checks"
default n
help
Disable authentication checks for Weave provisioning operations. This makes it possible to
perform device provisioning operations (e.g. adding a network or joining a fabric) without
establishing a secure session.
WARNING: This option makes it possible to circumvent basic Weave security functionality.
Because of this it SHOULD NEVER BE ENABLED IN PRODUCTION BUILDS.
config DEBUG_CERT_VALIDATION
bool "Enable Certificate Validation Debugging"
default n
help
Enable support for debugging output from certificate validation.
endmenu # "Debugging"
endmenu # "Security Options"
menu "Weave Data Management Options"
config MAX_WDM_SUBSCRIPTION_CLIENTS
int "Max WDM Subscription Clients"
default 2
help
Specifies the maximum number of WDM subscription client objects that can be active simultaneously.
One client object is required for each outbound subscription from the device to a peer node, including
the subscription the device establishes to the Nest service, if enabled.
config MAX_WDM_SUBSCRIPTION_HANDLERS
int "Max WDM Subscription Handlers"
default 2
help
Specifies the maximum number of WDM subscription handlers objects that can be active simultaneously.
One handler object is required for each inbound subscription to the device from a peer node. This
includes the counter-subscription from the Nest service to the device, if enabled.
config MAX_WDM_NOTIFIES_IN_FLIGHT
int "Maximum In-flight WDM Notify Messages"
default 2
help
Specifies the maximum number of WDM notify messages that can be in-flight at any given time, across
all active inbound subscriptions. Any changes to trait data that occur while this limit is reached
will be queued locally until an in-flight completes.
config MAX_WDM_NOTIFY_SIZE
int "Maximum WDM Notify Message Size"
default 2048
help
Specifies the maximum size (in bytes) of a WDM notify message that will be generated while servicing
an inbound subscription to the device. The limit governs both notify messages that are generated
as part of the subscription establishment process, as well as those generated when data changes
occur.
Note that other limits, such as UDP MTU size limits, or limits on available packet buffers may mean
that notify messages smaller than this limit are generated.
config MIN_WDM_NOTIFY_BUFFER_SIZE
int "Minimum WDM Notify Buffer Size"
default 1024
help
When allocating a packet buffer in preparation for generating a WDM notify message, defer sending
the notify message if a buffer of at least this size is unavailable.
Note that, because the WDM protocol requires that the static properties of a trait, and any
events emited by a trait, fit within a single notify message, this value should be set *larger*
than the larges of these limits for any trait published by the device.
config MAX_WDM_RESUBSCRIBE_INTERVAL
int "Maximum WDM Resubscribe Interval (ms)"
default 5538000
help
When the default fibonacci-based resubscription back-off policy is in effect, this value specifies the
maximum time (in ms) between any two resubscription attempts.
config WDM_ENABLE_SCHEMA_CHECK
bool "Enable WDM Message Schema Checking"
default y
help
Enables pre-flight schema validation for protocol messages used in Weave Data Management profile.
endmenu
endmenu # "Weave"
#
# Options for configuring the OpenWeave Device Layer
#
menu "OpenWeave Device Layer"
menu "General Options"
config WEAVE_TASK_STACK_SIZE
int "Weave Task Stack Size"
range 0 65535
default 4608
help
The size (in bytes) of the Weave task stack.
config WEAVE_TASK_PRIORITY
int "Weave Task Priority"
range 0 256
default 1
help
The priority of the Weave task.
On the ESP32 platform this value is added to ESP_TASK_PRIO_MIN to determine the FreeRTOS priority value.
config MAX_EVENT_QUEUE_SIZE
int "Max Event Queue Size"
range 0 65535
default 100
help
The maximum number of events that can be held in the Weave Platform event queue.
config SERVICE_DIRECTORY_CACHE_SIZE
int "Weave Service Directory Cache Size"
range 0 65535
default 512
help
The size (in bytes) of the service directory cache. This limits the maximum size of the directory
that can be returned in response to a service directory query.
endmenu
menu "Device Identification Options"
config DEVICE_VENDOR_ID
hex "Device Vendor Id"
range 1 0xFFFE
default 0x235A
help
The device vendor id (in hex). This a Nest-assigned id for the organization responsible for producing the device.
Defaults to Nest Labs (0x235A).
config DEVICE_PRODUCT_ID
hex "Device Product Id"
range 1 0xFFFE
default 0xFEFF
help
The device product id (in hex). This is a unique id assigned by the device vendor to identify the product or device type.
Defaults to a Nest-assigned id designating a non-production or test "product".
config DEVICE_PRODUCT_REVISION
int "Device Product Revision"
range 0 65535
default 1
help
The device product revision. This number is assigned to device or product by the device vendor. The number is
scoped to the device product id, and typically corresponds to a revision of the physical device, a change to its
packaging, and/or a change to its marketing presentation. This value is generally *not* incremented for device
software revisions.
config DEVICE_FIRMWARE_REVISION
string "Device Firmware Revision"
default ""
help
A string identifying the firmware revision running on the device.
endmenu
menu "WiFi Station Options"
config DEFAULT_WIFI_SSID
string "Default WiFi SSID"
default ""
help
The SSID of network to connect to if no WiFi station configuration exists in NV storage
at the time the device boots.
This option is for testing only and should be disabled in production releases.
config DEFAULT_WIFI_PASSWORD
string "Default WiFi Password"
default ""
help
The password for the default WiFi network.
This option is for testing only and should be disabled in production releases.
config WIFI_STATION_RECONNECT_INTERVAL
int "WiFi Station Interface Reconnect Interval (ms)"
range 0 65535
default 5000
help
The interval at which the Weave platform will attempt to reconnect to the configured WiFi network (in milliseconds).
config MAX_SCAN_NETWORKS_RESULTS
int "Max ScanNetworks Results"
range 0 65535
default 10
help
The maximum number of networks to return as a result of a Weave NetworkProvisioning:ScanNetworks request.
config WIFI_SCAN_COMPLETION_TIMEOUT
int "WiFi Scan Completion Timeout (ms)"
range 0 65535
default 10000
help
The amount of time (in milliseconds) after which the Weave platform will timeout a WiFi scan
operation that hasn't completed. A value of 0 will disable the timeout logic.
config WIFI_CONNECTIVITY_TIMEOUT
int "WiFi Connectivity Timeout (ms)"
range 0 65535
default 30000
help
The amount of time (in milliseconds) to wait for Internet connectivity to be established on
the device's WiFi station interface during a Network Provisioning TestConnectivity operation.
endmenu
menu "WiFi AP Options"
config WIFI_AP_SSID_PREFIX
string "WiFi AP SSID Prefix"
default "NEST-"
help
A prefix string used in forming the WiFi soft-AP SSID. The remainder of the SSID
consists of the final two bytes of the device's primary WiFi MAC address in hex.
config WIFI_AP_CHANNEL
int "WiFi AP Channel"
range 1 14
default 1
help
The WiFi channel number to be used by the soft-AP.
config WIFI_AP_MAX_STATIONS
int "WiFi AP Max Allowed Stations"
range 1 10
default 4
help
The maximum number of stations allowed to connect to the soft-AP.
config WIFI_AP_BEACON_INTERVAL
int "WiFi AP Beacon Interval (ms)"
range 100 60000
default 100
help
The beacon interval (in milliseconds) for the WiFi soft-AP.
config WIFI_AP_IDLE_TIMEOUT
int "WiFi AP Idle Timeout (ms)"
range 0 65535
default 120000
help
The amount of time (in milliseconds) after which the Weave platform will deactivate the soft-AP
if it has been idle.
endmenu
menu "BLE Options"
config ENABLE_WOBLE
bool "Enable Weave-over-BLE (WoBLE) Support"
default y
help
Enables support for sending and receiving Weave messages over a BLE connection.
NOTE: This feature depends on BLE central support being enabled in ESP-IDF. In
particular, the ESP-IDF features CONFIG_BT_ENABLED and CONFIG_GATTS_ENABLE must
both be enabled.
config BLE_DEVICE_NAME_PREFIX
string "BLE Device Name Prefix"
default "NEST-"
depends on ENABLE_WOBLE
help
A prefix string used in forming the BLE device name. The remainder of the name
consists of the final two bytes of the device's Weave node id in hex.
NOTE: The device layer limits the total length of a device name to 16 characters.
However, due to other data sent in WoBLE advertise packets, the device name
may need to be shorter.
config BLE_FAST_ADVERTISING_INTERVAL
int "Fast Advertising Interval"
default 800
depends on ENABLE_WOBLE
help
The interval (in units of 0.625ms) at which the device will send BLE advertisements while
in fast advertising mode.
config BLE_SLOW_ADVERTISING_INTERVAL
int "Slow Advertising Interval"
default 3200
depends on ENABLE_WOBLE
help
The interval (in units of 0.625ms) at which the device will send BLE advertisements while
in slow advertising mode.
endmenu
menu "Weave Trait Manager"
config ENABLE_TRAIT_MANAGER
bool "Enable Trait Manager"
default y
help
Enable support for the Weave Trait Manager.
The Trait Manager is an experimental feature of the Weave Device Layer.
endmenu
menu "Time Sync Options"
config ENABLE_SERVICE_DIRECTORY_TIME_SYNC
bool "Enable Service Directory Time Sync"
default y
help
Enables synchronizing the device real-time clock using information returned during
a Weave service directory query. For any device that uses the Weave service directory
to lookup a tunnel server, enabling this option will result in the real time clock being
synchronized every time the service tunnel is established.
config ENABLE_WEAVE_TIME_SERVICE_TIME_SYNC
bool "Enable Time Service Time Sync"
default y
help
Enables synchronizing the device's real time clock with a remote Weave Time service
using the Weave Time Sync protocol.
config WEAVE_TIME_SERVICE_ENDPOINT_ID
hex "Weave Time Service Endpoint Id"
default 18B4300200000005
depends on ENABLE_WEAVE_TIME_SERVICE_TIME_SYNC
help
Specifies the service endpoint id of the Weave Time Sync service to be used to synchronize time.
config DEFAULT_TIME_SYNC_INTERVAL
int "Time Sync Interval (seconds)"
default 60
depends on ENABLE_WEAVE_TIME_SERVICE_TIME_SYNC
help
Specifies the minimum interval (in seconds) at which the device should synchronize its real time
clock with the configured Weave Time Sync server.
config TIME_SYNC_TIMEOUT
int "Time Sync Timeout (ms)"
default 10000
depends on ENABLE_WEAVE_TIME_SERVICE_TIME_SYNC
help
Specifies the maximum amount of time (in milliseconds) to wait for a response from a
Weave Time Sync server.
endmenu
menu "Service Provisioning Options"
config SERVICE_PROVISIONING_ENDPOINT_ID
hex "Weave Service Provisioning Endpoint Id"
default 18B4300200000010
help
Specifies the service endpoint id of the Weave Service Provisioning service. When a device
undergoes service provisioning, this is the endpoint to which it will send its Pair Device
to Account request.
config SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT
int "Service Provisioning Connectivity Timeout (ms)"
default 10000
help
The maximum amount of time (in milliseconds) to wait for service connectivity during the device
service provisioning step. More specifically, this is the maximum amount of time the device will
wait for connectivity to be established with the service at the point where the device waiting
to send a Pair Device to Account request to the Service Provisioning service.
config SERVICE_PROVISIONING_REQUEST_TIMEOUT
int "Service Provisioning Request Timeout (ms)"
default 10000
help
Specifies the maximum amount of time (in milliseconds) to wait for a response from the Service
Provisioning service.
endmenu
menu "Testing Options"
config ENABLE_TEST_DEVICE_IDENTITY
int "Use Test Device Identity"
range 0 256
default 1
help
Enables the use of a hard-coded Weave device id and credentials if no device id is
found in Weave NV storage. The value specifies which of 256 identities, numbered 1
through 256, is to be used. A value of 0 disables use of a test identity.
This option is for testing only and should not be enabled in production releases.
config USE_TEST_SERIAL_NUMBER
string "Use Test Serial Number"
default "DUMMY_SN"
help
Specifies a hard-coded device serial number to be used if none is found in Weave NV storage.
Setting the value to an empty string disables the feature.
Note that any string up to 32 characters can be used here. This value is a unique identifier
assigned to each device by the device vendor.
This option is for testing only and should not be enabled in production releases.
config USE_TEST_PAIRING_CODE
string "Use Test Pairing Code"
default "NESTUS"
help
Specifies a hard-coded device pairing code to be used if none is found in Weave NV storage.
Setting the value to an empty string disables the feature.
Note that any string up to 15 characters can be used here. However, the code within
the Nest mobile application that orchestrates the device pairing process expects this
string to end with a valid Verhoeff check character, and will reject any input that
does not.
Other valid but memorable 6 character pairing codes include: TESTEM, MAXBUX, TRYAGN
and NESTHW.
This option is for testing only and should not be enabled in production releases.
config ENABLE_FIXED_TUNNEL_SERVER
bool "Use Fixed Tunnel Server"
default n
help
Forces the use of a service tunnel server at a fixed IP address and port. This
bypasses the need for a directory query to the service directory endpoint to
determine the tunnel server address. When enabled, this option allows devices
that haven't been service provisioned to establish a service tunnel.
config TUNNEL_SERVER_ADDRESS
string "Tunnel Server Address"
default ""
depends on ENABLE_FIXED_TUNNEL_SERVER
help
The IP address and port of the server to which the device should establish a service tunnel.
The supplied address must be a dot-notation IP address--not a host name. The port number is
optional; if present it should be separated from the IP address with a colon (e.g. 192.168.1.100:11095).
config DISABLE_ACCOUNT_PAIRING
bool "Disable Account Pairing"
default n
help
Disables sending the PairDeviceToAccount request to the service during a RegisterServicePairAccount
operation. When this option is enabled, the device will perform all local operations associated
with registering a service, but will not request the service to add the device to the user's account.
endmenu
menu "Network Telemetry Options"
config ENABLE_WIFI_TELEMETRY
bool "Enable WiFi Telemetry"
default y
help
Enable automatically uploading Wi-Fi telemetry via trait on an interval.
config ENABLE_THREAD_TELEMETRY
bool "Enable Thread Telemetry"
default n
help
Enable automatically uploading minimal Thread telemetry and topology via trait on an interval.
config ENABLE_THREAD_TELEMETRY_FULL
bool "Enable Full Thread Telemetry"
default n
help
Enable automatically uploading all Thread telemetry and topology via trait on an interval.
This is suitable for products that have router capability.
This option can be enabled only when Thread telemetry is enabled.
config ENABLE_TUNNEL_TELEMETRY
bool "Enable Weave Tunnel Telemetry"
default y
help
Enable automatically uploading Weave tunnel telemetry via trait on an interval.
endmenu
menu "Event Logging Options"
config EVENT_LOGGING_DEBUG_BUFFER_SIZE
int "Event Logging Debug Buffer Size"
range 0 65535
default 1024
help
A size, in bytes, of the individual debug event logging buffer.
When this option is set to 0, the debug event buffer is disabled.
config EVENT_LOGGING_INFO_BUFFER_SIZE
int "Event Logging Info Buffer Size"
range 0 65535
default 1024
help
A size, in bytes, of the individual info event logging buffer.
When this option is set to 0, the info event buffer is disabled.
config EVENT_LOGGING_PROD_BUFFER_SIZE
int "Event Logging Production Buffer Size"
range 0 65535
default 2048
help
A size, in bytes, of the individual production event logging buffer.
This critical production event buffer must exist.
config EVENT_LOGGING_CRIT_BUFFER_SIZE
int "Event Logging Critical Production Buffer Size"
range 0 65535
default 4096
help
A size, in bytes, of the individual critical production event logging buffer.
This critical production event buffer must exist.
endmenu
endmenu