Commit graph

24,075 commits

Author SHA1 Message Date
Alberto Escolar Piedras
6ef08d1221 modem: backend: tty: Support building with any C library
Ensure we call into the host C library open/close/read/write
independently of which embedded C library the code is built with.

We do this by:
a) Using the native simulator nsi_host* trampolines when we just want
   to call straight into the host libC.
b) Building in the native_simulator runner context (and therefore with
   the host C library) two functions which we call from the embedded
   side.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-23 19:49:50 +00:00
Yangbo Lu
e212f3e8f4 sd: sd_ops: initialize sdhc_data variables
Initialize sdhc_data variables.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2025-12-23 05:04:25 +01:00
Jordan Yates
36a926f932 disk: sdmmc: implement disk_access_erase
Implement the `disk_access_erase` function by calling out to the lower
layer SD card drivers.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-23 05:02:05 +01:00
Jordan Yates
3050daaecc storage: disk_access: add disk_access_erase
Add the `disk_access_erase` command to complement the read and write
commands.

As a backwards compatible new feature, this increments the API version
from `1.0.0` to `1.1.0`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-23 05:02:05 +01:00
Jordan Yates
2f47985a9e sd: sd_ops: add block_erase implementation
Add a function for erasing a chunk of blocks.

The SD Card Association Pt1 Simplified Physical Layer Specification
recommends to erase many blocks simultaneously in order to enhance data
throughput (4.3.5.1).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-12-23 05:02:05 +01:00
Grzegorz Swiderski
a39b2779ee fs: zms: Reformulate zms_calc_free_space
The initial implementation had a couple of flaws, including:

  * Generally overcounting the free space by ATE_SIZE bytes per sector.

  * Counting multiple ATEs of the same ID if placed in the same sector.
    The correct behavior is to only count the most recent entry.

  * When a sector was mostly or completely filled with small data sizes,
    there was a correction term applied in the wrong location.

  * The same correction term would be mistakenly applied when a sector
    was filled with only delete ATEs, which resulted in undercounting
    the free space in that sector.

This is addressed by rewriting the API according to a simple principle:
the total free space in a filesystem should equal the sum of free space
in every GC'd sector (minus 1 sector reserved for GC itself).

This should work because during garbage collection, ATEs are not moved
between sectors arbitrarily. Only one sector gets GC'd at a time and
every entry in sector N gets either removed or copied to sector N-1.
This means that any two valid entries that occupy a single sector would
still occupy a (different) single sector before and after the operation.

This property lets us simplify the total free space calculation by
considering one sector at a time and reapplying the calculation which
was just introduced for `zms_active_sector_free_space()`.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-12-22 22:32:53 +01:00
Grzegorz Swiderski
491a86ca53 fs: zms: Reformulate zms_active_sector_free_space
The initial implementation had a flaw in it: when an active sector was
almost full, the naïve calculation could easily underflow and return a
negative value, which would be misinterpreted as an errno.

Rewrite this API to satisfy the following, reasonable expectations:

  * Always return a non-negative value, provided ZMS is initialized.

  * Always return 0 if no more data can be written into the sector
    without triggering garbage collection.

  * Never return a value less than the actual number of bytes that can
    still be written into the sector.

This requires awareness of a few special cases in ZMS. These are now
captured in a helper function, which will be reused later.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2025-12-22 22:32:53 +01:00
Ayush Singh
63ff14e3d8 net: dns: resolve: Combine AR and AN handling
Use the same function to parse all records. The main difference is that
answer record handling matches the answer with the initial query, i.e.
AAAA query will have AAAA answer record. Additional records do not have
any matching with the original query.

Also just warns if an additional record parsing fails. But answer record
parsing is an error.

Tested on BeagleConnect Freedom

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-12-22 20:42:08 +01:00
Ayush Singh
31bc3b016b net: dns: resolve: Add additional record support for PTR query
As described in Section 12 of RFC 6763 [0], DNS-SD responses can contain
SRV, TXT and A/AAAA under additional records. This is done even in the
zephyr DNS service advertisement. So these additional records should be
passed to the user for handling.

Most of the code for additional records is taken from normal dns answer
unpacking. However, I have split the handling into a separate function
since I have only added additional records handling for DNS-SD. The same
code should be usable for answer record as well if required. The main
thing missing from additional record code is that we do not need to
match the query type to the response type.

Tested on BeagleConnect Freedom.

[0]: https://datatracker.ietf.org/doc/html/rfc6763.html#section-12

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-12-22 20:42:08 +01:00
Seppo Takalo
c57042e3ca net: lib: shell: dns: Don't hard code the timeout to 2s
The hard coded 2s timeout might be too small for LTE and Nb-IoT
networks.

Instead use already existing CONFIG_NET_SOCKETS_DNS_TIMEOUT

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-12-22 20:39:21 +01:00
Seppo Takalo
07eec81f93 modem: cmux: Change default timeouts to match 3GPP TS 27.010
3GPP TS 27.010 defines default timeouts as follows:
* Acknowledgment Timer (T1), min 10ms, max 2.5s default 100ms
* Response Timer for multiplexer control channel (T2),
  min 20ms, max 2.5s, default 300ms
* Add Kconfig for both T1 and T2 timers

The Response Timer for wake-up procedure(T3) is already a Kconfig
and its default match the specification.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-12-22 20:39:01 +01:00
Seppo Takalo
f833ff533d modem: cmux: Add retry counter for SABM, CLD and DISC control messages
Add retry counter for opening and closing CMUX as well as
opening and closing the DLCI channel.

Use same retry counter for both DLCI control messages as well as CMUX
control messages as there is very minimal room for race condition.
DLCI messages are only send when CMUX control channel is open.

Where relevant, use disconnect(cmux) for all closing calls.
So we have one entry point for cleaning.

Similarly refactor modem_cmux_on_dlci_frame_dm() to dlci_close() as
this is the single function to close and clean up a channel.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-12-22 20:38:15 +01:00
Seppo Takalo
64459fbb50 modem: cmux: Drop invalid response frames
Drop invalid response frames when in connected state.

Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
2025-12-22 20:38:15 +01:00
Robert Lubos
cf04a04680 net: mqtt: Allow to force native TLS on MQTT socket
Add a parameter to MQTT TLS configuration that allows to force native
TLS on a socket if offload dispatcher is used. This allows for MQTT to
use native TLS implementation with an offloaded TCP socket.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-12-22 14:48:56 +01:00
Mark Wang
9b4501977b bluetooth: a2dp: implement remaining a2dp SBC codec API functions
Add implementations for the following SBC codec parameter getter functions:
bt_a2dp_sbc_get_channel_mode(): returns the channel mode (mono, dual,
stereo, joint stereo); bt_a2dp_sbc_get_subband_num(): returns the number of
subbands (4 or 8); bt_a2dp_sbc_get_block_length(): returns the block length
(4, 8, 12, or 16); bt_a2dp_sbc_get_allocation_method(): returns the
allocation method (SNR or loudness).

These functions parse the SBC codec configuration parameters and return
the corresponding values, completing the API defined in a2dp_codec_sbc.h.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-12-22 14:45:48 +01:00
Alberto Escolar Piedras
074cda5a93 net: websocket: Remove unnecessary includes
Since d45cd6716b this code does not use
types defined in the POSIX_API and therefore we do not need to work
around header include issues.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-19 13:53:14 -05:00
Ivan Iushkov
c3190d34aa Bluetooth: mesh: suppress clang warning in net.c
struct net_val is a packed struct containing
`struct bt_mesh_key dev_key` member which contains uint32_t
variable inside.
Compiling this code with llvm clang produces the following
warning:

`
error: field dev_key within 'struct net_val' is less aligned
than 'struct bt_mesh_key' and is usually due to 'struct net_val'
being packed, which can lead to unaligned accesses
[-Werror,-Wunaligned-access]
`

However, the `struct bt_mesh_key dev_key` is handled in accordance
to its actual alignment. I.e., it is copied using memcpy() which
prevents any alignment issues.

This commit resolves the following Zephyr issue:
https://github.com/zephyrproject-rtos/zephyr/issues/101144
by suppressing -Wunaligned-access warning
on the `struct net_val` declaration.

Signed-off-by: Ivan Iushkov <ivan.iushkov@nordicsemi.no>
2025-12-19 10:39:11 +01:00
Lyle Zhu
c848b05126 Bluetooth: Classic: Monitor setup_sco and accept_sco_req HCI commands
For some controllers, such as NXP IW612 Chipset, the PCM pins of
controller needs to be configured before the SCO connection is
established. And it requires to get the `air_coding_format` to
configure the PCM pins of controller.

So, it requires to known when the SCO connection will be established
and what the `air_coding_format` of the SCO connection.

Add the function `bt_sco_hci_cb_register()` to monitor the HCI
commands `setup_sco` and `accept_sco_req`.

Add the function `bt_sco_hci_cb_unregister()` to remove the monitor.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-19 10:23:35 +02:00
Wouter Horré
799d189a28 rtio: executor: release mempool buffer before resetting it
`rtio_executor_handle_multishot` releases the RX buffer in case of
cancellation or error. However, in case of an sqe that uses a mempool,
it reset the buffer before that, making the release a NOOP.  Fix that by
moving the reset of the buffer to right before pushing the sqe back onto
the queue.

Signed-off-by: Wouter Horré <wouter@versasense.com>
2025-12-19 10:22:38 +02:00
Ayush Singh
b0229771d5 net: dns: resolve: Enable discovery of all service instances
The DNS-based Service Discovery has the following abstract:

   This document specifies how DNS resource records are named and
   structured to facilitate service discovery.  Given a type of service
   that a client is looking for, and a domain in which the client is
   looking for that service, this mechanism allows clients to discover
   a list of named instances of that desired service, using standard
   DNS queries.  This mechanism is referred to as DNS-based Service
   Discovery, or DNS-SD.

As is stated here, DNS-based service discovery is designed to find all
instances implementing a service, not just the first one.

Currently, zephyr `dns_resolve_service` will call the callback for only
the first client instance found. It still does receive the responses
from other instances, but those are dropped since the query is already
marked as finished. The seems incorrect behavior.

With that said, the changes in this commit are API breaking, since even
the docs already state that only the first response is currently used.
So I am fine with creating a new function for discovering all instances
if that is more acceptable.

Since DNS-SD queries expect multiple responses, timeout or manual
cancellation are the only methods to stop an in-flight request. When a
timeout happens, the callback is called with one of the following
responses:
- `DNS_EAI_ALLDONE`: If at least one successful response was received.
- `DNS_EAI_CANCELED`: If no successful response was received.

Tested with 3 BeagleConnect Freedoms (2 running mdns_responder and 1
running dns_resolve sample).

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
2025-12-19 10:22:24 +02:00
Jeremy Truttmann
26a08c86f6 net: ethernet: Allow to disable the auto-start of ethernet interfaces
Adds CONFIG_ETH_NET_IF_NO_AUTO_START to allow
pre-configuration of Ethernet interfaces (e.g., filters, mac)
before they become operational. When enabled, net_if_up() must be
explicitly called by the application.

Signed-off-by: Jeremy Truttmann <jetstreeam.code@outlook.com>
2025-12-19 10:22:14 +02:00
Alberto Escolar Piedras
fe1607844c mgmt: mcumgr: Fix remaining net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 18:52:06 +00:00
Alberto Escolar Piedras
3b4cde8132 shell: backends: websocket: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 18:51:59 +00:00
Alberto Escolar Piedras
0be25778f7 net: sockets: objcore: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 18:51:59 +00:00
Alberto Escolar Piedras
555887ec11 net: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 18:51:59 +00:00
Alberto Escolar Piedras
64efa7dcb3 modem: ppp: Fix remaining net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 14:52:30 +00:00
Alberto Escolar Piedras
455a0436e5 net: zperf: Fix net API use
In d45cd6716b the mayority of the
Zephyr codebased was changed to use the Zephyr native net_ prefixed
types, but some were forgotten.
Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 14:52:17 +00:00
Alberto Escolar Piedras
18bf241ec4 usb: host: usbip: Fix net API use
In c52c206e26 &
32059d7414 the USB code was changed to
use the Zephyr native net_ prefixed API, but some were forgotten
(nto[hn][ls]()). Let's change it now.

Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 14:51:52 +00:00
Alberto Escolar Piedras
b5709a3cf4 usb: next: Fix net API use
In 32059d7414 this code was changed to
use the Zephyr native net_ prefixed API, but some were forgotten
(ntohs()). Let's change it now.

Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 14:51:52 +00:00
Alberto Escolar Piedras
ba84bfea3c usb: legacy: Fix net API use
In c52c206e26 this code was changed to use
the Zephyr native net_ prefixed API, but some were forgotten
(ntohs()). Let's change it now.

Without this fix/change the code still builds as we are by now setting
CONFIG_NET_NAMESPACE_COMPAT_MODE. But when this is not set, things
fail to build.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-18 14:51:52 +00:00
Ederson de Souza
0cdf8694e0 subsys/pmci/mctp: I2C-GPIO controller interrupt fix
MCTP I2C-GPIO controller wasn't properly reenabling interrupt on the
GPIO line after disabling it during transfer.

This patch also uses `GPIO_INT_LEVEL_ACTIVE` instead of
`GPIO_INT_LEVEL_HIGH` to respect GPIO active state.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-12-18 12:06:55 +01:00
Ederson de Souza
8401bcfb7a subsys/pmci/mctp: Fix I2C-GPIO target reading
State machine handling RX data wasn't transitioning to "receive" mode.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-12-18 12:06:55 +01:00
Lyle Zhu
9c710107da bluetooth: hfp_ag: Add Kconfig option for in-band ringtone
Add a new Kconfig option CONFIG_BT_HFP_AG_INBAND_RINGTONE to allow
enabling/disabling the in-band ringtone capability in HFP AG profile.

The in-band ringtone feature is now conditionally compiled based on
this configuration option. When disabled, the feature flags are set
to 0 and the bt_hfp_ag_inband_ringtone() API returns -ENOTSUP.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-18 05:35:53 +01:00
Lyle Zhu
9016f96e01 Bluetooth: Classic: HFP_HF: Refactor at parser
In current implementation, the additional buffer is required by AT to
store the parsing AT response data temporarily. To store the parsed
AT response data completely, the buffer size is as high as the MTU of
the RFCOMM connection. And the buffer is dedicated for each HFP HF
connection. That means the RAM usage depends on the MAX HFP HF
connection count. Actually, the RFCOMM receiving buffer is valid when
processing the received AT response. The changes aim to remove the
additional buffer and leverage the receiving buffer to process the AT
response.

And there is an issue found that the type of the additional buffer
length is `uint8_t`, while the configured RFCOMM receiving data length
is 65535. When the additional buffer length exceeds 255, the AT cannot
process the received data normally.

Replace manual buffer management with net_buf_simple in the AT command
parser. This change eliminates the need for manual position tracking
and buffer length management by leveraging Zephyr's existing buffer
utilities. And leverage RFCOMM receiving buffer instead of allocating
dedicated buffer.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-18 05:33:30 +01:00
Sylvio Alves
f8d2e00a0e includes: remove duplicated entries in zephyr-tree
Remove duplicated #include directives within the same
preprocessor scope across the Zephyr tree.

Duplicates inside different #ifdef branches are preserved
as they may be intentional.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2025-12-17 13:57:38 -05:00
Guennadi Liakhovetski
c88758fdfb llext: make 2 arguments of llext_get_section_header() const
ext and loader aren't modified inside llext_get_section_header(),
they are just passed to llext_section_shndx(), where they're already
const. Make them const in this function too.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-12-17 13:55:34 -05:00
Jukka Rissanen
720408036e net: pkt_filter: Add API for catching UDP/TCP packets
Allow user to setup a hook function that is called for each
received UDP or TCP packet.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-17 14:36:01 +02:00
Lyle Zhu
bf802d0237 Bluetooth: Classic: HFP_AG: Auto-select support highest quality codec
In current implementation, if the codec is not selected, the codec
CVSD will be used to as default value to start audio connection
procedure.

Optimize the codec selection to select the supported highest quality
codec as the default value.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-17 11:29:21 +01:00
Lyle Zhu
466dec3b3e Bluetooth: HFP AG: Add feature support check for voice recognition
Add feature support validation in `bt_hfp_ag_voice_recognition()` to
verify that both HF and AG support voice recognition feature before
attempting to activate/deactivate it.

This prevents attempting voice recognition operations when the feature
is not supported by either the Hands-Free device or the Audio Gateway,
returning -ENOTSUP in such cases.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-17 11:28:55 +01:00
Lyle Zhu
a9269f2012 Bluetooth: Classic: OBEX: Fix unchecked return value issue
Check the return value of the function `atomic_cas()`. If the new
value cannot be set for the OBEX server, return the error code
`BT_OBEX_RSP_CODE_INTER_ERROR`. If the new value cannot be set for
the OBEX client, return the error code `-EINVAL`.

Fix #100012
Fix #100018
Fix #100019
Fix #100021
Fix #100022
Fix #100023

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-12-17 10:53:04 +02:00
Mark Wang
ac395b2d85 bluetooth: avdtp: Check buf tailroom and len before using it
check buf->len before pulling data from buf, check buf tailroom before
adding data to buf.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-12-16 10:12:12 -06:00
Mark Wang
402edcf81c bluetooth: avdtp: Fix coverity by adding assertion for MTU size validation
Add assertion to ensure MTU is at least the size of the start header
before calculating the remaining length for fragmentation. This prevents
potential underflow when subtracting the header size from MTU.
Fix coverity #551657

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-12-16 10:12:12 -06:00
Make Shi
159b4a6d97 Bluetooth: AVRCP: Fix typo in callback name and opid/state
Correct typo and fix opid/state assignment.

Signed-off-by: Make Shi <make.shi@nxp.com>
2025-12-16 10:09:49 +01:00
Jukka Rissanen
d5982f0f89 net: dns: Make sure IPv6 address can be stored to a buf
The CONFIG_DNS_RESOLVER_MAX_NAME_LEN should be large enough so that
IPv6 address can be stored into it. So increase the max name length
to 46 if IPv6 is enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-15 17:11:29 +00:00
Michael Zimmermann
4759e39122 net: mqtt_sn: Disable support for GWINFO messages
The MQTT-SN v1.2 [0] specification specified the GwAddr as follows:
The GwAdd field has a variable length and contains the address of a GW. Its
depends on the network over which MQTT-SN operates and is indicated in the
first octet of this field. For example, in a ZigBee network the network
address is 2-octet long.

It specifies neither the possible values for the first octet, nor the
format of the network-specific address that follows. Thus, the
specification is incomplete and this functionality unusable.

I also wasn't able to find any implementation which implements a gwinfo
message where the address length is not zero. This includes
https://github.com/eclipse-paho/paho.mqtt-sn.embedded-c .

The current implementation in Zephyr simply copies a `struct sockaddr`
into GwAddr. This is a bad idea for many reasons, the most important one
being that the format is not even specified by POSIX [1]. They only say,
which defines must exist, not what their values are. And in fact, these
even differ between Zephyr and Linux.

Thus, I think it's best to remove the implementation to prevent people from
using this, which may even lead to memory safety issues, depending on the
length of CONFIG_MQTT_SN_LIB_MAX_ADDR_SIZE. If we were to receive an
updated specification, all we'd have to do is to convert between `struct
sockaddr` and mqtt-sn addresses both ways.

[0] https://groups.oasis-open.org/higherlogic/ws/public/download/66091/MQTT-SN_spec_v1.2.pdf
[1] https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_socket.h.html

Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
2025-12-15 07:27:57 -05:00
Jukka Rissanen
2f3e902cd0 net: Start RX before the TX
Honor the comment in the code and make sure RX is started
before TX so that we can receive responses to any data we
are sending.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-12-12 15:38:18 -05:00
Cristian Bulacu
267c3196f6 net: l2: openthread: Bring OT iface up on backbone events
When Ethernet is enabled, `net_config_init_app` function will use the
first found interface that has auto start enabled. In this particular
case, backbone interface will not be able to perform dhcp request
because OpenThread interface gets to be the first interface found
and chose. Openthread will fail this procedure, as it has no
direct connectivity to backbone.
This is why, ethernet app has `CONFIG_IEEE802154_NET_IF_NO_AUTO_START`
set.
In this case, make sure to call net_if_up for OpenThread interface from
border router code when backbone events are triggered.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2025-12-12 09:57:20 -05:00
Alberto Escolar Piedras
a2a215e8cc subsys/crc/crc_shell: Fix includes
To use the shell one does not need anymore to pull unistd.h,
if one uses sys_getopt, we need to include sys/sys_getopt.h

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-12-12 09:56:43 -05:00
Peter Ujfalusi
ebb5625bee intel_adsp: Add debug slot manager
Currently all drivers which uses a slot from the debug window have fragile
hardwired slot 'mapping', they are locked to use specific slots even if
there are free slots available for them to take.

The new API hides the management of the slots and descriptors and users
can ask, release or even seize slots that they want to use.

Add a new debug slot manager API and a new default no config option to
allow selection between the hardwired or dynamic debug slot management.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
2025-12-12 04:54:53 -05:00
Tomasz Chyrowicz
26128ab73d mcumgr: Prevent FW loader from self-destruction
The FW loader reports and manages exactly two slots:
 - slot 0: this is the slot for the application code to update
 - slot 1: this is the slot, in which the FW loader is placed

The slot 1 is reported, so tools can fetch metadata about the
FW loader installed on the device.
Unfortunately, currently SMP-based FW loader allows to issue slot erase
command for the slot 1, effectively erasing the FW loader code that is
being executed.

This change correctly identifies the slot 1 as an active one, marking it
as used and blocking erase operation on that slot.

Signed-off-by: Tomasz Chyrowicz <tomasz.chyrowicz@nordicsemi.no>
2025-12-11 16:34:55 -05:00