Commit graph

80869 commits

Author SHA1 Message Date
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
Florian Vaussard 2eb7433f5b net: if: do not remove the solicited-node multicast address if used
Two different IPv6 addresses can have the same solicited node multicast
address, for example when they are derived from the same EUI-64
interface identifier during the auto-configuration process. For example,
an interface with a physical address 70:07:12:34:56:78 can have the
following:
- link-local address FE80::7207:12FF:FE34:5678
- global unicast address 2001🔢::7207:12FF:FE34:5678

Both addresses will have the same solicited-node multicast address
FF02::1:FF34:5678. Currently, if one removes the global unicast address,
the solicited-node multicast address is also removed, leaving the
link-local address out of the solicited-node multicast group. This
breaks some protocols like Neighbour Discovery.

Count how many times the solicited-node multicast address is used and
remove it only if it is not shared by any other unicast address.

Fixes #59683

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-06-28 06:51:21 +00:00
Florian Vaussard 56e0d8eef3 net: if: split the search loop of net_if_ipv6_addr_rm()
First search for a match, then perform the removal outside the loop.
There is no functional change but this prepares for some future changes.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-06-28 06:51:21 +00:00
Florian Vaussard 59880738f5 net: if: prepare net_if_ipv6_addr_rm() for future changes
Move the creation of the multicast solicited node address outside the
loop. There is no functional change but it prepares for some future
changes.

Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
2023-06-28 06:51:21 +00:00
Serhiy Katsyuba 431108d89e intel_adsp: ace: Restore IDC interrupt on D3 exit
After exiting D3 state if IMR context save is enabled, IDC interrupt
must be re-enabled again for all cores.

Signed-off-by: Serhiy Katsyuba <serhiy.katsyuba@intel.com>
2023-06-28 06:50:27 +00:00
Tommi Kangas f124c0d06a net: lib: coap: Use zsock_ functions
Use Zephyr internal zsock_ calls to remove dependency
to NET_SOCKETS_POSIX_NAMES.

Signed-off-by: Tommi Kangas <tommi.kangas@nordicsemi.no>
2023-06-28 06:49:59 +00:00
cyliang tw 51d57f612d drivers: pinctrl: add pin group for NuMaker pinctrl
Update Nuvoton numaker series pinctrl, let support pin group.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-06-28 06:49:38 +00:00
Lang Xie db8881dd97 tests: bluetooth: tester: Reduce nrf53 BT_BUF_ACL_RX_SIZE
PTS l2cap tests need BT_BUF_ACL_RX_SIZE to be 100.

Signed-off-by: Lang Xie <Lang.Xie@nordicsemi.no>
Signed-off-by: Magdalena Kasenberg <magdalena.kasenberg@codecoup.pl>
2023-06-28 06:49:07 +00:00
Aleksandr Khromykh 4d4886c056 Bluetooth: Mesh: remove unnecessary mbedtls options from mesh
Unnecessary mbedtls config option has been removed from
ble mesh KConfig.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2023-06-28 06:48:52 +00:00
Emil Gydesen a46fb81449 Bluetooth: BAP: Shell: Set default_stream on configured
Instead of setting the default_stream when we initiate
the configure operatio, we set it when it has succeded.

In case that the codec configure fails, the stream should
not really be considered configured as the default.

This also ensures that the default_stream is set when
using the CAP shell commands.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-28 06:48:32 +00:00
Matthias Breithaupt 04ce5b9e58 mgmt: hawkbit: remove NET_SOCKETS_POSIX_NAMES dependency
Currently, it is not possible to use hawkbit with code that requires
POSIX_API to be set due to the dependency on NET_SOCKETS_POSIX_NAMES.
Since a lot of other code has already been moved to `zsock_`, this
commit does the same for hawkbit.

Co-authored-by: rojedag <r.ojeda@vogl-electronic.com>
Signed-off-by: Matthias Breithaupt <m.breithaupt@vogl-electronic.com>
2023-06-28 06:32:45 +00:00
Marc Desvaux abc5f4cad2 tests: drivers: i2c: i2c_target_api add nucleo_f746zg
Adds necessary overlay nucleo_f746zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:43 +00:00
Marc Desvaux e86fc5fb75 boards: arm: nucleo_f746zg: add i2c2
Adds i2c2 on nucleo_f746zg to use the i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:43 +00:00
Marc Desvaux bcc737dc2c tests: drivers: i2c: i2c_target_api add nucleo_f746zg
Adds nucleo_f746zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:43 +00:00
Marc Desvaux c96b78663c tests: drivers: i2c: i2c_target_api add nucleo_l073rg
Adds necessary overlay nucleo_l073rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:16 +00:00
Marc Desvaux 4cc7a841ca boards: arm: nucleo_l073rg: add i2c2
Adds i2c2 on nucleo_l073rg to use the i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:16 +00:00
Marc Desvaux 74d0ea0eb6 tests: drivers: i2c: i2c_target_api add nucleo_l073rg
Adds nucleo_l073rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:16 +00:00
Seppo Takalo 6050a10f8b net: lwm2m: Allow setting string to zero length
Lwm2m firmware object have defined a write of zero length
string as a cancel operation.
So allow lwm2m_set_opaque(path, NULL, 0);

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2023-06-27 12:18:35 +00:00
Fabio Baltieri a7d1110242 MAINTAINERS: cleanup the ITE Platform maintainer entry
Drop the collabors entries that were already in maintainers (no need for
the dup), change the board expression so that it matches both ITE boards
currently in the repo.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-27 12:18:07 +00:00
Mariusz Skamra b3259e5bf5 Bluetooth: ascs: Fix possible ASE stuck in releasing state
It may happen that CIS is scheduled in the future and did not started
yet once accepted. When ASE goes to Releasing state in such case
the ISO has to be disconnected, because otherwise ASE will stuck in
releasing state.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-06-27 12:17:56 +00:00
Emil Gydesen 379ee55ee0 Bluetooth: BAP: Shell: Move audio_send_work above clear_lc3_sine_data
Since clear_lc3_sine_data references audio_send_work, it must
be declared before the clear_lc3_sine_data function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:17:47 +00:00
Chaitanya Tata a71bff7f49 net: wifi: Fix power save timeout data type
This should be an unsigned integer. Also, add a comment to explain this
feature.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-06-27 12:17:26 +00:00
Fabio Baltieri 3681268662 tests: build_all: input: add an entry for xpt2046
Build the xpt2046 driver with the input build_all. Fix a typo while at
it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-27 12:17:06 +00:00
Fabio Baltieri 9065c2d156 input: convert xpt2046 from kscan
Convert the XPT2046 driver to the input subsystem, change the api,
remove the callback and enable logic.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-06-27 12:17:06 +00:00
Emil Gydesen 82e5eba817 Bluetooth: BAP: Fix bt_bap_scan_delegator_find_state
The bt_bap_scan_delegator_find_state did not properly return the
correct receive state due to confusing return value of the
iterator function.

Modify it to use a simple bool.

This fixes all issues with "Failed to find receive state for sink"
when using the Broadcast Sink.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:16:50 +00:00
Emil Gydesen 2b74450544 Bluetooth: CSIP: Update CSIP duplicate rank search
In the CSIP Set Coordinator verify_members we verify that
all members have unique ranks.

This was done as part of the initial loop, but it is
more efficient to do this as a separate loop as we can reduce
the number of items to compare, as well as guarding this properly
by !zero_rank.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:16:12 +00:00
Emil Gydesen adabb00914 Bluetooth: Audio: Shell: Update audio.conf to more sane values
Some values have been reduced and some have been increased to
better follow the audio configurations in BAP and support
more incoming data.

Also removes HRS as that is not used by LE Audio.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:15:54 +00:00
Emil Gydesen ac8dc34911 Bluetooth: CAP: Shell: Fix type in cmd_cap_initiator_unicast_stop
"starteds" should be "started".

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:15:36 +00:00
Emil Gydesen feaae8b104 Bluetooth: BAP: Shell: Only register scan delegator callbacks once
If the callbacks are registered more than once, the linked list
causes an infinite loop.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:15:19 +00:00
Emil Gydesen 2901e7cd59 Bluetooth: BAP: Shell: Fix assistant broadcast code
Fixes 2 issues:
1) The broadcast code would only ever get the first value, even if
the command specified up to 16 values.
2) The broadcast code is not just hex values, so hex2bin does not make
sense, and strlen + memcpy is much simpler.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:15:01 +00:00
Emil Gydesen addc8a538a Bluetooth: BAP: Shell: Stop scan on broadcast found
When the broadcast assistant have found the expected broadcast
source it should stop scanning.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-06-27 12:14:34 +00:00