Split out the HCI drivers from the main Bluetooth sections.
The contributors to those are usually silicon vendors.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
If bootstrap fails, RD client will call lwm2m_engine_stop()
which will close the context.
The socket loop, however still contains a call to
hint_socket_state(context, NULL) which has a null pointer now.
Fix the segfault by allowing nullpointer on hint_socket_state().
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
"engine" directory contained tests for observation
so rename it.
There is separate "lwm2m_engine" directory that contains
tests for the engine itself.
Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
Update the mention of the "currently integrated" version of TFM to match
the latest upgrade.
Signed-off-by: Markus Swarowsky <markus.swarowsky@nordicsemi.no>
Fix assertion due to LLL scheduling of auxiliary PDU
reception was not considered in the ULL when checking for
accumulated data length exceeding the supported maximum scan
data length. This caused the auxiliary context to be release
while LLL was still active with scheduled PDU reception.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When using direct isrs, a vector table is needed. However, if none is
present , i.e. `CONFIG_GEN_IRQ_VECTOR_TABLE=n`, this script failed. The
given error message was not helpful (`'NoneType' has no len()`).
This change makes it clearer, where to look for the problem.
Signed-off-by: Greter Raffael <rgreter@baumer.com>
Fixes a compilation error in quectel_lcx6g driver when CONFIG_PM_DEVICE=y.
Corrects the function call in quectel_lcx6g_suspend from
'modem_chat_run_script_run' to 'modem_chat_run_script'.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
BAP would always set up the ISO data path in both directions,
even for unidirectional CIS. This meant that in the
unconfigured direction, the data path configuration data
would all be 0, which causes issues on some controllers.
The new refactored approach implemented by this commit
will always ensure that the data path is setup correctly,
and that we only set the data path in one direction for
unidirectional CIS. The unset path will use the default
ISO path of HCI and transparant format, which should always
be allowed by a controller.
This is building on the requirement in BAP that all streams in
a unicast group shall be QoS configured at the same time. This
ensures that before any streams in the CIG has been connected,
they have all been configured.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a note about the removal of the optional can_get_max_bitrate_t callback
from the CAN controller driver API.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
Remove the net tag, allowing the modem driver tests to be built
for PRs, and limit the scope of the test suite to only build
for select emulated 32 and 64 bit boards.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The FRDM K64F board runs at 120 MHz and has a 24 bit timer.
According to its timer driver, its MAX_TICKS (which comes into
play for a tickless kernel) is calculated as ...
CYC_PER_TICK = 120 MHz / ticks per second
MAX_TICKS = (COUNTER_MAX / CYC_PER_TICK) - 1
To achieve a minimum value of MAX_TICKS=1, ticks per second must
be set to at least 15. Experimentation has shown that setting the
number of ticks per second below this threshhold on a tickless
kerenl leads to unreliable timestamps.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
Feedback from the previous summary line change has been that it
had become more difficult for people to parse and understand what
is being tested/benchmarked when the description consisted of
just using a terse tag. To improve the situation a more human
oriented description has been added to follow that tag so that
not only can tools still parse on the tag, but people can use
both tag and the extra description to understand the test/benchmark.
Summary lines for each test now consist of the following:
1. A terse tag (for tools to parse)
2. A more human oriented description.
3. Number of cycles.
4. Number of nanoseconds.
Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
When the central aborts the CIS setup during the CIS Creation
procedure after it has accepted the CIS request, the peripheral
will receive the HCI LE CIS Established event with an error code.
It does not receive a disconnection event.
See the message sequence chart in Core_v5.4, Vol 6, Part D,
Section 6.23.
This commit ensures that the perirpheral disconnected callback gets
called for this particular scenario.
Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
Decrease total RAM usage when Wi-Fi is enabled, specially after
`config HEAP_MEM_POOL_ADD_SIZE_BOARD` was added. This allows application
to handle additional HEAP as required.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add callbacks to the stream objects that reflects the
state of the isochronous channel. The connected callback
is called when the isochronous channel is connected, and
similarly the disconnected callback is called when it is
disconnected.
There is a special case for unicast, where if the ACL
disconnects first, then we won't get a ISO disconnect
callback. It should be assumed that the isochronous channel
is no longer valid when the BAP stream enters the idle state,
i.e. when the "released" callback is called.
The purpose of the new callbacks is to provide additional
information to the application. Especially the unicast client
can use this to determine when the stream_start function
can be called again, as there can only ever be 1 outstanding
CIS connection request at a time, but there can be multiple
GATT requests.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The iterable section should be located in ROM and not RAM, this caused
crashes on multiple platforms running socket services.
Fixes#67762
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Nothing critical, but it just looks better if the service name is
separated from the prefix, i.e:
_z_net_socket_service_idx_udp_service_async
vs current:
_z_net_socket_service_idxudp_service_async
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Previously, Zephyr's POSIX API did not differentiate between
deferred and asynchronous pthread cancellation. In fact all
pthread cancellation was asynchronous. According to the spec,
all pthreads should be created with deferred cancellation by
default.
Note: PTHREAD_CANCEL_ASYNCHRONOUS means cancel asynchronously
with respect to cancellation points (but synchronously with
respect to the thread that callse pthread_cancel(), which is
perhaps unintuitive).
The POSIX timer relied on this non-standard convention.
Oddly, this change prevents what would have otherwise been a
regression that would have been caused by fixing pthread
behaviour (in a separate commit).
We are effectively uncovering bugs which were probably always
present in the pthread.c and timer.c implementations going
back quite a few years.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
There is no requirement that says e.g. CLOCK_REALTIME cannot be
used for timer_create(). In fact, the spec explicitly requires
it. It might not be ideal, but users should still be able to
use it.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
The sigevent struct and sigval union members were previously not
ordered in a way that produces optimal alignment / reduces
padding on 64-bit systems.
Reorder members so that pointers come first.
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Change row and col static types to unsigned, this should prevent really
bad things from happening if a negative number ends up there for
whatever reasons without having to explicitly check for < 0.
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Implement TRANSMIT_IDLE event for modem_ppp module. This addition
optimizes the sys workque CPU time when performing a throughput
test from 36% to 5%, while only reducing the throughput by 12%.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Improved the connection reference handling in the BabbleSim test
project in the Bluetooth Host category.
Signed-off-by: Kamil Piszczek <Kamil.Piszczek@nordicsemi.no>
Reduce N_LOOPS from 999 to 32 by default and use a Kconfig
to encode it as CONFIG_TEST_SEM_N_LOOPS.
Running TESTSUITE semaphore
===============================================================
START - test_named_semaphore
PASS - test_named_semaphore in 5.685 seconds
===============================================================
START - test_semaphore
PASS - test_semaphore in 5.010 seconds
===============================================================
TESTSUITE semaphore succeeded
Signed-off-by: Christopher Friedt <cfriedt@meta.com>
Since v3.13, CMake has supported math(... OUTPUT_FORMAT <format>), which
will perform the same functionality as to_hex().
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Since v3.13, CMake has supported math(... OUTPUT_FORMAT <format>) and 0x
prefixes on numbers, which together provides the same functionality as
to_hex() and from_hex() that we've previously maintained.
Users should switch to using math() instead, and our functions are now
marked as deprecated.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
Previously, `to_hex(0 output)` would have placed `0x` into the `output`
variable, which is undesirable... this fix ensures that `0x0` is placed
into this variable if the input is zero.
Signed-off-by: Attie Grande <attie.grande@argentum-systems.co.uk>
This commit adds extended test for mbox driver with
data transfer to verify correct mbox functionality.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
This commit repairs reading of data from other
channels than 0.
Refactors irq handler outside of DT define.
Trigger registered callback only when proper flag is set.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>