Commit graph

80899 commits

Author SHA1 Message Date
Mariusz Skamra db5767e50f Bluetooth: audio: Accept empty CCID list in audio metadata
The CCID list can be empty, as the Assigned Numbers is not strict
regarding it's minimum length.

Fixes: #59666
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:58 +02:00
Emil Gydesen a32ba627ce Bluetooth: BAP: Shell: Improve printing of the BASE
Add offsets for each layer in the BASE and add printing
of the presentation delay.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-29 21:06:46 +02:00
Mariusz Skamra 7b94d57b32 Bluetooth: unicast_client: Drop ISO PDUs if ASE is not in streaming state
This fixes missing drop of ISO Data PDUs received in non-streaming state.
The client shall indicate first it's readiness to receive the ISO Data.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:31 +02:00
Mariusz Skamra 91ad386cb5 tests: Bluetooth: ascs: Add ISO Data PDU recv tests
This adds tests for receiving ISO Data PDU.
* test_recv_in_streaming_state - test whether received ISO Data PDU is
  sent to upper layers.
* test_recv_in_enabling_state - test whether received ISO Data PDu is
  dropped because upper layer is not ready to receive the data yet.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:31 +02:00
Mariusz Skamra 9694e85614 Bluetooth: ascs: Drop ISO PDUs if ASE is not in streaming state
This fixes missing drop of ISO Data PDUs received in non-streaming state.
The server shall indicate first it's readiness to receive the ISO Data
by calling bt_bap_stream_start that triggers state transition from
Enabling to Streaming state.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-29 21:06:31 +02:00
Emil Gydesen f4550dbda8 Bluetooth: TBS: Guard check for MAX_TBS_INSTANCES
Add check for CONFIG_BT_TBS_CLIENT_MAX_TBS_INSTANCES > 1 before
comparing inst_cnt, as otherwise it was always false which
caused a coverity issue.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-29 21:06:14 +02:00
Daniel DeGrasse 90e3650acf samples: ipc: enable openamp sample for RT1170 EVKB
Enable openamp sample for RT1170 EVKB.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse d5329d1391 boards: arm: mixmrt1170_evkb: enable display support
Enable display support for RT1170 EVKB, using display sample with
RK055HDMIPI4M display.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse 2ef5eb9772 boards: arm: mimxrt1170_evkb: add support for SPI
Add support for SPI on RT1170 EVKB, verified using SPI loopback sample.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse 903cfc8f15 boards: arm : mimxrt1170_evkb: add support for I2C
Add support for I2C on RT1170 EVKB, verified using I2C target API test.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse 968ba5190d boards: arm: mimxrt1170_evkb: add support for DMA test
Enable DMA test for RT1170 EVKB

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse 74ffb99a72 boards: arm: mixmrt1170_evkb: add support for ADC
Add support for ADC sample and API test on RT1170 EVKB.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Daniel DeGrasse 11bc9b8dca boards: arm: mimxrt1170_evkb: add RT1170 EVKB
Add RT1170 EVKB definition to Zephyr. This board is similar to the
RT1170 EVK, but uses a different quadspi flash chip, and includes
an audio connector as well as an additional display connection.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Ajay Parida f1ebbb6c1f doc: release-notes: add passive scan support release notes
Added Wi-Fi passive scan support related info.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2023-06-29 21:05:41 +02:00
Ajay Parida 69fead1998 net: mgmt: Support for forced Passive scan
Default scan mode is Active. User can force the scan mode to passive
through Kconfig option or using 'passive' option from shell.
Using either of this option will override regulatory settings and
forces all scan channels to be passive only.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2023-06-29 21:05:41 +02:00
Emil Gydesen c627164d28 Bluetooth: CSIP: Shell: Fix discover_members
The cmd_csip_set_coordinator_discover_members did not properly
handle the members_found and addr_found values.

It has been modified to run through all known values
before scanning, and set the value appropriately.

This also fixes a minor bug where err = 0 was missing.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-29 21:05:02 +02:00
Pavel Vasilyev 5572a27468 docs: bluetooth: mesh: Add note about storing runtime configuration
All public API declared in cfg.h won't schedule storing of the change
persistently if BT_MESH_VALID flag is not set. The flag is set after the
node is provisioned.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-06-29 21:04:55 +02:00
Al Semjonovs 2a31c4c530 sensors: icm42688 async API
Implementation of the async API for the icm42688

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
2023-06-29 21:04:33 +02:00
Markus Fuchs 8757c71bd0 json: Fix 64-bit support
This patch fixes encoding arrays of objects on 64-bit targets.

Fixes #36696

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-06-29 21:03:48 +02:00
Markus Fuchs b311c533bf tests: lib: json: Add test for array of objects
Add tests for encoding and decoding nested arrays of objects located
inside a parent object at a non-zero offset.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-06-29 21:03:48 +02:00
Markus Fuchs 7a7a78bd92 tests: lib: json: Add tests for handling two-dimensional arrays
Add tests for encoding and decoding two-dimensional arrays as described by
the JSON_OBJ_DESCR_ARRAY_ARRAY() macro.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-06-29 21:03:48 +02:00
Markus Fuchs 56234aee5d tests: lib: json: Fix and enhance test for array of arrays
Fix encoded JSON string in test_json_decoding_array_array() test so it
matches the described array object and add a test case for encoding
arrays of arrays.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-06-29 21:03:48 +02:00
Markus Fuchs 2304331807 tests: lib: json: Switch non-ascii text to octal escape sequences
Switch the non-ascii text in the tests to use octal escape sequences
to avoid potential compiler issues on platforms not defaulting to
utf-8 text encodings.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-06-29 21:03:48 +02:00
Markus Fuchs ae6aa6165c json: Fix multidimensional array support
This patch fixes support for encoding and decoding multidimensional arrays
as described by the JSON_OBJ_DESCR_ARRAY_ARRAY() macro.

Currently, the JSON array encoding and decoding functions, arr_encode()
and arr_parse(), expect array elements to be of object or primitive type.
However, arrays may be nested and so an array's elements may also be
arrays.

In order to support nested arrays, two special cases must be considered:

1. The array of objects/arrays sub-descriptor is described by two
`json_obj_descr` structs and so two instead of one `json_obj_descr`
structs must be skipped when iterating over the JSON descriptor to get to
an array's elements.
2. The implicit array item count field has to be considered for the
parent itself and all its child array items when calculating an element's
size.

Fixes #50801

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-06-29 21:03:48 +02:00
Vinayak Kariappa Chettimada 96c076b9c1 Bluetooth: Controller: Add LL_ASSERT_OVERHEAD define
Add LL_ASSERT_OVERHEAD define to reuse the assertion check
related to increase in actual EVENT_OVERHEAD_START_US value.

Introduce Kconfig option to permit radio event be skipped
when increased prepare callback latencies are measured,
instead of assertion.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:16:47 +02:00
Vinayak Kariappa Chettimada 5aae5d2583 Bluetooth: Controller: Fix Connected ISO for aborted prepare
Fix Connected ISO implementation to correctly handle SN,
NESN and payload_count when prepare callback is aborted due
to CPU overhead related latencies.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:16:47 +02:00
Vinayak Kariappa Chettimada ae679bc9ff Bluetooth: Controller: Move EVENT_OVERHEAD_START_US verbose assertion
Move the EVENT_OVERHEAD_START_US verbose assertion to each
state/role LLL implementation so that correct state/role
that is delayed is conveyed in the assertion message.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:16:47 +02:00
Vinayak Kariappa Chettimada 3c34163908 Bluetooth: Controller: Add -ECANCELED on return from lll_preempt_calc
Add -ECANCELED on return from lll_preempt_calc so that
assert check can be placed in the prepare callbacks of the
state/role implementations.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:16:47 +02:00
Vinayak Kariappa Chettimada ac8499550d Bluetooth: Controller: Fix use of pre-programmed PPI
Fix to not use pre-programmed PPI when NRF_TIMER0 is not
used as the radio event timer.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:15:48 +02:00
Vinayak Kariappa Chettimada cfcbe5d68e Bluetooth: Controller: Remove redudant header file includes
Remove redundant header file includes, introduce radio used
resources header file.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:15:48 +02:00
Vinayak Kariappa Chettimada 019f88ec21 Bluetooth: Controller: Fix CIS failed to be established
Fix CIS create implementation to consider CIG events with
laziness before the new CIS in an already active CIG is
made active.

Previous laziness value of the CIG events is determined and
at the CIG event where the new CIS event_count is calculated
the lazy_active value determined is decremented from the
total lazy value.

Without this fix, event_count of the new active CIS events
where incorrect, causing CIS create resulting in fail to be
established.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:15:27 +02:00
Vinayak Kariappa Chettimada 6da521c9b6 Bluetooth: Controller: Fix offset_min_us be >= PDU_CIS_OFFSET_MIN_US
Fix calculation that ensured cis_offset_min_us being >=
PDU_CIS_OFFSET_MIN_US.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 17:15:27 +02:00
Kevin Wang 5876cc53d4 tests: drivers: watchdog: wdt_basic_api:
1. Add atcwdt200 options for WDT_NODE in testcase.
2. Add the board overlay file in wdt sample to specify
   the watchdog0 alias

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-06-29 10:13:05 +00:00
Kevin Wang a9955d3e17 drivers: watchdog: Add Andestech ATCWDT200 driver.
Support the Andes atcwdt200 watchdog driver.

Signed-off-by: Kevin Wang <kevinwang821020@google.com>
2023-06-29 10:13:05 +00:00
Vinayak Kariappa Chettimada bd9cee0a9f Bluetooth: Controller: Inherit BT_ISO_TX_MTU value
Inherit BT_ISO_TX_MTU value for BT_CTLR_ISO_TX_BUFFER_SIZE.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Vinayak Kariappa Chettimada 87d65dc502 samples: Bluetooth: hci_rpmsg/uart: Fix BT_CTLR_ISO_TX_BUFFER_SIZE
Restore back BT_CTLR_ISO_TX_BUFFER_SIZE to 251 after fix in
commit e460847b60 ("Bluetooth: host: don't fragment ISO
if len <= MTU").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Vinayak Kariappa Chettimada 6abef01108 samples: Bluetooth: hci_rpmsg: Fix Rx Prio thread stack usage
Fix Rx Prio thread stack usage value to Kconfig default
value. After long duration use of hci_rpmsg in audio
application, remaining stack was 80 bytes, hence increase
back to 448 as set in the Kconfig defaults.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2023-06-29 10:06:19 +00:00
Pavel Vasilyev 4256472fbf Bluetooth: Mesh: Reduce BT_L2CAP_TX_MTU for mesh to 33
Since the acl mtu for mesh is reduced to 37 in PR #59004, there is no
need in BT_L2CAP_TX_MTU to be longer than 33 bytes for mesh.

Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
2023-06-29 10:05:03 +00:00
Théo Battrel cd264b21e4 Bluetooth: Host: Abort pairing if disconnected
If disconnection has been triggered in between the security update and
the call to `smp_pairing_complete` we need to abort the pairing.

The disconnection may have been triggered by `bt_unpair`, in that case
the keys will have been erased and it will lead to an assertion to
continue as if nothing happened.

To resolve this issue, at the beginning of `smp_pairing_complete` the
`status` is set to `BT_SMP_ERR_UNSPECIFIED` if there is no connection.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2023-06-29 10:04:41 +00:00
Jarno Lämsä 7ae4e24728 net: lib: lwm2m: Use int16_t for signal strength
The signal strength for the connectivity monitor was
defined as int8_t, however this was too small for
LTE RSRP values, which has range [-140,-44].

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2023-06-29 10:04:14 +00:00
Evgeniy Paltsev c75bf5ebc5 ARC: MWDT: cleanup search path handling
Cleanup ARC MWDT search path handling:
 * Don't print warning if ARCMWDT_TOOLCHAIN_PATH is missing but
   METAWARE_ROOT is set. Treat it as valid case and do message
   with status level instead of warning.
 * Make rest of the error messages more understandable for users.

Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
2023-06-29 10:03:35 +00:00
Theo Gasteiger b9d46b5483 Bluetooth: Audio: Encrypted BISes cause MPU FAULT
When enabling BIS encryption, a MPU fault will occur.

Signed-off-by: Theo Gasteiger <gatcode@wdw.one>
2023-06-29 10:01:16 +00:00
Sjors Hettinga 2f5068fcda MAINTAINERS: Add self as network collaborator
Add myself as collaborator for the networking subsystem.

Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
2023-06-28 15:29:00 +02:00
Francois Ramu fc945035d2 samples: drivers: auxdisplay requires a fixture to run on a platform
Add a config "fixture_auxdisplay" to make the samples/drivers/auxdisplay
runnable on a platform, else the application is useless
This fixture will differ from the existing "fixture_display"

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-06-28 15:20:00 +02:00
Jarno Lämsä a3612c70c8 tests: Ztest tests for coap client
Test handling multiple requests.

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2023-06-28 15:19:34 +02:00
Jarno Lämsä 419fa3ca6a net: lib: coap: CoAP client, multiple request handling
Use only single thread for handling polling of the sockets.
Each client will have only 1 active socket which to poll.
Each client can have multiple simultaneous requests ongoing.
The client only has one buffer for receiving and one buffer for sending.
Therefore the messages are reformed when resending.

Signed-off-by: Jarno Lämsä <jarno.lamsa@nordicsemi.no>
2023-06-28 15:19:34 +02:00
Keith Packard bbec614b78 cmake/linker_script: Fix cmake linker scripts to define _end
The generated scripts don't include a definition for any symbol indicating
the end of statically allocated memory (such as "_end"). Add a shared cmake
fragment, ram-end.cmake, which contains the necessary instructions to
define _end and z_mapped_end consistently to align with the other sample
linker scripts.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-28 08:41:02 +00:00
Keith Packard 710422ec5e include/zephyr: Fix linker scripts to define _end after all static RAM data
The Zephyr linker scripts have inconsistent ordering of various chunks of
data which lands in RAM at runtime. This leads to the value of _end not
being consistently defined as the maximum address of static variables used
in the application.

Create a helper linker fragment, zephyr/linker/ram-end.ld, which can be
included after the last possible definition of RAM data, that consistently
sets _image_ram_end, _end and z_mapped_end.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-06-28 08:41:02 +00:00
Florian Vaussard 90355f143f tests: net: iface: verify multicast address not removed if used
If two IPv6 addresses have the same solicited-node multicast address
because they derive from the same EUI-64 interface identifier, make sure
that the solicited-node multicast address is not removed when one of the
IPV6 address is removed but only when both addresses are removed.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-06-28 06:51:21 +00:00
Florian Vaussard 6837229ff2 tests: net: iface: remove useless assignment
The value of in6addr_mcast is overwritten in iface_setup() before being
assigned to the interface. Remove the useless initial value since it is
never used, in order to avoid misleading information.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-06-28 06:51:21 +00:00