Remove unnecessary main stack configuration in bluetooth samples.
The HCI power control sample does not need to set the main stack this
low, and setting it causes restriction on what the application can
change in menuconfig. A change in the entropy driver causes stack
overflow.
The HCI uart sample sets the main stack to the default size.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use the multiple board revisions feature to provide support for the new
hardware possibilities available in nRF9160 DK starting from v0.14.0.
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Use devicetree instead of Kconfig to configure the board control
switches in nRF9160 DK:
- add binding for the switches that provide optional signal routings
on this board
- add binding for the GPIO interface that can be used for communication
(e.g. UART based) between the nRF9160 and the nRF52840 on the DK,
and add GPIO mapping for this interface so that its lines can be used
without caring about of actual pin numbers on both sides
- add binding for one GPIO line chosen from the above interface that is
to allow the nRF9160 to reset the nRF52840
- update accordingly dts files and board specific code for both board
definitions associated with the DK
- introduce .dtsi files that can be included from dts overlays in order
to facilitate the use of the above GPIO interface; modify the overlay
in the hci_uart sample to provide an example of use of those files
Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
Add an application that uses Direction Finding API for
transmission of CTE in connectionless mode (periodic adverising PDUs).
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Fix stack overflow in the TX power control sample.
Current stack usage with 0.11.1 zephyr toolchain was at 100% stack
usage of the DYN TX stack.
Fixes: #31433
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove the deprecated scan filter duplicate enum values and parameter.
This was deprecated for the 2.3.0 release.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This patch modifies Bluetooth HCI RPMsg drivers and samples to use
RPMsg Service instead of configuring OpenAMP directly in the driver
or the sample.
Co-authored-by: Piotr Szkotak <piotr.szkotak@nordicsemi.no>
Signed-off-by: Hubert Miś <hubert.mis@nordicsemi.no>
The IPSP example code is explicitly registering the all local-link nodes
address (ff02::1). This is currently already registered by the normal
IPv6 stack at interface initialization, so doing it in the application
is redundant.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
This sample is trying to register four multicast addesses:
uart:~$ net iface
...
IPv6 multicast addresses (max 8):
ff02::1
ff02::1:ff01:c41e
ff02::1:ff00:1
ff02::1
Increasing CONFIG_NET_IF_MCAST_IPV6_ADDR_COUNT to 4 to make neighbor
discovery work correctly.
Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
Currently a lot of common kconfig options are being set in
board-specific overlays.
This commit puts them in the main prj.conf.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Add LED blinking while scanning for Periodic Advertising,
and LED ON when Periodic Advertising Sync is established.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added documentation in per_adv and per_sync samples on how
to test Periodic Advertising and Periodic Advertising
Synchronization.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Add an application that initializes Bluetooth Subsystem,
creates an extended advertising set, and starts Periodic
Advertising functionality.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Increases the loopback buffer count to 8 in the mesh demo to give it
enough room for buffering the configuration messages in the
initialization step. As these messages are sent in a non-blocking
manner, they'll all be queued up for execution before any of them is
processed.
Fixes#30207.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Samples that include floating-point format specifications may need
cbprintf FP support. Make sure it's available.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Convert handful of users of DEVICE_INIT to DEVICE_DEFINE or
SYS_DEVICE_DEFINE to allow deprecation of DEVICE_INIT.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Update the `peripheral` and `peripheral_ht` samples to use the
indication `destroy` callback to determine when the indication has
completed, instead of using the value callback of the first active
connection.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Adds a `destroy` callback to the `struct bt_gatt_indicate_params` which
is used to signify to the application that the indication operation has
completed and the struct instance can be freed/destroyed.
This is required as the number of indication value callbacks that will
be triggered is not known by the caller when the `conn` parameter is
`NULL`.
Tracking when this callback should be run is mananged by a private
reference counter inside the struct.
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Update the signature of the `bt_gatt_indicate_func_t` callback type by
replacing the attr pointer with a pointer to the
`bt_gatt_indicate_params` struct that was used to start the indication.
This allows the callback to free the `bt_gatt_indicate_params` instance
if it was allocated from storage, while still allowing the
`bt_gatt_attr` value to be accessed through `params->attr`.
Allocating the `bt_gatt_indicate_params` instance from storage is
desirable as multiple indications can be queued, however each instance
must be valid until the callback is run.
Implements API update from #29357
Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
Moves mesh feature configuration to a separate module, deprecating the
bt_mesh_cfg_srv structure. The initial values for the features should
now be enabled through KConfig, where new config entries have been added
for each feature.
This removes the upward dependency on the config server from the core
stack, and makes the config server a pure frontend for the configuration
states, as all spec mandated behavior around the feature states is now
encapsulated.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Currently all provisioning procedure into common source
files call `prov.c`, that will not compile separately.
Add `BT_MESH_NODE` to control whether nodes are supported
and device provisioning is supported, this will be used in
provisioner role.
Add more provisioner OOB authentication method.
Signed-off-by: Lingao Meng <mengabc1086@gmail.com>
Adds a test case listing in sample.yaml of the mesh_provisioner sample,
building on qemu and the Nordic nRF51 DK to ensure that the provisioner
role is built in PRs.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Users testing beacon capability will likely want to see the beacons in
a sniffer tool. Switch to an advertising mode that uses a persistent
known address, and display that address on the console output.
This also demonstrates techniques to retrieve the advertising address
where one is known.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Added a Bluetooth Peripheral sample that demonstrates how to use
GATT Object Transfer Service.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The _gatt_ infix was determined to be unnecessary as
GATT is implied by it being a Bluetooth service.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Receiver part reworked to not block in interrupt and rely on assumption
that uart_fifo_read is capable of reading incoming data from the HW.
Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
Now that device_api attribute is unmodified at runtime, as well as all
the other attributes, it is possible to switch all device driver
instance to be constant.
A coccinelle rule is used for this:
@r_const_dev_1
disable optional_qualifier
@
@@
-struct device *
+const struct device *
@r_const_dev_2
disable optional_qualifier
@
@@
-struct device * const
+const struct device *
Fixes#27399
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Trims the default memory configuration for the BBC Microbit in mesh
samples to ensure that it fits.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Add CONFIG_NET_CONFIG_AUTO_INIT=y to enable the bluetooth
device network interface.
Due to #27405 feature PR allowing application to init the network
whenever it wants, IPSP sample stopped initing the
bluetooth network.
The IPSP sample was not updated to enable
CONFIG_NET_CONFIG_AUTO_INIT in prj.conf
and didn't call net_config_init_app(...)
as suggested in the feature PR.
Signed-off-by: Jeremy LOCHE <lochejeremy@gmail.com>
Add both .conf and .overlay files for the nRF51 dongle, which is still
used and was missing configuration files.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
-Wimplicit-fallthrough=2 requires a fallthrough comment or a compiler
to tells gcc that this happens intentionally.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Fixes#27266.
cmd_hdr and acl_hdr local structs were read but never written.
Causing unpredictable errors in bt_tx_thread such as :
"Invalid HCI CMD packet length" in hci.c:2280
or Imprecise data bus errors on nrf52810.
cmd_hdr and acl_hdr are now filled with the received data
from SPI Master.
Signed-off-by: Corentin Dorothée <corentin.dorothee@gmail.com>
Applications using IPM callbacks get the imp device instance pointer
now through the callback. Which help to clarify a bit the code here and
there as well.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
It was already using uart_irq_callback_user_data_set below, now it also
uses uart_irq_callback_user_data_t as callback type, so let's normalize
the callbacks.
Fixes#26923
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>