Put infrastructure for the following HCI commands/events in place:
* LE Read ISO Link Quality command
* LE Read ISO TX Sync command
* LE Set Host Feature Command
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
Since first poll request send by lpn use friend security
credentials, so, friend nodes should be able to decrypt with
friend security, even if they have not yet established a friendship.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
When friend node key refresh phase to stage_1, there
are need to add friend update message to friend queue,
but, when friend KR phase to stage_2, must add friend
update to queue.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Friend node cache segment message for lpn, message with
sequence number can't change, since could cause lpn replay
attack.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Fix field names of bt_hci_cp_le_setup_iso_path in le_setup_iso_path to
make CIS central/periphal compile and adjust parameter names for
ll_setup_iso_path accordingly.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
A single-shot ticker in requested state beyond the elapsed
duration or skipped due to collision shall generate an
operation callback with failure status.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In the case where a BLE connection ticker node collides and does not
trigger a callback to ULL, and at the same time the same node receives a
ticker update request, the update causes the node to be scheduled for
execution a second time. This has the consequence of event_counter going
out of sync, and BLE connection is ultimately lost.
The solution is to mark collsions and re-scheduled nodes as expired, and
use the increased lazy count to identify its state instead of req/ack.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Implement HCI commands to read information about supported codecs and
controller delay.
* Read Local Supported Codecs command (v1 and v2)
* Read Local Supported Codec Capabilities command
* Read Local Supported Controller Delay command
The following functions are implemented as "weak" symbols and should
be overridden to fill in vendor-specific information into the above
commands.
* hci_vendor_read_std_codecs
* hci_vendor_read_vs_codecs
* hci_vendor_read_codec_capabilities
* hci_vendor_read_ctlr_delay
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Add defines and structs for reading information about supported codes,
codec capabilities and controller delays. Return parameter structs for
commands that return multiple variable-length fields only model the
fixed-length fields to minimize inconsistencies.
Signed-off-by: Wolfgang Puffitsch <wopu@demant.com>
Legacy functionality in ull_conn will force scheduling of a connection
which has missed an anchor point due to lost RX. This kicks in either
for previously skipped events (latenzy_event != 0) or at random
depending on the randomness of the AA bit pattern.
This behavior is good at ensuring that a connection with errors or
aborted RX gets prioitized, and helps break locked round-robin
patterns with lost sync, but it also breaks the predictability of
the round-robin ticker scheduling.
With "must_expire" enabled, this feature also kicks in for scheduling
collisions, which may not be desirable.
This commit adds a configuration flag, BT_CTLR_CONN_RANDOM_FORCE, which
is default enabled (legacy behavior).
Signed-off-by: Morten Priess <mtpr@oticon.com>
Fix missing initialization of periodic interval value in
advertising report info structure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Clarify that the acl_data struct includes the bt_buf type as the
first variable in the user data struct.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor out implementation of functions defined in buf.h to its own
source file buf.c
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add implementation of HCI_LE_Set_Connection_CTE_Transmit_Parameters
for Bluetooth 5.1 Direction Finding.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add separated Kconfig file for Bluetooth 5.1 Direction Finding.
Enable controller support for:
- transmission of CTE
- 2us antenna switching
- 1us antenna switching
if build for nRF52833 SOC.
Add HAS_HW_NRF_RADIO_BLE_DF to nrf52833 SOC configuration.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add partial implementation for handling Bluetooth 5.1 Direction
Finding HCI command HCI_LE_Read_Antenna_Information to controller
Upper Link layer.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Add Bluetooth 5.1 Direction Finding HCI command:
HCI_LE_Read_Antenna_Information handling to Host.
Add wrapper function to handle send the command
and receive response from Controller.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
Adds a cli_reset to mod_sub if no status response was requested. This
adds a non-blocking mode to the mod_sub calls, matching the behavior of
other cfg_cli functions.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Missing copy net_idx to ctx, this cause tx subnet not found
or different with rx subnet, when rx subnet net_idx not zero.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
Nothing in the API description the delayed work structure sanctions
direct reference to internal fields. Do not assume that a delayed
work item can be submitted without delay by invoking k_work_submit()
with a reference to the contained work item. Instead submit with the
delayed API and no wait.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Debug messages used the address of a member of the work_q structure as
an identifier; that field is not public API, so replace it with the
address of the work queue itself.
Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
Fix node rx buffer leak if extended advertising and/or
periodic sync reports are masked out by the host.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added code comments to explain the reasons to drop
incomplete advertising and sync report.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Extended Advertising Report generation that skipped
population of AD data when there was no extended header.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use a common function to get the thread name.
There was no necessity in keeping sys_trace_thread_info() inline,
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Enables optionally placing Segger RTT and SystemView data in the DTCM
linker section instead of the default data section. This is needed on
SoCs in the i.MX RT series that use cacheable external SDRAM to store
data.
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
Set the RX/TX thread priorities so that if cooperative priorities
are used, then lowest priority thread will have priority -1 which
is the lowest cooperative priority. The higest net thread priority
will depend on number of traffic classes but with max value 8,
the highest priority will be -8.
If preemptive priorities are used, then highest priority thread
will have priority 0, which is the highest preemptive priority.
In this case, the lowest thread priority will be 7 if there are
8 traffic classes.
The motivation for this change is that for cooperative priorities
we want to let other cooperative priority threads to run before
networking. But if preemptive priorities are used, we want
networking threads to run reasonably often compared to other
preemptive priority threads.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
If networking pre-emptive thread priorities are enabled,
then use the proper macro to enable them.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Let user to decide whether the RX/TX threads are run in either
co-operative or pre-emptive thread priority.
Default is co-operative threading.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Put infrastructure for the following HCI commands/events in place:
* LE Setup ISO Data Path command
* LE Remove ISO Data Path command
* Configure Data Path command
* LE Set CIG Parameters Test command
* LE ISO Read Test Counters command
* LE ISO Receive Test command
* LE ISO Test End command
* LE ISO Transmit Test command
Signed-off-by: Asger Munk Nielsen <asmk@oticon.com>
Periodic Advertising Set Info Transfer depends on Extended
Advertising and connections hence enclose the LE Periodic
Advertising Set Info Sync Transfer implementation inside
CONFIG_BT_PER_ADV and CONFIG_BT_CONN conditional
compilation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Periodic Advertising Sync Transfer depends on connections
hence enclose the LE Periodic Advertising Sync Transfer
Received Event code inside CONFIG_BT_CONN conditional
compilation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Because unoconnected stream socket doesn't have any chance to receive
any data, so a blocking recv() would hang forever on it (and does
without this change).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
If a read is requested without a read buffer, the emulator currently
crashes. Fix this by adding a check.
Fixes: #29703Fixes: #29702Fixes: #29017Fixes: #29016
Signed-off-by: Simon Glass <sjg@chromium.org>
Fix the debug key-set comparison for debug keys comparing the
generated key in big-endian format against the debug private
key in little-endian format.
Fix this by converting the private key to big-endian format for
convenience.
Use the _be suffix for all variables to make the mixing of the
endian formats easier to read.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Two ull_adv_sync function declarations, ull_adv_sync_reset and
ull_adv_sync_init was guarded by a #if causing CI issues.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The same code block for marking an object with
ull_disable_mark, stopping the ticker and then unmarking
the object appeared multiple places; often with a regression
bug where instead of unmarking it in case of error, it would
be "remarked".
This commit fixes the bug, and moves the functionality to
a common function.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>