3 * Copyright (c) 2020 Project CHIP Authors
4 * Copyright (c) 2019-2020 Google LLC.
5 * Copyright (c) 2018 Nest Labs, Inc.
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
22 * Defines compile-time configuration values for the chip Device Layer.
27 #if CHIP_HAVE_CONFIG_H
28 #include <platform/CHIPDeviceBuildConfig.h>
31 #include <core/CHIPConfig.h>
33 /* Include a project-specific configuration file, if defined.
35 * An application or module that incorporates the chip Device Layer can define a project
36 * configuration file to override standard chip configuration with application-specific
37 * values. The project config file is typically located outside the Openchip source
38 * tree, alongside the source code for the application.
40 #ifdef CHIP_DEVICE_PROJECT_CONFIG_INCLUDE
41 #include CHIP_DEVICE_PROJECT_CONFIG_INCLUDE
44 /* Include a platform-specific configuration file, if defined.
46 * A platform configuration file contains overrides to standard chip Device Layer
47 * configuration that are specific to the platform or OS on which chip is running.
48 * It is typically provided as apart of an adaptation layer that adapts Openchip
49 * to the target environment. This adaptation layer may be included in the Openchip
50 * source tree itself or implemented externally.
52 #ifdef CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE
53 #include CHIP_DEVICE_PLATFORM_CONFIG_INCLUDE
56 // -------------------- General Configuration --------------------
59 * CHIP_DEVICE_CONFIG_CHIP_TASK_NAME
61 * The name of the chip task.
63 #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_NAME
64 #define CHIP_DEVICE_CONFIG_CHIP_TASK_NAME "CHIP"
68 * CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE
70 * The size (in bytes) of the chip task stack.
72 #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE
73 #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE 4096
77 * CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY
79 * The priority of the chip task.
81 #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY
82 #define CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY 1
86 * CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE
88 * The maximum number of events that can be held in the chip Platform event queue.
90 #ifndef CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE
91 #define CHIP_DEVICE_CONFIG_MAX_EVENT_QUEUE_SIZE 100
95 * CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
97 * Enable the device factory provisioning feature.
99 * The factory provisioning feature allows factory or developer-supplied provisioning information
100 * to be injected into a device at boot time and automatically stored in persistent storage.
102 #ifndef CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING
103 // We don't have platform/internal/FactoryProvisioning.ipp for now, so set it to 0 by default.
104 #define CHIP_DEVICE_CONFIG_ENABLE_FACTORY_PROVISIONING 0
108 * CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH
110 * Compute and log a hash of the device's provisioning data on boot.
112 * The generated hash value confirms to the form described in the CHIP: Factory
113 * Provisioning Specification.
115 #ifndef CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH
116 #define CHIP_DEVICE_CONFIG_LOG_PROVISIONING_HASH 1
119 // -------------------- Device Identification Configuration --------------------
122 * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
124 * The CHIP-assigned vendor id for the organization responsible for producing the device.
126 #ifndef CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
127 #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 9050
131 * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
133 * Enables the use of a hard-coded default serial number if none
134 * is found in Chip NV storage.
136 #ifndef CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
137 #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
141 * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
143 * The unique id assigned by the device vendor to identify the product or device type. This
144 * number is scoped to the device vendor id.
146 #ifndef CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
147 #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 65279
151 * CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION
153 * The default product revision number assigned to the device or product by the device vendor.
155 * Product revisions are specific to a particular device vendor and product id, and typically
156 * correspond to a revision of the physical device, a change to its packaging, and/or a change
157 * to its marketing presentation. This value is generally *not* incremented for device software
160 * This is a default value which is used when a product revision has not been stored in device
161 * persistent storage (e.g. by a factory provisioning process).
163 #ifndef CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION
164 #define CHIP_DEVICE_CONFIG_DEFAULT_DEVICE_PRODUCT_REVISION 1
168 * CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
170 * A string identifying the firmware revision running on the device.
172 #ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
173 #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION "prerelease"
177 * CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC
179 * The default amount of time (in whole seconds) that the device will remain in "user selected"
180 * mode. User selected mode is typically initiated by a button press, or other direct interaction
181 * by a user. While in user selected mode, the device will respond to Device Identify Requests
182 * that have the UserSelectedMode flag set.
184 #ifndef CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC
185 #define CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC 30
186 #endif // CHIP_DEVICE_CONFIG_USER_SELECTED_MODE_TIMEOUT_SEC
188 // -------------------- WiFi Station Configuration --------------------
191 * CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
193 * Enable support for a WiFi station interface.
195 #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION
196 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1
200 * CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL
202 * The interval at which the chip platform will attempt to reconnect to the configured WiFi
203 * network (in milliseconds).
205 #ifndef CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL
206 #define CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL 5000
210 * CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS
212 * The maximum number of networks to return as a result of a NetworkProvisioning:ScanNetworks request.
214 #ifndef CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS
215 #define CHIP_DEVICE_CONFIG_MAX_SCAN_NETWORKS_RESULTS 10
219 * CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT
221 * The amount of time (in milliseconds) after which the chip platform will timeout a WiFi scan
222 * operation that hasn't completed. A value of 0 will disable the timeout logic.
224 #ifndef CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT
225 #define CHIP_DEVICE_CONFIG_WIFI_SCAN_COMPLETION_TIMEOUT 10000
229 * CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT
231 * The amount of time (in milliseconds) to wait for Internet connectivity to be established on
232 * the device's WiFi station interface during a Network Provisioning TestConnectivity operation.
234 #ifndef CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT
235 #define CHIP_DEVICE_CONFIG_WIFI_CONNECTIVITY_TIMEOUT 30000
239 * CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME
241 * Name of the WiFi station interface on LwIP-based platforms.
243 #ifndef CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME
244 #define CHIP_DEVICE_CONFIG_LWIP_WIFI_STATION_IF_NAME "wl"
248 * CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME
250 * Name of the WiFi station interface
252 #ifndef CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME
253 #define CHIP_DEVICE_CONFIG_WIFI_STATION_IF_NAME "wlan0"
256 // -------------------- WiFi AP Configuration --------------------
259 * CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP
261 * Enable support for a WiFi AP interface.
263 #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP
264 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 1
268 * CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX
270 * A prefix string used in forming the WiFi soft-AP SSID. The remainder of the SSID
271 * consists of the final two bytes of the device's primary WiFi MAC address in hex.
273 #ifndef CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX
274 #define CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX "CHIP-"
278 * CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL
280 * The WiFi channel number to be used by the soft-AP.
282 #ifndef CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL
283 #define CHIP_DEVICE_CONFIG_WIFI_AP_CHANNEL 1
287 * CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS
289 * The maximum number of stations allowed to connect to the soft-AP.
291 #ifndef CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS
292 #define CHIP_DEVICE_CONFIG_WIFI_AP_MAX_STATIONS 4
296 * CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL
298 * The beacon interval (in milliseconds) for the WiFi soft-AP.
300 #ifndef CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL
301 #define CHIP_DEVICE_CONFIG_WIFI_AP_BEACON_INTERVAL 100
305 * CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT
307 * The amount of time (in milliseconds) after which the chip platform will deactivate the soft-AP
308 * if it has been idle.
310 #ifndef CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT
311 #define CHIP_DEVICE_CONFIG_WIFI_AP_IDLE_TIMEOUT 120000
315 * CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME
317 * Name of the WiFi AP interface on LwIP-based platforms.
319 #ifndef CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME
320 #define CHIP_DEVICE_CONFIG_LWIP_WIFI_AP_IF_NAME "ap"
323 // -------------------- BLE/CHIPoBLE Configuration --------------------
326 * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
328 * Enable support for chip-over-BLE (CHIPoBLE).
330 #ifndef CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
331 #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 0
335 * CHIP_DEVICE_CONFIG_SINGLE_CHIPOBLE_CONNECTION
337 * Limit support for chip-over-BLE (CHIPoBLE) to a single connection.
338 * When set, CHIPoBLE advertisements will stop while a CHIPoBLE connection is active.
340 #ifndef CHIP_DEVICE_CONFIG_CHIPOBLE_SINGLE_CONNECTION
341 #define CHIP_DEVICE_CONFIG_CHIPOBLE_SINGLE_CONNECTION 1
345 * CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED
347 * Automatically disable CHIPoBLE advertising when the device transitions to a fully
350 #ifndef CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED
351 #define CHIP_DEVICE_CONFIG_CHIPOBLE_DISABLE_ADVERTISING_WHEN_PROVISIONED 0
355 * CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART
357 * Enable CHIPoBLE advertising start automatically after device power-up.
359 * CHIP's device may start advertising automatically only if its all primary device
360 * functions are within a CHIP network. Device providing unrelated to CHIP functionalities
361 * should not start advertising automatically after power-up.
363 * TODO: Default value should be changed to 0, after all platforms will implement enabling
364 * advertisement in their own way.
366 #ifndef CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART
367 #define CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART 1
371 * CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART
373 * Enable opening pairing window automatically after device power-up.
376 #ifndef CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART
377 #define CHIP_DEVICE_CONFIG_ENABLE_PAIRING_AUTOSTART 1
381 * CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX
383 * A prefix string used in forming the BLE device name. The remainder of the name
384 * consists of the final two bytes of the device's chip node id in hex.
386 * NOTE: The device layer limits the total length of a device name to 16 characters.
387 * However, due to other data sent in CHIPoBLE advertise packets, the device name
388 * may need to be shorter.
390 #ifndef CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX
391 #define CHIP_DEVICE_CONFIG_BLE_DEVICE_NAME_PREFIX "CHIP-"
395 * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN
397 * The minimum interval (in units of 0.625ms) at which the device will send BLE advertisements while
398 * in fast advertising mode. The minimum interval should be less and not equal to the
399 * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX.
401 * Defaults to 32 (20 ms).
403 #ifndef CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN
404 #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN 32
408 * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX
410 * The maximum interval (in units of 0.625ms) at which the device will send BLE advertisements while
411 * in fast advertising mode. The maximum interval should be greater and not equal to the
412 * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MIN.
414 * Defaults to 96 (60 ms).
416 #ifndef CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX
417 #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_INTERVAL_MAX 96
421 * CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN
423 * The minimum interval (in units of 0.625ms) at which the device will send BLE advertisements while
424 * in slow advertising mode. The minimum interval should be greater and not equal to the
425 * CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX.
427 * Defaults to 240 (150 ms).
429 #ifndef CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN
430 #define CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN 240
434 * CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX
436 * The maximum interval (in units of 0.625ms) at which the device will send BLE advertisements while
437 * in slow advertising mode. The maximum interval should be greater and not equal to the
438 * CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MIN.
440 * Defaults to 1920 (1200 ms).
442 #ifndef CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX
443 #define CHIP_DEVICE_CONFIG_BLE_SLOW_ADVERTISING_INTERVAL_MAX 1920
447 * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME
449 * The amount of time in miliseconds after which BLE advertisement should be switched from the fast
450 * advertising to the slow advertising, counting from the moment of advertisement commencement.
452 * Defaults to 30000 (30 seconds).
454 #ifndef CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME
455 #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_INTERVAL_CHANGE_TIME 30000
459 * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
461 * The amount of time in miliseconds after which BLE advertisement should be disabled, counting
462 * from the moment of advertisement commencement.
464 * Defaults to 9000000 (15 minutes).
466 #ifndef CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
467 #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)
470 // -------------------- Time Sync Configuration --------------------
473 * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC
475 * Enables synchronizing the device's real time clock with a remote chip Time service
476 * using the chip Time Sync protocol.
478 #ifndef CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC
479 #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 0
483 * CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID
485 * Specifies the service endpoint id of the chip Time Sync service to be used to synchronize time.
487 * This value is only meaningful if CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC has
490 #ifndef CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID
491 #define CHIP_DEVICE_CONFIG_CHIP_TIME_SERVICE_ENDPOINT_ID 0x18B4300200000005ULL
495 * CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL
497 * Specifies the minimum interval (in seconds) at which the device should synchronize its real time
498 * clock with the configured chip Time Sync server.
500 * This value is only meaningful if CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC has
503 #ifndef CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL
504 #define CHIP_DEVICE_CONFIG_DEFAULT_TIME_SYNC_INTERVAL 180
508 * CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT
510 * Specifies the maximum amount of time (in milliseconds) to wait for a response from a
511 * chip Time Sync server.
513 * This value is only meaningful if CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC has
516 #ifndef CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT
517 #define CHIP_DEVICE_CONFIG_TIME_SYNC_TIMEOUT 10000
520 // -------------------- Service Provisioning Configuration --------------------
523 * CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID
525 * Specifies the service endpoint id of the chip Service Provisioning service. When a device
526 * undergoes service provisioning, this is the endpoint to which it will send its Pair Device
527 * to Account request.
529 #ifndef CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID
530 #define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_ENDPOINT_ID 0x18B4300200000010ULL
534 * CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT
536 * The maximum amount of time (in milliseconds) to wait for service connectivity during the device
537 * service provisioning step. More specifically, this is the maximum amount of time the device will
538 * wait for connectivity to be established with the service at the point where the device waiting
539 * to send a Pair Device to Account request to the Service Provisioning service.
541 #ifndef CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT
542 #define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_CONNECTIVITY_TIMEOUT 10000
546 * CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT
548 * Specifies the maximum amount of time (in milliseconds) to wait for a response from the Service
549 * Provisioning service.
551 #ifndef CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT
552 #define CHIP_DEVICE_CONFIG_SERVICE_PROVISIONING_REQUEST_TIMEOUT 10000
555 // -------------------- Just-In-Time Provisioning Configuration --------------------
558 * CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING
560 * Enable just-in-time provisioning functionality in the chip Device Layer.
562 * When enabled, device creates and uses its ephemeral operational credentials:
563 * - operational device id
564 * - operational device self-signed certificate
565 * - operational device private key
566 * When enabled, device also implements certificate provisioning protocol and uses it to obtain
567 * service assigned certificate from the Certification Authority Service.
569 * Then, device uses these credentials to authenticate and communicate to other chip nodes.
571 #ifndef CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING
572 #define CHIP_DEVICE_CONFIG_ENABLE_JUST_IN_TIME_PROVISIONING 0
575 // -------------------- Service Discovery Configuration -----------------------
578 * CHIP_DEVICE_CONFIG_ENABLE_MDNS
580 * Enable support to use MDNS for service advertising and discovery in CHIP.
582 #ifndef CHIP_DEVICE_CONFIG_ENABLE_MDNS
583 #define CHIP_DEVICE_CONFIG_ENABLE_MDNS 0
587 * CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
589 * Enable support to DNS-SD SRP client usage for service advertising and discovery in CHIP.
591 #ifndef CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT
592 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 0
595 // -------------------- Thread Configuration --------------------
598 * CHIP_DEVICE_CONFIG_ENABLE_THREAD
600 * Enable support for Thread in the chip Device Layer.
602 #ifndef CHIP_DEVICE_CONFIG_ENABLE_THREAD
603 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD 0
607 * CHIP_DEVICE_CONFIG_THREAD_FTD
609 * Enable Full Thread Device features
611 #ifndef CHIP_DEVICE_CONFIG_THREAD_FTD
612 #define CHIP_DEVICE_CONFIG_THREAD_FTD 1
616 * CHIP_DEVICE_CONFIG_THREAD_TASK_NAME
618 * The name of the Thread task.
620 #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_NAME
621 #define CHIP_DEVICE_CONFIG_THREAD_TASK_NAME "THREAD"
625 * CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE
627 * The size (in bytes) of the OpenThread task stack.
629 #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE
630 #define CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE 8192
634 * CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY
636 * The priority of the OpenThread task.
638 #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY
639 #define CHIP_DEVICE_CONFIG_THREAD_TASK_PRIORITY 2
643 * CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME
645 * Name of the Thread interface on LwIP-based platforms.
647 #ifndef CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME
648 #define CHIP_DEVICE_CONFIG_LWIP_THREAD_IF_NAME "th"
652 * CHIP_DEVICE_CONFIG_THREAD_IF_MTU
654 * Default MTU for Thread interface
656 #ifndef CHIP_DEVICE_CONFIG_THREAD_IF_MTU
657 #define CHIP_DEVICE_CONFIG_THREAD_IF_MTU 1280
661 * CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX
663 * A prefix string to be used when forming a default Thread network name.
665 #ifndef CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX
666 #define CHIP_DEVICE_CONFIG_DEFAULT_THREAD_NETWORK_NAME_PREFIX "CHIP-PAN-"
670 * CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT
672 * The amount of time (in milliseconds) to wait for connectivity with a Thread mesh
673 * to be established on during a Network Provisioning TestConnectivity operation.
675 #ifndef CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT
676 #define CHIP_DEVICE_CONFIG_THREAD_CONNECTIVITY_TIMEOUT 30000
679 // -------------------- Trait Manager Configuration --------------------
682 * CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER
684 * Enable or disable the chip Trait Manager.
686 * NOTE: The Trait Manager is an experimental feature of the chip Device Layer.
688 #ifndef CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER
689 #define CHIP_DEVICE_CONFIG_ENABLE_TRAIT_MANAGER 0
692 // -------------------- Test Configuration --------------------
695 * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
697 * Enables the use of a hard-coded default chip device id and credentials if no device id
698 * is found in chip NV storage. The value specifies which of 10 identities, numbered 1 through 10,
699 * is to be used. A value of 0 disables use of a default identity.
701 * This option is for testing only and should be disabled in production releases.
703 #ifndef CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
704 #define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 0
707 // -------------------- Network Telemetry Configuration --------------------
710 * @def CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY
713 * Enable automatically uploading Wi-Fi telemetry via trait on an interval.
715 #ifndef CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY
716 #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY (0)
720 * @def CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY
723 * Enable automatically uploading minimal Thread telemetry and topology via trait on an interval.
725 #ifndef CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY
726 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY (0)
729 #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY && !CHIP_DEVICE_CONFIG_ENABLE_THREAD
730 #error "If CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY set, then CHIP_DEVICE_CONFIG_ENABLE_THREAD must also be set."
734 * @def CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL
737 * Enable automatically uploading all Thread telemetry and topology via trait on an interval.
738 * This is suitable for products that have router capability.
741 * If set, CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY must also be set.
743 #ifndef CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL
744 #define CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL (0)
747 #if CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL && !CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY
748 #error "If CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY_FULL set, then CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY must also be set."
751 // Enable Network Telemetry feature if it is enabled for at lease one network.
752 #define CHIP_DEVICE_CONFIG_ENABLE_NETWORK_TELEMETRY \
753 (CHIP_DEVICE_CONFIG_ENABLE_WIFI_TELEMETRY || CHIP_DEVICE_CONFIG_ENABLE_THREAD_TELEMETRY)
756 * @def CHIP_DEVICE_CONFIG_DEFAULT_TELEMETRY_INTERVAL_MS
759 * This sets the default interval at which network telemetry events
760 * will be logged to chip buffers. This can be overwritten at runtime
764 #ifndef CHIP_DEVICE_CONFIG_DEFAULT_TELEMETRY_INTERVAL_MS
765 #define CHIP_DEVICE_CONFIG_DEFAULT_TELEMETRY_INTERVAL_MS 90000
768 // -------------------- Event Logging Configuration --------------------
771 * @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE
774 * A size, in bytes, of the individual critical event logging buffer.
775 * Note: the critical event buffer must exist.
777 #ifndef CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE
778 #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE (1024)
781 #if (CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE <= 0)
782 #error "The Prod critical event buffer must exist (CHIP_DEVICE_CONFIG_EVENT_LOGGING_CRIT_BUFFER_SIZE > 0)"
786 * @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE
789 * A size, in bytes, of the individual production event logging buffer.
790 * Note: the production event buffer must exist.
792 #ifndef CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE
793 #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE (512)
796 #if (CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE <= 0)
797 #error "The Prod event buffer must exist (CHIP_DEVICE_CONFIG_EVENT_LOGGING_PROD_BUFFER_SIZE > 0)"
801 * @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE
804 * A size, in bytes, of the individual info event logging buffer.
805 * Note: set to 0 to disable info event buffer and all support
806 * for the info level events.
808 #ifndef CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE
809 #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (512)
813 * @def CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
816 * A size, in bytes, of the individual debug event logging buffer.
817 * Note: set to 0 to disable debug event buffer and all support
818 * for the debug level events.
820 #ifndef CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
821 #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (256)
825 * @def CHIP_DEVICE_CONFIG_EVENT_ID_COUNTER_EPOCH
828 * The event id counter persisted storage epoch.
830 #ifndef CHIP_DEVICE_CONFIG_EVENT_ID_COUNTER_EPOCH
831 #define CHIP_DEVICE_CONFIG_EVENT_ID_COUNTER_EPOCH (0x10000)
835 * @def CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_CRIT_EIDC_KEY
838 * The critical event id counter (eidc) persisted storage key.
840 #ifndef CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_CRIT_EIDC_KEY
841 #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_CRIT_EIDC_KEY "crit-eidc"
845 * @def CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_PROD_EIDC_KEY
848 * The production event id counter (eidc) persisted storage key.
850 #ifndef CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_PROD_EIDC_KEY
851 #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_PROD_EIDC_KEY "prod-eidc"
855 * @def CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_INFO_EIDC_KEY
858 * The info event id counter (eidc) persisted storage key.
860 #ifndef CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_INFO_EIDC_KEY
861 #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_INFO_EIDC_KEY "info-eidc"
865 * @def CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_DEBUG_EIDC_KEY
868 * The debug event id counter (eidc) persisted storage key.
870 #ifndef CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_DEBUG_EIDC_KEY
871 #define CHIP_DEVICE_CONFIG_PERSISTED_STORAGE_DEBUG_EIDC_KEY "debug-eidc"
874 // -------------------- Software Update Manager Configuration --------------------
877 * CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER
879 * Enable or disable the chip Software Update Manager.
882 #ifndef CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER
883 #define CHIP_DEVICE_CONFIG_ENABLE_SOFTWARE_UPDATE_MANAGER 1
887 * CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN
889 * Specifies the size in bytes of the buffer that stores the
893 #ifndef CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN
894 #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_URI_LEN 128
898 * CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID
900 * Specifies the service endpoint id of the chip Software Update service. When a device
901 * attempts software update, this is the endpoint to which it will send its Software Update
904 #ifndef CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID
905 #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_ENDPOINT_ID 0x18B4300200000002ULL
909 * CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID
911 * Specifies the service endpoint id of the chip File Download service. When a device
912 * attempts file download over BDX, this is the endpoint to which it will send its BDX request.
914 #ifndef CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID
915 #define CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_ENDPOINT_ID 0x18B4300200000013ULL
919 * CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT
921 * Specifies the maximum amount of time (in milliseconds) to wait for a response from a
922 * chip Software Update service.
925 #ifndef CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT
926 #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_RESPONSE_TIMEOUT 10000
930 * CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT
932 * Specifies the maximum amount of time (in milliseconds) to wait for a response from a
933 * chip File Download service.
936 #ifndef CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT
937 #define CHIP_DEVICE_CONFIG_FILE_DOWNLOAD_RESPONSE_TIMEOUT 10000
941 * CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES
943 * Specifies the maximum number of times a failed software is retried.
946 #ifndef CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES
947 #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_RETRIES 5
951 * CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS
953 * If scheduled software update check is disabled & default retry policy is used,
954 * specify the max wait time interval to be used (in milliseconds)
956 #ifndef CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS
957 #define CHIP_DEVICE_CONFIG_SOFTWARE_UPDATE_MAX_WAIT_TIME_INTERVAL_MS 1 * 60 * 60 * 1000 // 1 hour
961 * @def CHIP_DEVICE_CONFIG_SWU_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP
964 * If default software update retry policy is used,
965 * specify the minimum wait
966 * time as a percentage of the max wait interval for that step.
969 #ifndef CHIP_DEVICE_CONFIG_SWU_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP
970 #define CHIP_DEVICE_CONFIG_SWU_MIN_WAIT_TIME_INTERVAL_PERCENT_PER_STEP 50
974 * @def CHIP_DEVICE_CONFIG_SWU_WAIT_TIME_MULTIPLIER_MS
977 * If default software update retry policy is used,
978 * specify the multiplier that multiplies the result of a Fibonacci computation
979 * based on a specific index to provide a max wait time for
983 #ifndef CHIP_DEVICE_CONFIG_SWU_WAIT_TIME_MULTIPLIER_MS
984 #define CHIP_DEVICE_CONFIG_SWU_WAIT_TIME_MULTIPLIER_MS 1 * 60 * 1000 // 1 minute
988 * CHIP_DEVICE_CONFIG_SWU_BDX_BLOCK_SIZE
990 * Specifies the block size to be used during software download over BDX.
992 #define CHIP_DEVICE_CONFIG_SWU_BDX_BLOCK_SIZE 1024
995 * CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE
997 * Specifies the date of the build. Useful for deterministic builds.
999 #ifndef CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE
1000 #define CHIP_DEVICE_CONFIG_FIRWMARE_BUILD_DATE __DATE__
1004 * CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME
1006 * Specifies the time of the build. Useful for deterministic builds.
1008 #ifndef CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME
1009 #define CHIP_DEVICE_CONFIG_FIRMWARE_BUILD_TIME __TIME__