Sync up with missing LLL changes done related to moving the
handling of pipeline handling into LLL.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Update the L2CAP channel send command to correctly reserve the number
of bytes needed for an L2CAP SDU.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update the L2CAP OTS implementation to use the correct reserve
defitition. By not using the correct definition the stack always
allocates a new segment for the packet, which puts more stress on the
stack buffers.
Update TX data size to be more intuitive by adding the overhead, instead
of subtracting it. This increases the default MTU of the implementation.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add argument to the L2CAP channel send command so that the user can
determine the length of the packet to send, this is useful for testing
various segmentation scenarios.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update the documentation for L2CAp Connection oriented channel send
function to include better description of the L2CAP PDUs (Basic frames)
and L2CAP SDUs (Credit-based frames) so that the application can better
understand how to size the buffer pools and setting the RX mtu.
Document stack behavior on RX path and how the application has to
set up the channel in order to receive segmented packets.
Document stack behavior on TX path for reserving either mandatory or
optional header bytes.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor and simplify the bluetooth buffer configurations to improve the
easy of configurations and eliminate invalid ones.
By moving configurations out of host and controller specific
configurations and into a common one it becomes easier to configure
the host and controller separately as the same configurations can be
used as would be for a combined build.
All HCI configurations are now given exluding the matching HCI header,
which eases the configuration as the application don't have to know the
different header sizes.
The BT_RX_BUF_LEN is split into ACL and Event, as well as the suprising
use of Command size.
BT_L2CAP_RX_MTU is removed as the stack does not support reassembling of
HCI ACL data to larger L2CAP PDUs. The application will have to set
ACL RX size and account for the L2CAP PDU header itself.
BT_EATT_RX_MTU was removed as it is only used for setting a different
default value for another option which leads to the stuck kconfig symbol
problem.
The configurations can be updated according to the table below:
** New configuration | ** Old configuration
All configurations
BT_BUF_ACL_RX_SIZE | BT_L2CAP_RX_MTU + 4
BT_BUF_ACL_RX_SIZE | BT_RX_BUF_LEN - 4
BT_BUF_EVT_RX_SIZE | BT_RX_BUF_LEN - 2
BT_BUF_CMD_TX_SIZE | BT_RX_BUF_LEN - 3
BT_BUF_CMD_TX_COUNT | BT_HCI_CMD_COUNT
BT_BUF_EVT_RX_COUNT | BT_RX_BUF_COUNT
BT_BUF_ACL_RX_COUNT | BT_RX_BUF_COUNT
BT_BUF_ACL_RX_COUNT | BT_ACL_RX_COUNT
BT_BUF_EVT_DISCARDABLE_SIZE | BT_DISCARDABLE_BUF_SIZE - 2
BT_BUF_EVT_DISCARDABLE_COUNT | BT_DISCARDABLE_BUF_COUNT
Controller-build
BT_BUF_ACL_TX_SIZE | BT_CTLR_TX_BUFFERS_SIZE
BT_BUF_ACL_TX_COUNT | BT_CTLR_TX_BUFFER
HCI-bridge
BT_BUF_ACL_TX_SIZE | BT_HCI_ACL_DATA_SIZE
BT_BUF_ACL_TX_COUNT | 6
Fixed invalid configurations setting either BT_L2CAP_RX_MTU or
BT_CTLR_DATA_LENGTH_MAX larger than BT_RX_BUF_LEN could lead to buffer
overruns.
Fix advertising report max data length calculation.
This always used the BT_DISCARDABLE_BUF_SIZE macro but this feature
can be turned off and advertising reports will be allocated from the RX
buffer in that case. Also controller-build does not have this buffer
(in hci_raw.c). Also the wrong HCI header was used in the calculation,
HCI event header should have been used instead of HCI ACL header.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Set the L2CAP TX MTU default to fit the public key packet in a single
L2CAP fragment. This matches the configuration for RX buffer lengths
being set with this configuration.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Remove discardable buffer dependency on the specific implementations
except for HCI raw.
All of the in-tree Host-side HCI drivers have implemented discardable
buffer behavior.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Add macros for calculating buffer sizes, accounting for the various
L2CAP and HCI headers needed as well as the reserved bytes needed.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit implements the missing OpenThread APIs related to CSL
receiver configuration.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
Added radio interface to save and restore radio ready
timestamp. This will be saved between ISO Subevents and
used in done event for anchor point synchronization and
drift compensation.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
A badly written sector close ate that has correct crc8 could allow
jumps outside the assigned flash area. This behavior is fixed.
A possibility existed that a badly erased sector or a incomplete write
of a large item created a empty closed sector. This has been fixed by:
a. Erase verification.
b. Clearing such a sector at startup.
Fixes#34382
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Co-Authered-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
Update shell L2CAP to use the new delayable work API for the delayed
received confirmation response.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update GATT to use the new delayable work API for the delayed
calculation of the database hash and the service changed indication.
When the database hash characteristic is read the hash work needs to be
canceled if in progress and if currently executing wait for it to
complete so that the threads don't both write to the stored value.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update the connections to use the new delayable work API for the
deferred work host timer.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update AVDTP to use the new delayable work API for the send host timer.
The AVDTP protocol is incomplete, there is no cancelation of the timer
but it is also never started, as there is no users of the internal
functions, and no public functions exists.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update the implementation of controller based privacy to use the new
delayable work API for the RPA timer. Always use schedule for the
timer since RPAs should not be used more than the configured RPA
timeout.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update RFCOMM to use the new delayable work API for the RTX host timer
used for disconnecting and idling.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Refactor the SMP channel context to in order to simplify the memset of
the struct in smp_init. This makes the code easier to read, and easier
to add more structs that should not be reset by memset.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Update the RPA timer to the new delayable work API.
Checking for submitted RPA timer no longer needed with the schedule
function, which does not change the deadline.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Use `pm_device_*` prefix for the device runtime PM API. This adds the
API to the `pm` namespace, making it clear part of the PM subsystem.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
- Move PM related APIs to `include/pm` so that it follows API `pm_`
prefix namespace. In order to make transition easier
`include/power/power.h` is kept pointing to `include/pm/pm.h`.
- Move most of device PM related content from `include/device.h` to
`include/pm/device.h` and `include/pm/runtime.h`.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add extra check for the LwM2M client state, to allow triggering of the
Registration Update message only when registered.
This fixes an issue, when the `trigger_update` flag could be set during
the bootstrap procedure (when the value of the Lifetime resource was
set), which resulted in an uneccessary Registration Update message just
after the successful registration.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit implements the OpenThread APIs to configure a radio
reception slot at a specific time. This is needed for the correct
functioning of a CSL receiver.
Signed-off-by: Eduardo Montoya <eduardo.montoya@nordicsemi.no>
Remove the config BOOT_TIME_MEASUREMENT and corresponding #ifdef'd code
throughout (kernel/init.c, idle.c, core/common.S , reset.S, ... ) which
hold the extern hooks for z_timestamp_main and z_timestamp_idle in the
removed boot_time test suite.
Signed-off-by: Jennifer Williams <jennifer.m.williams@intel.com>
`write_stats` functionality implementation is guarded by
`BT_GATT_CLIENT`, but is also called from commands defined when
`BT_GATT_DYNAMIC_DB` is set. This means that now application will not
build with `BT_SHELL` used, when we set `BT_GATT_DYNAMIC_CB` solely.
Move this functionality to top of the file without guarding
ifdefs, so it can be used in all gatt shell commands.
Signed-off-by: Marek Metelski <marek.metelski01@gmail.com>
There is a choice to log btmon logs over UART or RTT.
You can choose number of RTT buffer, set its name and size.
Replaced CONFIG_BT_DEBUG_MONITOR with CONFIG_BT_DEBUG_MONITOR_UART
for UART usage and CONFIG_BT_DEBUG_MONITOR_RTT for RTT.
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>