2 * Copyright (c) 2020 Project CHIP Authors
3 * Copyright (c) 2020 Google LLC.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 * Example project configuration file for CHIP.
23 * This is a place to put application or project-specific overrides
24 * to the default configuration values for general CHIP features.
30 #if BUILD_RELEASE // release build
32 // Security and Authentication enabled for release build.
33 #define CHIP_CONFIG_SECURITY_TEST_MODE 0
34 #define CHIP_CONFIG_REQUIRE_AUTH 1
36 #else // development build
38 // Security and Authentication disabled for development build.
39 // For convenience, enable CHIP Security Test Mode and disable the requirement for
40 // authentication in various protocols.
41 // WARNING: These options make it possible to circumvent basic CHIP security functionality,
42 // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
43 #define CHIP_CONFIG_SECURITY_TEST_MODE 1
44 #define CHIP_CONFIG_REQUIRE_AUTH 0
47 * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
49 * Enables the use of a hard-coded default CHIP device id and credentials if no device id
50 * is found in CHIP NV storage.
52 * This option is for testing only and should be disabled in production releases.
54 #define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34
56 // Use a default setup PIN code if one hasn't been provisioned in flash.
57 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 12345678
58 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
60 // Use a default pairing code if one hasn't been provisioned in flash.
61 #define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS"
64 * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
66 * Enables the use of a hard-coded default serial number if none
67 * is found in CHIP NV storage.
69 #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
71 #endif // BUILD_RELEASE
74 * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
76 * 0x235A: Chip's Vendor Id.
78 #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x235A
81 * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
83 * 0x4B4C: K32W lighting-app
85 #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x4B4C
88 * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION
90 * The product revision number assigned to device or product by the device vendor. This
91 * number is scoped to the device product id, and typically corresponds to a revision of the
92 * physical device, a change to its packaging, and/or a change to its marketing presentation.
93 * This value is generally *not* incremented for device software revisions.
95 #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION 1
98 * CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
100 * A string identifying the firmware revision running on the device.
101 * CHIP currently expects the firmware version to be in the format
102 * {MAJOR_VERSION}.0d{MINOR_VERSION}
104 #ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
105 #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION "0.1ALPHA"
108 * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
110 * Enable support for CHIP-over-BLE (CHIPOBLE).
112 #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
115 * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC
117 * Enables synchronizing the device's real time clock with a remote CHIP Time service
118 * using the CHIP Time Sync protocol.
120 //#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1
123 * CHIP_CONFIG_MAX_BINDINGS
125 * Maximum number of simultaneously active bindings per ChipExchangeManager
126 * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4
127 * in the worst case. Keeping another 4 as buffer.
129 #define CHIP_CONFIG_MAX_BINDINGS 8
132 * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD
134 * Select the ability to offload event logs to any interested subscribers using WDM.
136 #define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1
139 * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
141 * Enable recording UTC timestamps.
143 #define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1
146 * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
148 * A size, in bytes, of the individual debug event logging buffer.
150 #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
153 * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
155 * The amount of time in miliseconds after which BLE should change his advertisements
156 * from fast interval to slow interval.
158 * 30000 (30 secondes).
160 #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000)
163 * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
165 * The amount of time in miliseconds after which BLE advertisement should be disabled, counting
166 * from the moment of slow advertisement commencement.
168 * Defaults to 9000000 (15 minutes).
170 #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)
173 * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE
175 * For a development build, set the default importance of events to be logged as Debug.
176 * Since debug is the lowest importance level, this means all standard, critical, info and
177 * debug importance level vi events get logged.
180 #define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production
182 #define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
183 #endif // BUILD_RELEASE