Use the same function at discovery complete, whether discovery failed
or succeeded.
Rename the discovery_failure() to discovery_complete(), and use that
also when discovery completes successfully.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
The media control client used to subscribe to GMCS characteristics as
the characteristics were discovered, in effect queuing ATT requests.
Since then, the ATT MTU exchange has become automatic, leading to
larger ATT MTUs and more discovered characteristics per ATT response,
which again lead to the client enqueuing more subscriptions and
running out of buffers, with discovery failing as a result.
This commit moves the subscription to GMCS characteristics to a
separate sequence, so that it happens serially after discovery, rather
than in parallel with the discovery.
- Remove separate discovery parameters for the characteristics - they
are no longer needed.
- Add a subscription callback and a couple of subscription functions
The subscription for characteristics for the included OTS has not been
modified. Only two of these are subscribed to, and doing that is
currently not a problem. And I need to better understand the
interaction with OTS and how these subscriptipons are used.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
Refactor subscription to get chaining into callback
Move the start of discovery of included services to a separate
function, in preparation for rewriting discovery.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
When bool is typedef'ed to for instance char the cast from 64 bits
is not so good. Now using an explicit 'cast' to true/false
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Implements PDU flow and unittest of CIS Create on Peripheral
Hooks CIS Create into the controller and fixes a few minor
things in ull to allow for running with NEW LLCP
Also handles CONFIG based comilation of CIS Create
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Hooks the CIS terminate into the controller and fixes a few minor
things in ull_conn(_iso).c
Also handles CONFIG based comilation of CIS_TERMINATE
also fixes a minor issue in helpers_pdu
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Add macro Z_TEST_SKIP_IFNDEF which is used when you want to skip test
if configuration option is not enabled.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
It is possible to open provisioning link again after being provisioned.
Though this has no immediate consequences, the node shall not open
provisioning after being provisioned.
Reset link.cb so that any following provisioning advs are dropped.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
cmd_pb_adv and cmd_pb_gatt are only used when provisionee role is
supported. They should not be compiled if provisionee role is disabled.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
llcp_tx_pause_data() calls ull_tx_q_pause_data() for each pause_mask,
while llcp_tx_resume_data() only calls ull_tx_q_resume_data() when
conn->llcp.tx_q_pause_data_mask == 0 leading to an unbalanced number of
calls to ull_tx_q_pause_data()/ull_tx_q_resume_data() which can leave
the data path of the TX Q paused.
Fix such that only the first call to llcp_tx_pause_data() will pause the
data path of the TX Q.
Add unit test to verify correct pause/resume behavior.
Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
The uart_pipe driver is not dependent on any console driver,
however a serial driver is required.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Add the state transition from connecting to disconnecting
as a valid transition for ISO. This can occur if a ISO channel
is disconnected before it is fully connected, of if a BIG
or a BIG sync is terminated before established.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
There is a brief period between the bt_iso_big_create
and when the ISO channels are established. In this state
it should be possible to call bt_audio_broadcast_source_stop
to stop the BIG from being created.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The addition of the assumption API introduced a bug where a skipped test
would subsequently skip later tests within the same suite. A skipped test
was being treated as an entire skipped test suite.
Keep track of tests being skipped due to skipping in the suite setup versus
being skipped within their test function.
TEST=west build -p -b native_posix tests/kernel/condvar/condvar_api/ -t run
TEST=twister -T tests/ztest -p native_posix
Signed-off-by: Aaron Massey <aaronmassey@google.com>
When LOG_MODE_IMMEDIATE is used, logs processed by the shell
log backend may be intertwined with messages printed by
shell commands running on the shell thread.
It is because the shell uses a mutex while the shell log
backend uses the IRQ lock for synchronization. Switch the
latter to use the mutex as well whenever it's possible.
Signed-off-by: Damian Krolik <damian.krolik@nordicsemi.no>
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Following zephyr's style guideline, all if statements, including single
line statements shall have braces.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Removed auto select from LWM2M_DTLS_SUPPORT
* TLS_CREDENTIALS
* NET_SOCKETS_SOCKOPT_TLS
* NET_SOCKETS_ENABLE_DTLS
LwM2M stack shouldn't enforce these options as they
are not needed with socket offloading.
Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
We are working on phasing out use of the devicetree 'label'
property. We can use DEVICE_DT_GET and drop use of DT_LABEL.
Signed-off-by: Kumar Gala <galak@kernel.org>
Added sequence number and timestamp to the bt_audio_stream_send
function. This allows an application to better
control the audio transmission, as it can schedule
one or more audio streams to send a buffer in a specific
SDU interval (ensuring that e.g. left and right is sent in
the same SDU interval).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This patch fixes an issues where the TX virtqueue is misaligned by
2 bytes due to the way the virtqueue start address is calculated.
It is currently set to immediatelly follow the RX virtqueue:
vr->tx_addr = vr->rx_addr + vring_size(num_desc, VRING_ALIGNMENT);
but the RX virtqueue does not end on an aligned boundary (last field,
avail_event is uint16_t). The resulting misaligned virtqueue causes
alignment faults on architectures that do not support unaligned
accesses (and is suboptimal otherwise)
The fix is to realign tx_addr to requested VRING_ALIGNMENT.
Signed-off-by: Aleksandar Radovanovic <aleksandar.radovanovic@amd.com>
This fix removes the Streaming_Audio_Context LTV from the LC3 Codec
helper macro, and subsequently a faulty exposure of this LTV in the
PAC records used.
Signed-off-by: Fredrik Danebjer <fredrik@danebjer.com>
Made it more clear that the disable functionality is to
disable the mute functionality, but and not disabling
the microphone device itself.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Rename struct bt_micp to bt_mic_ctlr as it is only
used ofr microphone controller now.
This also allow cleanup of the bt_micp struct, thus
removing the common internal micp_internal.h header file
and reducing the size of the implementation by not
using a union of the structs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Modify the existing bt_micp API for the
MICP Microphone Device to be more specific
by adding mic_dev as an infix. This follows
the naming scheme used for the MICP microphone
controller (mic_ctlr).
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The AICS functionality is also possible via the bt_aics
API, and this was just a way to ensure that the AICS
instance was part of a MICS.
Removing makes MICP much simpler, and we can expect user
to know the context of a AICS.
This also fixes a few bad/missing guards.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Rename mics => micp_mic_dev (MICP Microphone Device)
Rename mics_client -> micp_mic_ctlr (MICP Microphone Controller)
This does not change any lines in the code.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Use the profile abbreviation, MICP, instead of the
service abbreviation, MICS, for the MICP implementation.
The server implementation will use MICP and the client
implementation will use MICP_CLIENT for now, as that will
be updated in a future commit.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
PM_DEVICE_ACTION_FORCE_SUSPEND has been equivalent to
PM_DEVICE_ACTION_SUSPEND for a while. Release notes for Zephyr 2.7
mentioned its removal (see 76702e8ff3) but
for some reason it was kept.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
COAP_DEFAULT_MAX_RETRANSMIT and COAP_DEFAULT_ACK_RANDOM_FACTOR
should be configurable to determine the max transmission
timeout of a CoAP packet.
Signed-off-by: Andreas Chmielewski <andreas.chmielewski@grandcentrix.net>
Due to the limitation of the current x86 EFI cosnole implementation,
we skip hte printk which is called by tracing API:
sys_trace_thread_switched_in_user/out_user.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>
Add a EFI console logging backend to support logging sub-system.
To fix those testcases have no log output due to no logging backend.
Signed-off-by: Enjia Mai <enjia.mai@intel.com>