For debug usage is added backend for memory window.
Coredump is being dumped in raw data. It needs to be converted to
ACSII for later analysis. Data is written to telemetry slot
in memory window which is a space where is located all debbug
information.
Signed-off-by: PawelX Dobrowolski <pawelx.dobrowolski@intel.com>
This change makes VCS Volume Flag characteristic Notify property
optional and selectable through Kconfig.
Signed-off-by: Fredrik Danebjer <frdn@demant.com>
Shifting "timeout <<= conn->zwp_retries" by more then 63 bits results in
undefined behaviour.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Universal Serial Bus Mass Storage Specification For Bootability requires
that device shall accept Bulk-Only-Transport bCBWCBLength of 12 for all
commands documented in the specification. Allow padding for commands
documented in Bootability specification, but leave others intact.
This fixes Request Sense on Windows 11 which previously failed due to
bCBWCBLength being 12 instead of 6.
Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
Image list will only report active flag for active image and pending
flag for other slot, but only if image in that slot has higher
version than currently running image.
Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
If a socket has DSCP set then the packets from the socket should also be
marked with appropriate priority in case traffic classes are used in
networking stack.
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
This is needed for applications that rely on WPA supplicant being
in disconnected state before issue subsequent commands (e.g., issue scan
immediately after disconnect fails, until disconnect is completed).
Signed-off-by: Krishna T <krishna.t@nordicsemi.no>
Fix Central CIS SN and NESN for skipped events during CIS
setup. It is possible that CIG event may overlap the ACL or
other events at the CIS create instant, and hence have non
zero lazy value during the CIS setup events until CIS is
established.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix CIS offset_min calculation to consider that ACL interval
and ISO interval can be dissimilar and the offset value has
to be compensated for the latency until the instant at which
the offset is used.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix SN value on Peripheral CIS event abort. Adjust the SN
value based on the burst number such that the ISO data where
transmitted as normal.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Add a new API `rtio_sqe_cancel` to attempt canceling a queued SQE
- Add a new syscall `rtio_sqe_copy_in_get_handles` which allows getting
back the SQE handles generated by the copy_in operation so that they
can be canceled.
Signed-off-by: Yuval Peress <peress@google.com>
The idle state was never set, thus providing a poorly
implemented state machine. Updated the code so that unused
code was removed and so that the idle state is properly set.
Optimized the way that a state is set for all endpoints
for a broadcast source with a new function.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
In the FIN_WAIT_1 any incoming data is dropped, but anknowledged. Add a
check to see if the data is already acknowleged to prevent double
acknowledging of the data and bringing the acknowlegde counter out of
sync. When the acknowledge counter gets out of sync, the connection will
never properly terminate any more.
Signed-off-by: Sjors Hettinga <s.a.hettinga@gmail.com>
Fix peer ISO feature support check, by using feature support
bit instead of whether locally supported bit value.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use swapped role specific features bit to calculate features
usable by local device, on feature exchange procedure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix Central ISO assetion failure on being established due to
regression in commit a53d89450a ("Bluetooth: controller:
fixing CIS establish flow for refactored LLCP") that
required changes due to Create CIS LLCP being refactored.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
The phy was converted both when reading from the event
and when reading from the sync, leading to incorrect
value in the synced callback.
Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
The calculation in interval_to_sync_timeout did not take into
account that the periodic advertising sync interval was in units
of 1.25ms, and not ms.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
STRUCT_SECTION_ITERABLE cannot be used with arrays, because of
preprocessor tokenization issues.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Converts the list of functions for registering an MCUmgr SMP
transport from function arguments to a single list which contains
the function pointers.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Adds a new map to responses that command handlers can use to
return result codes of functions themselves, unrelated to SMP
error codes. This is achieved by adding an optional "ret" map
which contains a 16-bit "group" and 16-bit "rc" error code,
this map will not be included if the "ret rc" is 0 (which
implies success).
In order to allow this, a new version of the protocol has been
which can be indicated for use by setting a bit in the header.
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
After sending a CoAP block and receiving the CONTINUE response
code the next block is sent.
Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
Allow to use a buffer for the complete message body if block transfer is
enabled. This buffer is used when serializing the message. For sending
the message the body is split into blocks.
Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
The function gets the the BLOCK1 option from a received message
and extracts the block number, block size and has-more flag from
it.
Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
The function adds a block option to a CoAP message. If the message
is a request the BLOCK1 option is added. Otherwise (response) the
BLOCK2 option is added.
Signed-off-by: Lukas Woodtli <lukas.woodtli@husqvarnagroup.com>
Add support for long writes to the control point
to handle e.g. metadata that's larger than the MTU.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Increase the size of the ase_buf to support
the maximum size of the Codec Configuration
and Metadata.
The ase_buf is not also guarded by a semaphore, so no
more than one thread will use it at any time. This is
needed as ase_status_changed can be called from multiple
threads.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add support for long read by adding a read_buf and store
the data when long data is being read.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of using the read by UUID, we do a "proper"
discover by UUID. The reason for this is that read by
UUID is not mandatory in the BAP specs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of using the read by UUID, we do a "proper"
discover by UUID. The reason for this is that read by
UUID is not mandatory in the BAP specs.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Instead of using the read by UUID, we do a "proper"
discover by UUID. The reason for this is that read by
UUID is not mandatory in the BAP specs, and that we need
to do a long read on the PAC records anyhow, and that
cannot be done with the read by type/UUID.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a new struct unicast_client to hold all the conn-specific
data for the Unicast Client implementation.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The maximum size of the characteristic is BT_ATT_MAX_ATTRIBUTE_LEN.
The previous size limited the size of the characteristic to
the maximum possible MTU, thus not utlizing support for the
Read Long procedure.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a semaphore to guard the read buf. The reason for this
is that the read buf is populated from either the BT RX
thread, or the workqueue thread. The semaphore ensures
that both threads will never have attempted to
add any data to the buffer at the same time.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
On connection clean-up release nodes held by LLCP. These are released
in two steps, first on LLCP terminate (in local/remote) by moving
to rx/tx_node_release chains, and then on conn_cleanup_finalize
nodes are released back to appropriate mem-pool/queue.
Rename abort functions to refer to terminate.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Instead of using the node ref used for TX ack for storing a TX node
pre-allocated in case of NTF RX node availability delay, introduce a
separate store to TX node. This to avoid misunderstanding on clean-up
in terminate flow.
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Latest modification to LLCP removed 'monitoring' of cis->established
flag in LLCP, relying instead on signal through ULL.
For this to work properly the signal must also be generated, so this is
introduced. Note - checking of cis->established flag could be removed
if caller ensures only calling once (on establish condition)
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
When possible re-use the already allocated RX node for notifications.
Store (retain) RX node and Link element on RX if NTF could occur.
Pass link element to LLCP (ull_cp_rx()) together with RX node.
New RX node type RETAIN introduced to signal retention
When no RX node is available allocate one and hold off TX on procedures
until such time that a node is available for NTF.
In case waiting for NTF buffer avail is needed, allocate and store TX
node to use for TX once NTF becomes available.
CIS Established (incl. timeout handling) is now handled entirely as a
specific event driven by ull_conn_iso - ie removal of procedure check
of cis->established and cis->expire, as this is doubling mechanism
in the conn_iso context.
Unit test and helpers updated to handle new node type.
Function ull_cp_release_ntf() was used only in unit test, so moved to
helper context.
Updating release_ntf to handle the fact that with piggy-backing in test
context the node used for NTF can be from two different memory pools
Signed-off-by: Erik Brockhoff <erbr@oticon.com>
Use iterable sections to handle devices list. This simplifies devices
implementation by using standard APIs.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add a trailing _ to the section iterable name. This is useful, for
example, to implement numeric sorting like this:
SORT(.z_device_LEVEL_?_)
SORT(.z_device_LEVEL_??_)
Without the trailing _ it would not be possible to use the ?? wildcard
without triggering into trigraphs issues, because linker-defs.h header
is included in C files as well.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>