The shift is an old leftover from when the BAP API was
different and BIT(1) means BIS Index 1, but now BIT(0)
means BIT Index 1.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Enable the CAP Commander role for the BT tester. This will
help pass some TMAP and GMAP tests that require the CAP
Commander to be enabled.
The actual implementation of the tests related to the
CAP commander is not implemented.
TMAP also requires that handover is supported if we
support both unicast and broadcast, so enable the config
for now. Support for the handover tests will follow in
a separate commit.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In current implementation, the useless for loop is called in function
`_wait_for_shell_response()` if the target message has been found. It
causes the case will consume too much time.
Exit the useless for loop to reduce the time consumption when the
target message is found.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
In current implementation, the useless for loop is called in function
`_wait_for_shell_response()` if the target message has been found. It
causes the case will consume too much time.
Exit the useless for loop to reduce the time consumption when the
target message is found.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Sometimes, the command `rfcomm_s send 9 1` will fail to execute due
to the DLC has not been established.
Check the DLC connected event before sending shell command
`rfcomm_s send 9 1`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Many dts/dtsi files where its dt-bindings are in-tree
do not include zephyr prefix in the #include path.
Add it to make it consistent globally.
Some dt-bindings that resides in hal can not be changed.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Match number of supported periodic advertising instances with
configure extended advertising instances and increase number
of advertising buffers to match qualification tests requirements.
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists,
and cleans up the code.
Since the kernel is actually running, we also need to support
that e.g. k_work items are actually scheduled, and that we have
to wait for them to finish. test_drain_syswq has been implemented
as a way to drain the system workqueue before we check for
callbacks or perform subsequent actions.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists,
and moves the mock bap_broadcast_source.c file to the
correct location.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- When we are a peripheral we want to be able to start a stream
from the stream_connected_cb, given that we are in an enabling state
and the stream is in the sink direction
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>
wid 145 requests handle of a UUID of a long characteristic. wid 167
requests to remove the characteristic by handle requested in wid 145.
2 new commands are added to support these wids:
- BTP_GATT_GET_HANDLE_FROM_UUID to request handle of a certain UUID
- BTP_GATT_REMOVE_HANDLE_FROM_DB to remove attribute by handle.
Signed-off-by: alperen sener <alperen.sener@nordicsemi.no>
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Rename generic FEM binding to use 'radio-' prefix for consistency with
other radio bindings (radio.yaml, ble-radio.yaml).
Updated 3 board files, Nordic BLE controller HAL, documentation, and
test overlays. Added missing settle-time properties to pan1783a board.
Signed-off-by: Ivan Pankratov <ivan.pankratov@silabs.com>
Some of the CAP initiator unit tests did not delete the group
after creation, even if they easily could.
Especially for test_initiator_unicast_group_add_streams it was
a problem, as the stream added was stack allocated, and by the
end of the test it was deallocated, causing issues when the
group was finally deleted in
cap_initiator_test_unicast_group_after.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the unit tests to use the native_sim board instead of the
unit_testing board.
The native_sim board allows us to use the kernel in a more
regular way, while still being able to treat the tests as
unittest.
To support mocking we cannot rely on the default
Kconfig options and values. The required Kconfig options
to satisfy dependencies are overridden in the Kconfig
file and the necessary Kconfig files are sourced.
We cannot enable e.g. CONFIG_BT as that would attempt
to pull in a lot of files we do not want in this test.
This commit also removes unused includes in the CMakelists
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for connecting the CIS in QoS state.
To support this some checks were added to check the CIS
state while entering the enabling state, as well as the
ASE state when the CIS was connected to determine when to
send the ASE start opcode.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
If the option BTP_L2CAP_CONNECT_V2_OPT_HOLD_CREDIT or
BTP_L2CAP_LISTEN_V2_OPT_HOLD_CREDIT is set, set the local flag
`hold_credit`. When the data received, holds the buffer and returns
the error code `-EINPROGRESS`.
The held buffers will be released if the L2CAP channel disconnect
callback is triggered. Or only of the held buffers will be released
if the L2CAP BTP command `credits` is received.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
If `CONFIG_BT_CLASSIC` and `CONFIG_BT_L2CAP_MAX_WINDOW_SIZE` are
defined, set the TX data buffer count to
CONFIG_BT_L2CAP_MAX_WINDOW_SIZE. Or, set the TX data buffer count to
CHANNELS.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new BTP L2CAP command BTP_L2CAP_LISTEN_V2 to extend the L2CAP
server feature.
Compared with BTP command `listen`, two fields are added, including
`mode` and `options`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add a new BTP L2CAP command BTP_L2CAP_CONNECT_V2 to set extend the
L2CAP connect request.
Compared with BTP command `connect`, two fields are extended,
including `mode` and `options`.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Register ECHO callbacks in function `tester_init_l2cap()`.
Unregister ECHO callbacks in function `tester_unregister_l2cap()`.
Send ECHO response if ECHO request is received.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add the function `br_alloc_buf_cb()` to allocate receiving buffer for
BR L2CAP channel.
Add the function `br_recv_cb()` to report the received BR L2CAP
channel data.
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Configure the following configurations to support the L2CAP
retransmission and flow-control mode.
CONFIG_BT_L2CAP_RET=y
CONFIG_BT_L2CAP_FC=y
CONFIG_BT_L2CAP_ENH_RET=y
CONFIG_BT_L2CAP_STREAM=y
CONFIG_BT_L2CAP_FCS=y
CONFIG_BT_L2CAP_EXT_WIN_SIZE=y
CONFIG_BT_L2CAP_MAX_WINDOW_SIZE=5
Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
Add checks for the values in btp_ascs_preconfigure_qos
to determine if they are valid. If they are invalid
we reject the command.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Commit fixes the model rx handler.
Model can receive maximum access payload.
Test should be able fit maximum access payload and
its own header for serial communication.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
As per the Zephyr coding guidelines, functions declarations
in header files should not be conditionally compiled.
This fixes an issue with tester_gap_clear_adv_instance
where btp_gap.c always expect it to be available.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Since Shorter Connection Intervals changes the unit that connection
intervals can be represented in. It is necessary to change how
they are stored and represented.
This commit deprecates interval in favour of interval_us.
Remove use of interval in internal bt_conn struct since it is no longer
needed.
Signed-off-by: Timothy Keys <timothy.keys@nordicsemi.no>
This commit removes data signing related ICS.
Removed ICS:
- SM 6/1: Signing Algorithm Generation
- SM 6/2: Signing Algorithm Resolving
- GATT 3/13: Signed Write Without Response
- GATT 9/10: Signed Write Command
- GATT 7/3: LE Security mode 2
- GAP 25/2: LE Security mode 2
- GAP 35/2: LE Security mode 2
- GAP 25/5: Connection data signing procedure
- GAP 35/5: Connection data signing procedure
- GAP 25/6: Authenticate signed data procedure
- GAP 35/6: Authenticate signed data procedure
- GAP 27b/8: Connection Signature Resolving Key (CSRK)
- GAP 37b/8: Connection Signature Resolving Key (CSRK)
The following tests are not supported any longer:
- GAP/SEC/CSIGN/BI-01-C
- GAP/SEC/CSIGN/BI-02-C
- GAP/SEC/CSIGN/BI-03-C
- GAP/SEC/CSIGN/BI-04-C
- GAP/SEC/CSIGN/BV-01-C
- GAP/SEC/CSIGN/BV-02-C
- GATT/CL/GAW/BV-02-C
- SM/CEN/SIGN/BV-01-C
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Remove duplicated prj.conf file.
prj_6, prj_7, prj_14 are identicall. Since prj_6.conf is unchanged,
keeping it.
prj_8, prj_9, prj_15 are identicall. Since prj_15.conf is
unchanged, keeping it.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
This commit deprecates:
- the `CONFIG_BT_SIGNING` Kconfig option
- `BT_GATT_CHRC_AUTH` property
IOW, this commit deprecates the LE Security mode 2 support.
Explanation:
Erratum ES-26047 introduced in Bluetooth Core Specification v6.2
requires SingCounter to be persistently stored to prevent replay
attacks.
Currently, the Host doesn't store SignCounter, therefore the device is
vulnerable to replay attacks after reboot.
Additionally, the current implementation doesn't assume that SignCounter
of a received message can be incremented by more than one and thus may
not validate correct message.
The Bluetooth Security and Privacy Best Practices Guide recommends to
not using Data signing and recommends to use LE Security mode 1 levels
2, 3 or 4 instead.
The Signed Write Without Response sub-procedure, which is the only user
of Data signing, is optional (see Vol 3, Part G, Table 4.1).
See also ES-18901.
The aforementioned reasons make no sense to keep this feature.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
Commit updates maximum OOB authentication size from 8 bytes
till 32 bytes according to specification errata ES-27446.
Since previous OOB API does not allow to expose OOB values
with such width the new API has been introduced.
The previous API was deprecated and hidden under
BT_MESH_PROV_OOB_API_LEGACY option and left for backward
compatibility with existing code base.
Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
Zephyr automatically sets the persisted flag for VCS if the volume is
changed after the service is registered. As some of these PTS tests
require a set volume with the flag cleared, the initial volume needs to
be set before registering VCS.
Signed-off-by: Frode van der Meeren <frode.vandermeeren@nordicsemi.no>
The ISO buffers defaults to 1, but since there are
risks that the ISO RX events cannot be sent to
the upper tester via UART before the next RX,
the RX is increased. This also allows to better
support cases where the ISO interval is larger than
the SDU interval.
The ISO TX buffers are similarly increase to help
prevent cases where a TX isn't scheduled.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
- Add command for setting the set size
- Add command for setting the SIRK
- Allows the following tests to pass:
- CSIS/SR/CN/BV-01-C
- CSIS/SR/CN/BV-02-C
- CSIS/SR/CN/BV-03-C
- CSIS/SR/CN/BV-04-C
Signed-off-by: Alexander Svensen <alexander.svensen@nordicsemi.no>