2018-03-31 22:55:03 +02:00
|
|
|
#
|
|
|
|
# For a description of the syntax of this configuration file,
|
|
|
|
# see the file kconfig-language.txt in the NuttX tools repository.
|
|
|
|
#
|
|
|
|
|
|
|
|
menu "Bluetooth socket support"
|
|
|
|
|
|
|
|
config NET_BLUETOOTH
|
|
|
|
bool "Bluetooth socket support"
|
|
|
|
default n
|
|
|
|
depends on WIRELESS_BLUETOOTH
|
|
|
|
select NETDEV_IOCTL
|
|
|
|
---help---
|
|
|
|
Enable support for raw, Bluetooth sockets.
|
|
|
|
|
|
|
|
Raw sockets allow receiving and transmitting Bluetooth radio
|
|
|
|
frames without a layer2 protocol such as 6LoWPAN in between. Frames
|
|
|
|
received are copied into a Bluetooth socket tap before they
|
|
|
|
enter the network. Frames written into a Bluetooth socket will
|
|
|
|
bypass the network altogether and will be sent directly to the
|
|
|
|
Bluetooth MAC network interface driver outgoing frame queue.
|
|
|
|
|
|
|
|
if NET_BLUETOOTH
|
|
|
|
|
2023-02-11 15:50:03 +01:00
|
|
|
config NET_BLUETOOTH_PREALLOC_CONNS
|
|
|
|
int "Preallocated Bluetooth sockets"
|
2018-03-31 22:55:03 +02:00
|
|
|
default 4
|
2023-02-11 15:50:03 +01:00
|
|
|
---help---
|
|
|
|
Number of Bluetooth connections (all tasks).
|
|
|
|
|
|
|
|
This number of connections will be pre-allocated during system boot.
|
|
|
|
If dynamic connections allocation is enabled, more connections may
|
|
|
|
be allocated at a later time, as the system needs them. Else this
|
|
|
|
will be the maximum number of connections available to the system
|
|
|
|
at all times.
|
|
|
|
|
|
|
|
Set to 0 to disable (and rely only on dynamic allocations).
|
|
|
|
|
|
|
|
config NET_BLUETOOTH_ALLOC_CONNS
|
|
|
|
int "Dynamic Bluetooth connections allocation"
|
|
|
|
default 0
|
|
|
|
---help---
|
|
|
|
Dynamic memory allocations for Bluetooth.
|
|
|
|
|
|
|
|
When set to 0 all dynamic allocations are disabled.
|
|
|
|
|
|
|
|
When set to 1 a new connection will be allocated every time,
|
|
|
|
and it will be free'd when no longer needed.
|
|
|
|
|
|
|
|
Setting this to 2 or more will allocate the connections in
|
|
|
|
batches (with batch size equal to this config). When a
|
|
|
|
connection is no longer needed, it will be returned to the
|
|
|
|
free connections pool, and it will never be deallocated!
|
|
|
|
|
|
|
|
config NET_BLUETOOTH_MAX_CONNS
|
|
|
|
int "Maximum number of Bluetooth connections"
|
|
|
|
default 0
|
|
|
|
depends on NET_BLUETOOTH_ALLOC_CONNS > 0
|
|
|
|
---help---
|
|
|
|
If dynamic connections allocation is selected (NET_BLUETOOTH_ALLOC_CONNS > 0)
|
|
|
|
this will limit the number of connections that can be allocated.
|
|
|
|
|
|
|
|
This is useful in case the system is under very heavy load (or
|
|
|
|
under attack), ensuring that the heap will not be exhausted.
|
2018-03-31 22:55:03 +02:00
|
|
|
|
|
|
|
config NET_BLUETOOTH_NCONTAINERS
|
|
|
|
int "Number of pre-allocated frame containers"
|
|
|
|
default 8
|
|
|
|
---help---
|
|
|
|
This specifies the total number of preallocated frame containers.
|
|
|
|
One must be allocated with each incoming frame.
|
|
|
|
|
|
|
|
config NET_BLUETOOTH_BACKLOG
|
|
|
|
int "Maximum frame backlog"
|
|
|
|
default 8
|
|
|
|
range 0 255
|
|
|
|
---help---
|
2020-10-29 03:52:26 +01:00
|
|
|
As frames are received, they are held in an RX queue. They remain
|
2018-03-31 22:55:03 +02:00
|
|
|
in the RX queue until application logic reads the queue frames. To
|
|
|
|
prevent overrun, the maximum backlog may be set to a nonzero value.
|
2020-10-29 03:52:26 +01:00
|
|
|
When the backlog of queue frames reaches that count, the old frame
|
2018-03-31 22:55:03 +02:00
|
|
|
will be freed, preventing overrun at the cost of losing the oldest
|
|
|
|
frames.
|
|
|
|
|
2020-02-23 09:50:23 +01:00
|
|
|
NOTE: The special value of zero will disable all backlog checks.
|
2018-03-31 22:55:03 +02:00
|
|
|
|
|
|
|
endif # NET_BLUETOOTH
|
|
|
|
endmenu # Bluetooth Socket Support
|