xref: /nrf52832-nimble/packages/NimBLE-latest/nimble/host/syscfg.yml (revision 042d53a763ad75cb1465103098bb88c245d95138)
1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements.  See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership.  The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License.  You may obtain a copy of the License at
8#
9#  http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied.  See the License for the
15# specific language governing permissions and limitations
16# under the License.
17#
18
19syscfg.defs:
20    BLE_HOST:
21        description: 'Indicates that a BLE host is present.'
22        value: 1
23
24    BLE_HS_AUTO_START:
25        description: >
26                Causes the BLE host to automatically start during system
27                initialization.
28        value: 1
29
30    # Debug settings.
31    BLE_HS_DEBUG:
32        description: 'Enables extra runtime assertions.'
33        value: 0
34    BLE_HS_PHONY_HCI_ACKS:
35        description: >
36            Rather than wait for HCI acknowledgements from a controller, the
37            host simulates incoming acks.  Only recommended for test code
38            running in the simulator.
39        value: 0
40    BLE_HS_REQUIRE_OS:
41        description: >
42            Specifies whether the host can depend on the kernel being present.
43            This should only be disabled for unit tests running in the
44            simulator.
45        value: 1
46
47    # Monitor interface settings
48    BLE_MONITOR_UART:
49        description: Enables monitor interface over UART
50        value: 0
51    BLE_MONITOR_UART_DEV:
52        description: Monitor interface UART device
53        value: '"uart0"'
54    BLE_MONITOR_UART_BAUDRATE:
55        description: Baudrate for monitor interface UART
56        value: 1000000
57    BLE_MONITOR_UART_BUFFER_SIZE:
58        description: >
59            Monitor interface ringbuffer size for UART.
60            This value should be a power of 2.
61        value: 64
62    BLE_MONITOR_RTT:
63        description: Enables monitor interface over RTT
64        value: 0
65    BLE_MONITOR_RTT_BUFFER_NAME:
66        description: Monitor interface upstream buffer name
67        value: '"btmonitor"'
68    BLE_MONITOR_RTT_BUFFER_SIZE:
69        description: Monitor interface upstream buffer size
70        value: 256
71    BLE_MONITOR_RTT_BUFFERED:
72        description: >
73            Enables buffering when using monitor interface over RTT. The data
74            are written to RTT once complete packet is created in intermediate
75            buffer. This allows to skip complete packet if there is not enough
76            space in RTT buffer (e.g. there is no reader connected). If disabled,
77            monitor will simply block waiting for RTT to free space in buffer.
78        value: 1
79    BLE_MONITOR_CONSOLE_BUFFER_SIZE:
80        description: >
81            Size of internal buffer for console output. Any line exceeding this
82            length value will be split.
83        value: 128
84
85    # L2CAP settings.
86    BLE_L2CAP_MAX_CHANS:
87        description: >
88            The number of L2CAP channels to allocate.  The default value allows
89            for the signal, ATT, and SM channels for each connection.
90        value: '3*MYNEWT_VAL_BLE_MAX_CONNECTIONS'
91    BLE_L2CAP_SIG_MAX_PROCS:
92        description: >
93            The maximum number of concurrent L2CAP signal procedures.
94        value: 1
95    BLE_L2CAP_JOIN_RX_FRAGS:
96        description: >
97            Whether to collapse incoming L2CAP fragments into a minimal set of
98            mbufs.
99                1: Slower, more memory efficient.
100                0: Faster, less memory efficient.
101        value: 1
102    BLE_L2CAP_RX_FRAG_TIMEOUT:
103        description: >
104            Expiry time for incoming data packets (ms).  If this much time
105            passes since the previous fragment was received, the connection is
106            terminated.  A value of 0 means no timeout.
107        value: 30000
108    BLE_L2CAP_COC_MAX_NUM:
109        description: >
110            Defines maximum number of LE Connection Oriented Channels channels.
111            When set to (0), LE COC is not compiled in.
112        value: 0
113
114    # Security manager settings.
115    BLE_SM_LEGACY:
116        description: 'Security manager legacy pairing.'
117        value: 1
118    BLE_SM_SC:
119        description: 'Security manager secure connections (4.2).'
120        value: 0
121
122    BLE_SM_MAX_PROCS:
123        description: >
124            The maximum number of concurrent security manager procedures.
125        value: 1
126    BLE_SM_IO_CAP:
127        description: >
128            The IO capabilities to report during pairing.  Valid values are:
129                BLE_HS_IO_DISPLAY_ONLY
130                BLE_HS_IO_DISPLAY_YESNO
131                BLE_HS_IO_KEYBOARD_ONLY
132                BLE_HS_IO_NO_INPUT_OUTPUT
133                BLE_HS_IO_KEYBOARD_DISPLAY
134        value: 'BLE_HS_IO_NO_INPUT_OUTPUT'
135    BLE_SM_OOB_DATA_FLAG:
136        description: >
137            Whether the out-of-band pairing algorithm is advertised. (0/1)
138        value: 0
139    BLE_SM_BONDING:
140        description: >
141            Enables bonding (persistence and restoration of secure links). (0/1)
142        value: 0
143    BLE_SM_MITM:
144        description: >
145            Whether man-in-the-middle protection is advertised during
146            pairing. (0/1)
147        value: 0
148    BLE_SM_KEYPRESS:
149        description: >
150            Whether keypress support is advertised during pairing. (0/1)
151        value: 0
152    BLE_SM_OUR_KEY_DIST:
153        description: >
154            A bitmap indicating which keys to distribute during pairing.  The
155            bits are defined as follows:
156                0x01: BLE_SM_PAIR_KEY_DIST_ENC
157                0x02: BLE_SM_PAIR_KEY_DIST_ID
158                0x04: BLE_SM_PAIR_KEY_DIST_SIGN
159                0x08: BLE_SM_PAIR_KEY_DIST_LINK
160        value: 0
161    BLE_SM_THEIR_KEY_DIST:
162        description: >
163            A bitmap indicating which keys to accept during pairing.  The
164            bits are defined as follows:
165                0x01: BLE_SM_PAIR_KEY_DIST_ENC
166                0x02: BLE_SM_PAIR_KEY_DIST_ID
167                0x04: BLE_SM_PAIR_KEY_DIST_SIGN
168                0x08: BLE_SM_PAIR_KEY_DIST_LINK
169        value: 0
170    BLE_SM_SC_DEBUG_KEYS:
171        description: >
172            Enable SM debug mode. In this mode SM uses predefined DH key pair as
173            described in Core Specification 5.0, Vol. 3, Part H, 2.3.5.6.1. This
174            allows to decrypt air traffic easily and thus should be only used
175            for debugging.
176        value: 0
177
178    # GAP options.
179    BLE_GAP_MAX_PENDING_CONN_PARAM_UPDATE:
180        description: >
181            Controls the number of connection parameter updates that can be pending
182            simultaneously. Devices with many concurrent connections may need
183            to increase this value.
184        value: 1
185
186    # Supported GATT procedures.  By default:
187    #     o Notify and indicate are enabled;
188    #     o All other procedures are enabled for centrals.
189    BLE_GATT_DISC_ALL_SVCS:
190        description: >
191            Enables the Discover All Primary Services GATT procedure. (0/1)
192        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
193    BLE_GATT_DISC_SVC_UUID:
194        description: >
195            Enables the Discover Primary Services by Service UUID GATT
196            procedure. (0/1)
197        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
198    BLE_GATT_FIND_INC_SVCS:
199        description: >
200            Enables the Find Included Services GATT procedure. (0/1)
201        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
202    BLE_GATT_DISC_ALL_CHRS:
203        description: >
204            Enables the Discover All Characteristics of a Service GATT
205            procedure. (0/1)
206        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
207    BLE_GATT_DISC_CHR_UUID:
208        description: >
209            Enables the Discover Characteristics by UUID GATT procedure. (0/1)
210        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
211    BLE_GATT_DISC_ALL_DSCS:
212        description: >
213            Enables the Discover All Primary Services GATT procedure. (0/1)
214        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
215    BLE_GATT_READ:
216        description: >
217            Enables the Read Characteristic Value GATT procedure. (0/1)
218            (0/1)
219        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
220    BLE_GATT_READ_UUID:
221        description: >
222            Enables the Read Using Characteristic UUID GATT procedure. (0/1)
223        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
224    BLE_GATT_READ_LONG:
225        description: >
226            Enables the Read Long Characteristic Values GATT procedure. (0/1)
227        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
228    BLE_GATT_READ_MULT:
229        description: >
230            Enables the Read Multiple Characteristic Values GATT procedure.
231            (0/1)
232        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
233    BLE_GATT_WRITE_NO_RSP:
234        description: >
235            Enables the Write Without Response GATT procedure. (0/1)
236        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
237    BLE_GATT_SIGNED_WRITE:
238        description: >
239            Enables the Signed Write Without Response GATT procedure. (0/1)
240        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
241    BLE_GATT_WRITE:
242        description: >
243            Enables the Write Characteristic Value GATT procedure. (0/1)
244        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
245    BLE_GATT_WRITE_LONG:
246        description: >
247            Enables the Write Long Characteristic Values GATT procedure. (0/1)
248        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
249    BLE_GATT_WRITE_RELIABLE:
250        description: >
251            Enables the Reliable Writes GATT procedure. (0/1)
252        value: MYNEWT_VAL_BLE_ROLE_CENTRAL
253    BLE_GATT_NOTIFY:
254        description: >
255            Enables sending and receiving of GATT notifications. (0/1)
256        value: 1
257    BLE_GATT_INDICATE:
258        description: >
259            Enables sending and receiving of GATT indications. (0/1)
260        value: 1
261
262    # GATT options.
263    BLE_GATT_READ_MAX_ATTRS:
264        description: >
265            The maximum number of attributes that can be read with a single
266            GATT Read Multiple Characteristic Values procedure. (0/1)
267        value: 8
268    BLE_GATT_WRITE_MAX_ATTRS:
269        description: >
270            The maximum number of attributes that can be written with a single
271            GATT Reliable Write procedure. (0/1)
272        value: 4
273    BLE_GATT_MAX_PROCS:
274        description: >
275            The maximum number of concurrent client GATT procedures. (0/1)
276        value: 4
277    BLE_GATT_RESUME_RATE:
278        description: >
279            The rate to periodically resume GATT procedures that have stalled
280            due to memory exhaustion. (0/1)  Units are milliseconds. (0/1)
281        value: 1000
282
283    # Supported server ATT commands. (0/1)
284    BLE_ATT_SVR_FIND_INFO:
285        description: >
286            Enables processing of incoming Find Information Request ATT
287            commands. (0/1)
288        value: 1
289    BLE_ATT_SVR_FIND_TYPE:
290        description: >
291            Enables processing of incoming Find By Type Value Request ATT
292            commands. (0/1)
293        value: 1
294    BLE_ATT_SVR_READ_TYPE:
295        description: >
296            Enables processing of incoming Read By Type Request ATT commands.
297            (0/1)
298        value: 1
299    BLE_ATT_SVR_READ:
300        description: >
301            Enables processing of incoming Read Request ATT commands. (0/1)
302        value: 1
303    BLE_ATT_SVR_READ_BLOB:
304        description: >
305            Enables processing of incoming Read Blob Request ATT commands.
306            (0/1)
307        value: 1
308    BLE_ATT_SVR_READ_MULT:
309        description: >
310            Enables processing of incoming Read Multiple Request ATT commands.
311            (0/1)
312        value: 1
313    BLE_ATT_SVR_READ_GROUP_TYPE:
314        description: >
315            Enables processing of incoming Read by Group Type Request ATT
316            commands. (0/1)
317        value: 1
318    BLE_ATT_SVR_WRITE:
319        description: >
320            Enables processing of incoming Write Request ATT commands. (0/1)
321        value: 1
322    BLE_ATT_SVR_WRITE_NO_RSP:
323        description: >
324            Enables processing of incoming Write Command ATT commands. (0/1)
325        value: 1
326    BLE_ATT_SVR_SIGNED_WRITE:
327        description: >
328            Enables processing of incoming Signed Write Command ATT commands.
329            (0/1)
330        value: 1
331    BLE_ATT_SVR_QUEUED_WRITE:
332        description: >
333            Enables processing of incoming Prepare Write Request and Execute
334            Write Request ATT commands. (0/1)
335        value: 1
336    BLE_ATT_SVR_NOTIFY:
337        description: >
338            Enables processing of incoming Handle Value Notification ATT
339            commands. (0/1)
340        value: 1
341    BLE_ATT_SVR_INDICATE:
342        description: >
343            Enables processing of incoming Handle Value Indication ATT
344            commands.  (0/1)
345        value: 1
346
347    # ATT options.
348    BLE_ATT_PREFERRED_MTU:
349        description: The preferred MTU to indicate in MTU exchange commands.
350        value: 256
351
352    BLE_ATT_SVR_MAX_PREP_ENTRIES:
353        description: >
354            A GATT server uses these when a peer performs a "write long
355            characteristic values" or "write long characteristic descriptors"
356            procedure.  One of these resources is consumed each time a peer
357            sends a partial write.
358        value: 64
359
360    BLE_ATT_SVR_QUEUED_WRITE_TMO:
361        description: >
362            Expiry time for incoming ATT queued writes (ms).  If this much
363            time passes since the previous prepared write was received, the
364            connection is terminated.  A value of 0 means no timeout.
365        value: 30000
366
367    # Privacy options.
368    BLE_RPA_TIMEOUT:
369        description: >
370            The rate that new random addresses should be generated (seconds).
371        value: 300
372
373    # Store settings.
374    BLE_STORE_MAX_BONDS:
375        description: >
376            Maximum number of bonds that can be persisted.  Note: increasing
377            this value may also require increasing the capacity of the
378            underlying storage mechanism.
379        value: 3
380    BLE_STORE_MAX_CCCDS:
381        description: >
382            Maximum number of client characteristic configuration descriptors
383            that can be persisted.  Note: increasing this value may also
384            require increasing the capacity of the underlying storage
385            mechanism.
386
387        value: 8
388
389    BLE_MESH:
390        description: >
391            This option enables Bluetooth Mesh support. The specific
392            features that are available may depend on other features
393            that have been enabled in the stack, such as GATT support.
394        value: 0
395
396    # Flow control settings.
397    BLE_HS_FLOW_CTRL:
398        description: >
399            Whether to enable host-side flow control.  This should only be
400            enabled in host-only setups (i.e., not combined-host-controller).
401        value: 0
402
403    BLE_HS_FLOW_CTRL_ITVL:
404        description: >
405            The interval, in milliseconds, that the host should provide
406            number-of-completed-packets updates to the controller.
407        value: 1000
408
409    BLE_HS_FLOW_CTRL_THRESH:
410        description: >
411            If the number of data buffers available to the controller falls to
412            this number, immediately send a number-of-completed-packets event.
413            The free buffer count is calculated as follows:
414            (total-acl-bufs - bufs-freed-since-last-num-completed-event).
415        value: 2
416
417    BLE_HS_FLOW_CTRL_TX_ON_DISCONNECT:
418        description: >
419            If enabled, the host will immediately transmit a
420            host-number-of-completed-packets command whenever a connection
421            terminates.  This behavior is not required by the standard, but is
422            a necessary workaround when interfacing with some controllers.
423        value: 0
424
425    BLE_HS_STOP_ON_SHUTDOWN:
426        description: >
427            Stops the Bluetooth host when the system shuts down.  Stopping
428            entails aborting all GAP procedures and terminating open
429            connections.
430        value: 1
431    BLE_HS_SYSINIT_STAGE:
432        description: >
433            Sysinit stage for the NimBLE host.
434        value: 200
435
436syscfg.vals.BLE_MESH:
437    BLE_SM_SC: 1
438