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>
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>
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>
Wrong use of function `find_msb_set(~link.rx.seg)`,
uint8_t type is implicitly converted to uint32_t.
As a result, it always returns 32 instead of the
expected value, resulting in abnormal processing
of prov segment.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
The structure pointer was wrongly cleared before,
`bearer` and `role` in `bt_mesh_prov_link` structure
resulting in illegal pointer access.
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
When kr phase to `BT_MESH_KEY_REVOKED`, should also call beacon
authentication, since beacon flag has change(0x01-->0x00).
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
DIS module builts fine when BT_DIS_SETTINGS is selected, but SETTINGS is
not. However no settings handlers are executed, just like with
BT_DIS_SETTINGS disabled, which might confuse user.
Select SETTINGS, so settings handlers are properly selected and executed
in runtime.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
Currently BT_DIS_SETTINGS and BT_SETTINGS are independent in
Kconfig. This seems fine, because BT_SETTINGS pulls a lot of
functionality, which is not really needed to implement DIS with values
configured in runtime (from settings subsystem).
Drop BT_SETTINGS conditional compilation and leave check on
BT_DIS_SETTINGS only.
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
In architectures supporting more than 8 WL entries, e.g. pure
software implementations, it is desirable to be able to increase the
WL size. This change increases the range to 1..16 for SOCs other than
nRF5x and OpenISA.
Signed-off-by: Morten Priess <mtpr@oticon.com>
Fix sanitycheck failures when building
samples/bluetooth/peripheral_hr for rv32m1_vega_ri5cy
platform.
Updates from nRF platform related to 255 byte AD data
support have been directly copied into openisa port to
fix build failures.
Relates to commit c2fc629dd2 ("Bluetooth: controller:
255 byte AD payload support").
Fixes#29967.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Allow vendor specific increase of user operation capacity for
THREAD, to support queuing additional ticker operations.
Relocate TICKER_USER_<XXX>_VENDOR_OPS to before TICKER_USER_<XXX>_OPS.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
Fix regression in connection radio event close in central
role introduced in commit 222dca5598Fixes#29957.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Change adds missing TX power dependencies. nRF52833 and nRF52820 SoCs
also support higher TX power values.
Signed-off-by: Marek Pieta <Marek.Pieta@nordicsemi.no>
Adds support for using the periodic advertiser list.
This list allows the application to rely on specific
devices when creating periodic advertising syncs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Adds support for the periodic advertising sync transfer
(PAST) feature, which allows a synced device, or an
advertiser, to transfer synchronization of a periodic
advertising train to a connected device.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Fix use of deprecated scan parameter filter_dup.
Should have been changed to options as part of:
be57dfbe2a
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
pdu->len is only 8 bits and CONFIG_BT_CTLR_ADV_DATA_LEN_MAX
can be upto 1650 bytes. Fix the implementation to use 16
bit auto variable to check AD data length overflow.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Extended Advertising Data population when there is no
Extended Header to be filled.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
.../ll_sw/nordic/lll/lll_scan.c: In function 'isr_tx':
.../ll_sw/nordic/lll/lll_scan.c:483:19: error: unused variable 'lll'
[-Werror=unused-variable]
483 | struct lll_scan *lll = param;
| ^~~
cc1: all warnings being treated as errors
This fixes https://github.com/zephyrproject-rtos/zephyr/issues/29968.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Since ADV_EXT_IND is received on primary channel, the AR is configured
to resolve AdvA in legacy PDU (assuming on 1M) and it will not resolve
AdvA properly. In such case, we should resolve AdvA manually in LLL.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This allows to synchronously resolve any address using AAR. The AAR
has to be configured prior to calling this function.
The intended use for this function is to resolve AdvA in a PDU on
primary channel when AR was configured for different PDU type. That
means AR was configured to resolve in legacy PDU, but extended PDU
was received and we need to resolve AdvA manually. In such case, AAR
is already configured so just need to trigger it again with proper
ADDRPTR.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This patch allows to configure AR for resolving AdvA in extended adv
PDUs. The extra 'flags' field provides a hint from caller on how to
setup AR:
- if legacy PDU is expected, AdvA is set after PDU header,
- if extended PDU is expected, AdvA is set with +2B offset due to
common extended advertising header,
- if Coded PHY is used, AdvA is set with extra +5b offset due to CI and
TERM1 fields.
Note that AUX_SCAN_REQ and AUX_CONNECT_REQ are also considered legacy
PDUs here since they are exactly the same as SCAN_REQ and CONNECT_IND.
If neither legacy nor extended PDU is specified, it's derived from PHY,
i.e. 1M means legacy, non-1M means extended. Since it is still possible
to receive different type PDU in such case, it's up to LLL to detect
this and resolve AdvA when RX is done.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Instead of guarding the NODE_RX_TYPE_USER cases with
CONFIG_BT_CTLR_USER_EXT we guard them with
CONFIG_BT_CTLR_USER_EVT_RANGE > 0 as that is the actual value that
enables/disables the NODE_RX_TYPE_USER values.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of having explicit values for each entry in the enum that
has to be updated for each new entry (thus requiring manual work
which can also be error-prone), the enum will now be
self-incrementing, to make it easier and safer to add new
entries.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Removed the #ifdef's for the node_rx_type enum. Since the
savings, they just make the enum harder to read.
Furthermore it will also ensure that all the enum values
will have the same value once the enum entries are no
longer manually defined.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
lll->conn is only defined valid when BT_CENTRAL is enabled.
Also ull_sched_mfy_after_mstr_offset_get is only used when BT_CENTRAL
is enabled.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
Adds check for TTL max in the transport send functions, and moves
setting of default TTL to transport.
Fixes#29855.
Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
Change the advertising option that controls if the directed advertiser
will use an RPA or the identity address of the peer for the initiator
address.
This option currently has two issues:
- It behaves differently if the privacy feature has been enabled,
which can be confusing for application to use.
- It cannot start a directed advertiser towards a peer that is not
privacy-enabled and has distributed an IRK.
This commit includes the following changes:
- When privacy has been enabled in order to advertise towards a
privacy-enabled peer the BT_LE_ADV_OPT_DIR_ADDR_RPA option must now
be set (same as when privacy has been disabled).
- It is now possible to start a directed advertiser using the identity
address of the peer when privacy-enabled.
- When privacy has been enabled the advertising option combination
of using the local identity address and an RPA as the initiator
address is now disallowed and will return an error code.
This is done because this combination did not actually work and would
have used the identity address of the peer instead.
- If the controller does not support controller-based privacy then
using the option BT_LE_ADV_OPT_DIR_ADDR_RPA will return ENOTSUP
because this behavior cannot be done with host-based privacy.
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Host can discard scan response data by setting empty data. We simply
set PDU length to 0 to indicate this, it will make future check easier.
Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>