Refactor the controller init to use the new init routines the
controller now provides. Instead of using a hardcoded set of
features, the features are now initialized based on Kconfig
values that the application selects.
Add config files under modules/hal_silabs, used by the controller
init routines in the external module hal_silabs to determine which
features to enable based on Kconfig options. This brings the
controller feature configurability to roughly parity with the
Simplicity SDK.
Signed-off-by: Jori Rintahaka <jori.rintahaka@silabs.com>
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Add a timeout to the SPI boot process to ensure that `bt_enable` does
not block forever but instead returns an error after an appropriately
large delay. While 1 second would be sufficient under normal operation,
we also want to give the controller time to perform any application
upgrades via a bootloader.
Signed-off-by: Jordan Yates <jordan@embeint.com>
native_posix has been removed, so let's remove its support from
kconfig for this driver.
Also let's replace its mention in the help message.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
The HCI IPC endpoint bound timeout value was hardcoded and set
to 1000 ms. This value may be differ between platforms, for
exampel due to extended boot time.
The default value used was a bit short for multicore SoCs
that usually may wait for some other service reposnes for
similar time. That may lead to timeout error while other
end of an endpoint was slightly late. Change the default
duration to 2000 ms to give more room for possible delays.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Refactor the userchan driver into a top and a bottom part.
The bottom is the one which interacts with the host and is built
with the host libC, while the top is built with the embedded code
and whatever libC that is built with.
Errors (errno) is converted between the top and bottom to ensure they
are coherent with the local libC.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add HCI IPC retry handling in case of full IPC
queue. This mechanism improves reliability.
The ipc_service_send can return -ENOMEM in case
of full queue. If this happens the retries are
executed in order to wait for queue to empty
and not drop messages.
If the retry mechanism reaches maximum then
the error code is passed back to the host.
The change should improve the handling of
passing messages to full ipc and reduce
dropping of packets.
Signed-off-by: Dominik Chat <dominik.chat@nordicsemi.no>
Added CONFIG_AMBIQ_COMPONENT_USE_BT and CONFIG_SOC_AMBIQ_BT_SUPPORTED
to fix empty zephyr_library() warning when BLE is not needed for compile.
Added CMake message if BT related Ambiq specific Kconfig is overriden for
not supported SoC.
Signed-off-by: Swift Tian <swift.tian@ambiq.com>
The SiWx917 BLE controller currently does not support
HCI Command 0x0C35 i.e. Host Number of Completed Packets Command
Disabling the ACL Flow Control avoids sending this command during
SMP Pairing process and therefore avoiding an ASSERT
Signed-off-by: Ramana Gudipudi <ragudipu@silabs.com>
Driver was tested with a custom application which enabled the BT_SHELL.
Basic functionalities were verified:
- Scanning
- Advertising
- Connecting
Configuration needed for the test:
- CONFIG_BT=y
- CONFIG_BT_PERIPHERAL=y
- CONFIG_BT_CENTRAL=y
- CONFIG_BT_SHELL=y
- CONFIG_SHELL=y
Co-authored-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Tibor Laczko <tibor.laczko@silabs.com>
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The `BT_DRV_RX_STACK_SIZE` config is used by HCI drivers to determine a
suitable stack size for their RX thread. These threads handle the HCI
transport and pass HCI messages to the Bluetooth host via `bt_hci_recv()`.
Previously, the default stack size was 256 bytes, but it seems to be too
small currently.
Measuring the peak stack usage of `bt_hci_recv()` in different scenarios
indicates that the function needs over 300 bytes of stack. Thus, an RX
thread stack size of 512 should cover that and leave some margin.
Signed-off-by: Kalle Kietäväinen <kalle.kietavainen@silabs.com>
Several driver setting were as defines in driver file which made hard to
change by application programmers. Fixed by adding
silicon labs specific Kconfig file for bluetooth driver configurations.
Also some cleaning for handling Kconfig conditional to conform
preferred style.
Signed-off-by: Petri Pitkanen <petri.pitkanen@silabs.com>
Add empty function stubs to support building with the newly introduced
CONFIG_BUILD_ONLY_NO_BLOBS option.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Since now Mbed TLS automatically selects ENTROPY_GENERATOR (or the
test generator, depending on the platform) we can remove this dependency
from all BT related tests and samples.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
Now that we enable `HAS_BT_CTLR` we should also declare which optional
features are supported. For now, we only add the features that are
available through the current driver init routine and found on all
supported platforms.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
BLE public address assignment shall be done only when
CONFIG_BT_HCI_RAW is not enabled.
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
The controller behind the EFR32 driver is a local link layer
implementation, so it makes sense to select HAS_BT_CTLR.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Change running baudrate from `115200` from `3000000`.
Implement the function `bt_h4_vnd_setup` to update the HCI bandrate.
Add Kconfig `BT_H4_NXP_CTLR_WAIT_TIME_AFTER_BAUDRATE_UPDATE` to set
the waiting time after the controller bandrate HCI vendor specific
command sent. It is used to ensure the controller is ready to update
HCI bandrate.
Select `BT_HCI_SETUP` if `BT_H4_NXP_CTLR` is enabled.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
As BT now uses PSA crypto API instead of TinyCrypt, entropy generator
is now needed for a proper bluetooth operation.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
As long as MBEDTLS_ENTROPY_C is enabled, Mbed TLS needs to
poll some entropy source to gather data that will then be
processed by CTR/HMAC-DRBG modules. This means that in most
of the cases, once MBEDTLS_ENTROPY_C is enabled then also
MBEDTLS_ENTROPY_POLL_ZEPHYR needs to be enabled. This was
done manually until now, as the long list of samples/tests
demonstrate.
This commit solves this dependency by defaulting
MBEDTLS_ENTROPY_POLL_ZEPHYR to on as soon as
MBEDTLS_ENTROPY_C is set. As a consequence, all manual
enablement of MBEDTLS_ENTROPY_POLL_ZEPHYR in samples/tests
are removed.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
-Update formatting and contents of index.rst for cy8ckit_062s4
-Update formatting and contents of index.rst for cy8ckit_064s0s2_4343w
-Update formatting and contents of index.rst for cy8cproto_062_4343w
-Update formatting and contents of index.rst for cy8cproto_063_ble
-Update formatting and contents of index.rst for xmc45_relax_kit
-Update formatting and contents of index.rst for xmc47_relax_kit
-Change all instances of "PSoC" to "PSOC" for infineon platforms
Signed-off-by: McAtee Maxwell <maxwell.mcatee@infineon.com>
Zephyr 3.7.0 has been released and it is time to remove the migration
code added in 9cf07bbdb5 (bluetooth:
Rename rpmsg HCI driver and sample to ipc).
Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
Add dedicated Kconfig symbols for the two SPI backend variants. This
allows enabling the symbols by default from devicetree, and cleans up
the cmake logic.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Rename the Silabs HCI driver to hci_silabs_efr32.c to better indicate what
hardware it supports. Also rename the associated devicetree binding and
Kconfig options to be consistent with the new driver name.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Current code does no longer support
the non monolithic feature.
Hence, removing unnecessary code.
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
Add updates to support MCXW71
Add support if RX data are received in ISR context
Add support to set BT address using Vendor command
Signed-off-by: Yassine El Aissaoui <yassine.elaissaoui@nxp.com>
This commit applies several changes in the way "heap_runtime"
feature is used. It can't be split due to bisectability issues.
Whenever the feature is enabled, a new heap is created and
custom malloc/calloc/free functions are added into the build
system. Those functions are currently used for internal Wi-Fi and BLE
drivers only.
Such changes are described below:
1) Rename heap.c to esp_heap_runtime.c for better readability.
2) Rename RUNTIME_HEAP to HEAP_RUNTIME to make it similar to what is
available in Zephyr.
3) Add runtime heap to BT as such as Wi-Fi.
Fixes#79490Fixes#79470
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Added setup of PUBLIC ADDR
NOTE: By default, the CYW208xx controller sets some
hard-coded static address.
To avoid address duplication, let's always override
the default address by using the HCI command
BT_HCI_VND_OP_SET_LOCAL_DEV_ADDR. So
1. when cyw208xx_setup gets BT_ADDR_ANY from the host,
it will overwrite the default address, and the host
will switch to using a random address (set in the hci_init
function).
2. If user set the static address (by using bt_id_create)
before bt_enable, cyw208xx_setup will set user defined
static address.
Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
Now that there is an actual Kconfig symbol generated for blobs presence,
take advantage of that and declare appropriate dependencies to it. Also add
helpful CMake output if the blobs are missing by taking advantage of the
zephyr_blobs_verify() CMake function.
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
Most of BT_FOO symbols that are designed to select the hci driver
implementation which will drive the comunication with controller are
selected based on device tree compatible and should not be made available
as an configurable option to the user.
To do this, remove the prompt on these symbols.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
- Slightly improve the name of this kconfig adding the suffix
_POLL in order to highlight that this adds a callback
function used to poll data.
- Description was also updated to point out that this symbols
might not only use the (secure) entropy driver, but also
generic number generators, some of which are not really
secure.
- The symbol was move from Kconfig to Kconfig.tls-generic because
this is where MBEDTLS_ENTROPY_C is located and since
MBEDTLS_ENTROPY_HARDWARE_ALT depends on the former (it only
makes sense if the entropy module is also enabled), we add
also the "depends on".
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
ENABLED suffix does not really makes much sense for a kconfig
so it should be removed. Also other MBEDTLS symbols were recently
updated accordingly.
Moreover having it named exactly the same way as in Mbed TLS
symplifies the understanding of what this kconfig is doing.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
The driver can run in either native_posix or native_sim.
Let's make sure to set the dependencies acordingly.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Remove the logic from the board level about overriding the
flash load size and instead just select to use the DT code
partition if app is not expected to be able to occupy the
whole flash space because of the firmware image being
loaded separately.
Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
Enabling BT_HCI_SETUP for STM32WB55 to have a
correct and proper initialization procedure to fix
#75318 issue
Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
Add Kconfig.nxp to support NXP Bluetooth Chipset.
Current only NXP IW612 Chipset (BT_NXP_NW612) has
been supported.
Add modules/hal_nxp/bt_controller/CMakeLists.txt to
determine whether any firmware is selected, and
check whether the firmware exists.
If the firmware exists, copy the firmware to the
temporary folder ${ZEPHYR_BINARY_DIR}/include/
generated/bt_nxp_ctlr_fw.h. OR, raise a fatal error.
In file hci_nxp_setup.c, includes the temporary file
bt_nxp_ctlr_fw.h.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Implement UART firmware download driver for NXP
BT module.
Only support Murata 2EL M.2 module on RT1170EVKB.
And only one instance can be supported now.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Convert the slz_hci.c HCI driver to use the new HCI driver API. This also
fixes the HCI bus type to correctly indicate VIRTUAL instead of UART.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
Convert the hci_nxp.c HCI driver to use the new HCI driver API. Also move
the driver binding under dts/bindings/bluetooth, like all other HCI driver
bindings.
Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>