Adds a stub API for a non bus emulators. The stub is used to keep the
rest of the emulation consistent.
Signed-off-by: Yuval Peress <peress@google.com>
This was missed in earlier that tried to fix all string comparisons to
use case insensitive comparison.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
This optimization aggregates frame headers before adding to the ring buffer
and computes the FCS of the frame header in one operation.
This approach improves execution efficiency and reduces memory footprint.
This code adjustment aligns with the changes proposed in https://github.com/zephyrproject-rtos/zephyr/pull/67062.
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Implement transmit idle notification for TTY backend. Since TTY
has an "infinite" transmit buffer, we invoke transmit idle
immediately after writing the data to the TTY file.
The test suite for the TTY backend has been updated to match the
new behavior.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Make async and interrupt driven UART backends notify transmit
idle when transmit is idle.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Add transmit idle event to modem_pipe_event enum. This will
allow modules to await transmit idle before trying to transmit
more data, instead of blindly calling modem_pipe_transmit in
a loop until all data has been accepted.
This will reduce the time spent trying to transmit data while
the backend is blocked.
Similarly to the RECEIVE_READY event, backends will call
modem_pipe_notify_transmit_idle() to indicate that transmit
is idle, and the TRANSMIT_IDLE event will be reinvoked when
the modem pipe is attached to synchronize the state of the
pipe with the user of it.
Additionally, the TRANSMIT_IDLE event is also invoked when the
modem is opened to further help synchronization with the user
of the pipe.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
The help text was incorrect, we return -ETIMEDOUT instead
of -ECONNRESET when retransmission timeout occurs.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
kconfiglib.py has a hard dependency on CONFIG_MODULES to support 'm'
values for tristate Kconfig options. It's a logical companion for
but can also be used with other configurations.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Some modems don't start sending resync flags as described in
3G TS 27.010 V2.0.0 5.2.5, which results in the CMUX being
stuck in resync mode for said modems.
This patch simplifies the resync mechanism to simply drop
invalid frames, and wait for atleast two consequtive frame
flags (stop+start).
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Extract BR/EDR definitions from `l2cap_internal.c` into its own headers:
one for the interface with l2cap.c and one for the rest of the BR/EDR
stack.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
Isolates BR/EDR's l2cap use from LE (most of l2cap.c).
Why? Because I'm refactoring l2cap.c and don't want to accidentally
break BR/EDR support, as there are very few tests in CI.
This way, once `bt_l2cap_chan_send` hands control to l2cap_br.c, it will
not call back into l2cap.c, it will instead be a parallel layer going
directly to conn.c.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
In AP mode maintain the database of connected stations based on the
Wi-Fi management events and dump the list.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These are helpful to track clients being added and deleted.
Applications can actions based on these events.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
These events communicate the status of AP mode operations (enable or
disable) with few pre-defined enumerations.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Update the example of scan -c argument.
Default value for max channels is set to 3,
So, update the example according to that.
Add closing bracket in -s.
Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
Adding a callback for handling lwm2m messages with prefixed paths defined
by the gateway object. If CONFIG_LWM2M_GATEWAY_OBJ_SUPPORT is set,
each path is checked for the prefix stored in the object instances of the
gateway object 25. If prefixes match the msg is passed to the gw_msg_cb.
Signed-off-by: Simon Walz <simon.walz@autosen.com>
__bswap_ in zephyr/sys/byteorder.h conflicts with __bswap_ in host's
byteswap.h. byteswap.h from host compiler used in posix_native_64 boards
causes a compilation issue.
This commit renames __bswap_ to BSWAP_ to prevent collision.
Before this commit a compilation error can be created by adding #include
<byteswap.h> to samples/net/sockets/echo/src/socket_echo.c
This does not change external API to byteorder.h, but does change
internal implementation which some other source files depend on.
Replaced manual byteswap operations in devmem_service.c with APIs from
byteorder.h which automatically converts to CPU endianess when necessary.
Fixes#44324
Signed-off-by: Jonathan Hamberg <jonathanhamberg@gmail.com>
audio_receive_cb is only used by headphones and headset, it is unused in
microphone-only configurations. Gate compilation based on the device
tree.
Signed-off-by: James Zipperer <jzipperer@fb.com>
Change function parameter name in function usbd_device_set_code_triple
from `class` to `base_class` as `class` is a keyword in C++.
Signed-off-by: Shane Snover <ssnover95@gmail.com>
Let's always enable the native_posix backend even
if the serial is used.
Both can be used at the same time, and:
a) users expect the logger output in the invoking shell even if they
enable the UART
b) Since printk is routed to the logger twister actually needs it
for tests to pass as for native platforms it looks into the stdout
of the process.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Previously, if an SD I/O operation was attempted while another thread
held the mutex for the SD card, the I/O operation would simply fail. Add
a timeout to k_mutex_lock calls within the SD subsystem, so that
multithreaded access to the SD card instead blocks until the SD card is
available for I/O
Fixes#66211
Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
Add a function callback that is called when the TCP connection
is closed. This is only available if doing network tests.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
The FIN timer was not set when we entered the FIN_WAIT_1 state.
This could cause issues if we did not receive proper packets
from peer. With this fix, the connection is always terminated
even if peer does not respond.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
If we are in a passive close state, then it is possible that
the ack we are waiting is lost or we do not accept the one peer
sent to us because of some earlier out of memory issue.
So install a timer (using by default the FIN timer value) to
close the connection if the last ack is not received on time.
Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
PBP API allows sources to create a Public Broadcast Announcement.
PBP API to parse a Public Broadcast Announcement.
public_broadcast_source application starts extended advertising and
includes a Public Broadcast Announcement. The advertised broadcast
audio stream quality will cycle between high and standard quality.
public_broadcast_sink application scans for broadcast sources and
synchronizes to the first found source which defines a Public Broadcast
Announcement including a High Quality Public Broadcast Audio Stream
configuration.
Add bsim tests for Public Broadcast Profile APIs.
Add shell implementation for Public Broadcast Profile APIs.
Signed-off-by: Daniela Andreea Dumitrache <danielaandreea.dumitrache@nxp.com>
- Support for listing both testcases and testsuites
- Support for running single suites or single test cases
- Support shuffling tests and repeating execution based on command line
arguments.
For example, build with
west build -p -b qemu_cortex_m3 tests/kernel/sleep -t run -- \
-DCONFIG_ZTEST_SHUFFLE=y -DCONFIG_ZTEST_SHELL=y
Following commands are available:
uart:~$ ztest
ztest - Ztest commands
Subcommands:
run-all :Run all tests
shuffle :Shuffle tests
list-testsuites :List all test suites
list-testcases :List all test cases
run-testsuite :Run test suite
run-testcase :Run testcase
shuffle accepts two arguments --suite_iter and --case_iter which allows
repeated exercution of testcases or suites.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Disables pb gatt- and gatt proxy advs when suspending Mesh, and
enables them again when resuming Mesh.
Adds `bt_mesh_adv_gatt_send` to `bt_mesh_resume` to make sure that
GATT advs start after resumption.
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
Previously, `bt_mesh_proxy_gatt_enable` returned the return value from
`k_work_schedule`, which could be a positive (non-error) message.
Now, it only returns negative error codes (else 0).
Signed-off-by: Håvard Reierstad <haavard.reierstad@nordicsemi.no>
It is useful for an application to be informed when there is
a subscriber waiting for HRS service notification.
Extend HRS service API and add required code to service implementation.
Signed-off-by: Piotr Pryga <piotr.pryga@nordicsemi.no>
The help text uses the capital case as its an acronym, but passing
capital case fails. Also extend that to others as well.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
For better readability, below rules will help:
* Each command should be separated by a newline
* Each command should end with a full stop (intermediate statements
shouldn't have full stops)
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
We are using standard notation to differentiate optional and mandatory,
so, no need for a heading.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
DLCI receive buffer may overrun if data is not processed fast
enough. This error was not reported before this patch, resulting
in unexplained missing bytes.
Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
Makes it clearer what that bit means:
If set, the channel has capacity to send at least one PDU.
If unset, the channel ran out of credits and won't be able to send
anything until the peer sends credits back.
Also add debug logs.
Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>