Commit graph

21541 commits

Author SHA1 Message Date
Lingao Meng
4a8a1577ef Bluetooth: Mesh: Redefine callback registration
There is a problem with the previous method, that is,
we use the same label(bt_mesh_subnet_cb_subnet_evt) and
put it in the same section, which is not friendly for debugging.

Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2021-08-20 06:28:12 -04:00
Torsten Rasmussen
1cccc8a8fe cmake: increase minimal required version to 3.20.0
Move to CMake 3.20.0.

At the Toolchain WG it was decided to move to CMake 3.20.0.

The main reason for increasing CMake version is better toolchain
support.

Better toolchain support is added in the following CMake versions:
- armclang, CMake 3.15
- Intel oneAPI, CMake 3.20
- IAR, CMake 3.15 and 3.20

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2021-08-20 09:47:34 +02:00
Asbjørn Sæbø
252a9bad9a Bluetooth: ots: Fix output formatting
Fix output formatting after changes in
https://github.com/zephyrproject-rtos/zephyr/pull/36653/
causes Twister build fails in pending le-audio code.

Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
2021-08-19 10:20:37 -04:00
Omkar Kulkarni
f868ca3497 bluetooth: mesh: Fix IVU duration counter update
When device is first provisioned with IV Update
flag is set to 0, it should wait for minimum of
96 hours before going into IV Update In Progress
state. Such limit does not apply, if device is
provisioned with IV Update flag is set to 1.

Signed-off-by: Omkar Kulkarni <omkar.kulkarni@nordicsemi.no>
2021-08-19 10:19:43 -04:00
Meng xianglin
f039cc44a1 pm: refine defination of pm_dump_debug_info()
Provide dummy implementation of pm_dump_debug_info() as a
static inline function in pm.h.

Signed-off-by: Meng xianglin <xianglinx.meng@intel.com>
2021-08-19 10:19:24 -04:00
Pavel Vasilyev
0e9d668970 Bluetooth: Mesh: Add API to discard subscription in vendor model
This commit adds missing API that allows to discard the Subscription
List of a vendor model.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-08-19 10:19:02 -04:00
Pavel Vasilyev
538f97f737 Bluetooth: Mesh: Clarify name length in bt_mesh_model_data_store
Name length can't be longer than 8 bytes. This needs to be clarified
in the bt_mesh_model_data_store() documentation.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2021-08-19 10:19:02 -04:00
Emil Gydesen
03c3a31be9 Bluetooth: Iso: Change set CIG parameters fail to unref
Change the fail handling of setting the CIG parameters
(or when allocating the CIS) to unref the ISO conns
instead of calling cleanup on them directly.

This fixes an issue that if the CIG parameters failed,
then the iso conns would not be unref'ed and we could
not try again.

Unref'ing an iso conn will call cleanup once it hits 0
refs.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-19 10:18:28 -04:00
Emil Gydesen
393436c773 Bluetooth: ISO: Add log if cleanup fails to remove the CIG
Add an warning log message if the CIG failed to be removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-19 10:18:28 -04:00
Emil Gydesen
a0cec00807 Bluetooth: ISO: Add iso channel state check for unbind
A channel should only be allowed to unbind when in
the BT_ISO_BOUND state. If it is in a disconnected state,
then it the function would have meaning. If it is a connected
state, unbinding it would generate an error when removing
the CIG, which would fail silently.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2021-08-19 10:18:28 -04:00
Piotr Pryga
a947d5aa24 Bluetooth: controller: Extend HCI TX cmd buf size for CTE rx param cmd
LE Set Connection CTE Receive Parameters HCI command size may not fit
into HCI TX command buffer size, which default value is 65 bytes.
For platforms other than Nordic there may be up to 75 antenna IDs
put into the command.
Added new default value for SOCs not compatible with Nordic to
extend default TX buf size to 83 bytes (75 bytes for antena IDs,
5 bytes for other command parameters, 3 bytes for command header).

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
0b07a7812e Bluetooth: controller: add functions to enable CTE req LLCP
Add functions that handle enable CTE request control procedure
request from host.
Implementation of ll_df_set_conn_cte_req_enable in ULL is partial.
It will be integrated with refactored implementation of control
procedures.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
8382d6e5be Bluetooth: controller: Add CTE Rx params struct to lll_conn declaration
Add struct ll_df_conn_rx_params sturcutre to struct lll_conn.
This is storage for parametrers required to configure radio
for CTE reception in connected mode by lower link layer.

Add required includes to make the controller code compilable
after change struct ll_conn.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
52ec547894 Bluetooth: controller: Add handling for HCI set CTE Rx parameters
HCI_LE_Set_Connection_CTE_Receive_Parameters handling is required to
enable sampling of Constant Tone Extension in connected mode.

The commit adds handling for HCI_LE_Set_Connection_CTE_Receive_-
-Parameters command.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
ee71d95011 Bluetooth: controller: Add CTE Rx params struct to ll_conn declaration
Add struct ll_df_conn_rx_params sturcutre to struct ll_conn.
This is storage for parametrers required to configure radio
for CTE reception in connected mode.

Add required includes to make the controller code compilable
after change struct ll_conn.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
3a9d809d0d Bluetooth: controller: add struct for conf of CTE rx in conn mode
Add new strcture type for storage of CTE receive parameters.
The structure will be used in to store parameters for connected mode.

The parameters provided by HCI commands for receiving CTE
in connected mode and disconnected mode are a bit different.
There is common subset of parameters but extraction of those
into common structure would increase of size of other stuctures
that aggregate them.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
d159646e9b Bluetooth: controller: ull_df.c code re-arrange
Code related with connected mode was in middle between connectionless
RX and TX. Moved to the bottom of the file.

Added missing compilation guards for ll_df_set_conn_cte_tx_params.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
6a848ec91b Bluetooth: controller: Add LE features for CTE req and resp
Add features: connection CTE request, connection CTE response
and receiving constant tone extensions; to HCI and features
supported by controller.
The features are not enabled yet.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Piotr Pryga
2aa3fbb579 Bluetooth: controller: Add option to enable conn. CTE request feature
Add Kconfig option that enables BT v5.1 Connection CTE request feature.

Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
2021-08-18 20:11:10 -04:00
Yong Cong Sin
d156fa754e subsys/mgmt/hawkbit: Compute & compare image hash
Compute the SHA256 hash of the downloaded image and compare that with
the hash in the deploymentBase to guarantee that only the correctly
downloaded image will be flashed.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-18 20:10:21 -04:00
Yong Cong Sin
eaa29d9d71 subsys/mgmt/hawkbit: Prevent multiple instances of hawkbit_probe
Use a semaphore to prevent the hawkbit_probe from running more than once
at the same time since it reset the hawkbit context on entry and will
affect other running instance.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-18 20:10:21 -04:00
Yong Cong Sin
17dd9f4928 subsys/mgmt/hawkbit: Check if the download completed
Remove the unused semaphore and use a boolean variable to check if the
download is complete.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-18 20:10:21 -04:00
Yong Cong Sin
73668323cf subsys/mgmt/hawkbit: Use dts for "storage" partition
Use devicetree for the "storage" partition.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-18 20:10:21 -04:00
Yong Cong Sin
7c8de26f45 samples/subsys/mgmt/hawkbit: Remove unused definition
Remove unused NETWORK_TIMEOUT definition.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-18 20:10:21 -04:00
Yong Cong Sin
1409b90c90 subsys/mgmt/hawkbit: Fix typos
Fix multiple typos and make the sample's log output consistent
with the subsys.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
Co-Authored-By: Sylvio Alves <sylviojalves@gmail.com>
2021-08-18 20:10:21 -04:00
Yong Cong Sin
a5f49ac943 subsys/mgmt/hawkbit: Add missing CONFIG_HAWKBIT_LOG_LEVEL
Add missing CONFIG_HAWKBIT_LOG_LEVEL so that its verbosity can be
configured.

Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2021-08-18 20:10:21 -04:00
Dominik Ermel
33a7c98789 fs/fatfs: Apply changes required for version 0.14b
The commit applies changes that are required by update of ELM Chan's
FAT FS driver update to version 0.14b.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-08-17 17:52:55 -04:00
Martí Bolívar
041099f67c Bluetooth: Controller: clean up nRF DFE
The way we currently handle direction finding extension (DFE) support
on Nordic nRF5 controllers relies on required devicetree properties
related to DFE in the "nordic,nrf-radio" node.

That doesn't make sense on radios without DFE support, though.
Any .dtsi for an SoC without DFE support which has such a node would
require extraneous DFE related properties like dfe-antenna-num.

Instead of making the properties required, mark them optional. We
indicate the presence of DFE support via a new 'dfe-supported' boolean
property which the SoC .dtsi files can set (or not) depending on
support.

This gives us the opportunity to do some cleanup in the Kconfig,
removing CONFIG_HAS_HW_NRF_RADIO_BLE_DF since we know from the
devicetree whether DFE support is available.

Handle that change appropriately in radio_df.c. This gives us an
opportunity to improve readability in the devicetree-related macro
magic in that file.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-08-17 17:52:43 -04:00
Vinayak Kariappa Chettimada
2cbc97d047 Bluetooth: Controller: Extended Active Scanning review rework
Miscellaneous review rework changes.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
58b07c719a Bluetooth: Controller: Explicitly cast to void memq_dequeue calls
Explicitly cast to void memq_dequeue function calls.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
1cd8eb3a81 Bluetooth: Controller: Fix scan_data_status value
Fix scan_data_status value from being incorrected OR-ed with
the advertising data status.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
0fdac865e5 Bluetooth: Controller: Simplify LLL scheduling decision
Simplify the implementation deciding the use of LLL
scheduling for scanning PDUs with close auxiliary offsets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
2feffaf719 Bluetooth: Controller: Release LLL scheduling aux on incomplete data
Add implementation to release Auxiliary Context on failure
to receive auxiliary chain being in LLL scheduling.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Andrzej Kaczmarek
48ee84ffda Bluetooth: Controller: Fix aux scheduling from LLL
We need to alloc node prior to calling lll_scan_aux_setup, otherwise
the same node will be peeked inside that function and it will overwrite
some data in our node (e.g. "extra" field).

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
d879861d44 Bluetooth: Controller: LLL scheduling for active scanning and initiator
Implementation to use LLL scheduling for close auxiliary
offsets when active scanning and initiating connections.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
369dfd50ad Bluetooth: Controller: Fix tag name should be unique violation
Fix tag name should be unique violation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
451f0a25f1 Bluetooth: Controller: Resume primary PDU scanning after Auxiliary PDU
Add implementation to resume primary PDU scanning window
after use of LLL scheduling to receive auxiliary PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
25da55afce Bluetooth: Controller: Flush Aux PDUs being in LLL scheduling
When Auxiliary PDUs are scanning by the primary scan's LLL
scheduling, then flush the Auxiliary PDUs when processing
them in the ULL instead of using the disabled callback.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
cddf4cc4ed Bluetooth: controller: Extended scanning with LLL scheduling
Extended scanning with LLL scheduling.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-08-17 17:36:19 +02:00
Andrzej Kaczmarek
34edd41e76 Bluetooth: controller: Add ull_scan_aux_is_valid_get helper
This can be used to check if pointer is a valid lll_scan_aux pointer,
e.g. if we need to decide what kind of struct is attached to RX node
for further processing.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2021-08-17 17:36:19 +02:00
Andrzej Kaczmarek
1444c331a3 Bluetooth: controller: Fix isr_done_cleanup
We need to reset isr status before returning as otherwise irq will be
triggered over and over again.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
be8f1a2519 Bluetooth: Controller: Generate Extended Scan Response report
Added implementation to traverse the Extended Active Scanned
advertising PDUs, generate the Scannable Advertising and
Scan Response Advertising Report.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
bf957850ca Bluetooth: Controller: Hold back Extended Scannable PDUs
When Extended Active Scanning hold back the received PDUs in
a linked list and send it to HCI together so that fields
present across these PDUs can be aggregated for generating
the LE Extended Advertising Report.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
bbb53446ad Bluetooth: Controller: Flush scanned rx node before scan response PDU
Flush the scanned advertising PDUs to HCI while receiving
the scan response PDU when Extended Active scanning.
This reverts earlier implementation to remember the
advertising PDUs.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
9962faf3c6 Bluetooth: Controller: Add support for Extended Active Scanning
Add support for Extended Active Scanning and generation of
Extended Advertising Report with Scan Response event type.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
bf20b23f0f Bluetooth: Controller: Reverting Extended scanning with LLL scheduling
Reverting Extended scanning with LLL scheduling as this is
causing unresolvable merge conflict with the commits that
is implementing the Extended Active Scanning support.

Subsequent commit add the revert implementation back again.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Vinayak Kariappa Chettimada
854aaeb8ae Bluetooth: Controller: nRF53x: Fix missing sw_switch clear DPPI config
Fix missing sw_switch timer clear DPPI config when
re-enabling Tx or Rx after radio_disable() or
radio_switch_complete_and_disable() call in LLL state/role
contexts.

Relates to commit 1c3659519f ("Bluetooth: controller:
nRF53x: Fix missing sw_switch clear DPPI config").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2021-08-17 17:36:19 +02:00
Dominik Ermel
f7ac14ddc7 mgmt/mcumgr: Allow using UART async API
The commit provides preliminary support for async UART within
mcumgr.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2021-08-17 17:12:34 +02:00
Johann Fischer
eb4b9b9cbd usb: finally remove Kconfig option CONFIG_USB
After the modules are adapted for the revised
USB device stack configuration, and it seems that
it was only necessary for MCUboot, we can finally
remove Kconfig option CONFIG_USB.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2021-08-17 16:58:58 +02:00
Stancu Florin
4561ea0ae2 net: ieee802154: software dest address filtering
Checks PAN ID for matching self address / broadcast, then the short /
extended address based on the used address mode.

Only when IEEE802154_HW_FILTER is not advertised by driver.

Signed-off-by: Stancu Florin <niflostancu@gmail.com>
2021-08-17 09:19:39 -04:00