Zephyr 4.6.0 (Working Draft)
We are pleased to announce the release of Zephyr version 4.6.0.
Major enhancements with this release include:
An overview of the changes required or recommended when migrating your application from Zephyr v4.5.0 to Zephyr v4.6.0 can be found in the separate migration guide.
The following sections describe the notable changes by component.
Libraries / Subsystems
Architectures
arm64: the x19-x28 callee-saved registers are now captured in the exception stack frame on the paths that may dump or unwind it (synchronous faults, SError, kernel oops and syscall entry) and are included in the coredump architecture block, version 3, when
CONFIG_EXTRA_EXCEPTION_INFOis enabled. The gdbstub coredump decoder was updated accordingly.xtensa: Thread-local storage can now be used on cores without a THREADPTR register, such as sample_controller32, by enabling
CONFIG_XTENSA_EMULATED_TLS. Userspace is not supported in this mode.
Bluetooth
Added a HID Service server (
CONFIG_BT_HIDS), the service the HID Device role of the HID over GATT Profile is built on.bt_addr_matches_irk()is now public, so a scanner can check whether a resolvable private address was generated from an IRK it holds.PACS exposes the audio locations through
bt_pacs_get_location()and reports changes to a registeredbt_pacs_cb.bt_l2cap_server_unregister()removes a registered L2CAP server.bt_gatt_cb.execute_write_endedtells the application how an Execute Write Request ended: whether the client’s prepared values were written, cancelled, or discarded after a write failed.The
bt_mcp_media_control_server_API controls the local media player and replaces the removedmedia_proxy_API, see the migration guide.
Display
Display timings can be read and set at runtime with
display_get_timing()anddisplay_set_timing().
FIDO2
Added a PSA Protected Storage backend, enabled with
CONFIG_FIDO2_STORAGE_PSA_PROTECTED_STORAGE.
I3C
The requested tCAS (clock after START) is configurable through
i3c_config_controller.tcas_psand thetcas-pscontroller Devicetree property.
Libc
zephyr_write_stdout()no longer converts LF to CRLF. Backends that convert on their own, such as the UART and EFI consoles, now receive a single LF and emit one CRLF. With Newlib, ARCMWDT and the Picolibc POSIXwrite()path the duplicated carriage return (CR CR LF) is gone; Picolibc’sprintf()output is unchanged.printf()output to backends that pass bytes through, such as RTT, RAM console, semihosting, the IPM console sender, WCH SDI, whisper and the Bluetooth monitor, is now LF-only, matchingprintk().
LoRaWAN
The native backend now supports the KR920, AS923 and US915 regions (
CONFIG_LORAWAN_REGION_KR920,CONFIG_LORAWAN_REGION_AS923,CONFIG_LORAWAN_REGION_US915).The LoRaWAN services restore the device class that was in use before a multicast class C session started, instead of always reverting to class A. The current class can be read with
lorawan_get_class().
MCUmgr
The UDP SMP transport can require a client certificate on its DTLS connections (
CONFIG_MCUMGR_TRANSPORT_UDP_DTLS_CLIENT_AUTH), so that only clients signed by the CA the application provides can send SMP commands.
Mbed TLS
Networking
CONFIG_NET_DHCPV6_START_ON_RAstarts the DHCPv6 client automatically from the M and O flags of received Router Advertisements, in stateful mode with the M flag and in stateless mode (Information-request only) with the O flag.HTTP server: accepted connections now have
TCP_NODELAYset, so a response sent in several pieces (every TLS response, every websocket frame) is no longer held back by the client’s delayed acknowledgements. Applications that prefer Nagle’s algorithm can disableCONFIG_HTTP_SERVER_TCP_NODELAY.HTTP server: HTTPS services no longer run the TLS handshake inside
accept(). A client that opens a connection and then stalls its handshake used to stop the whole server, HTTP services included, for up toCONFIG_NET_SOCKETS_TLS_CONNECT_TIMEOUTper connection.The native network stack runs its protocol timers and deferred work on a dedicated work queue instead of the system work queue, so that a slow system work queue item no longer delays DHCP, Neighbor Discovery, address conflict detection or DNS timeouts, and the stack no longer holds up other system work queue users. See
CONFIG_NET_DEDICATED_WORKQUEUEand the migration guide.The connection manager tracks name resolution readiness, see Name resolution readiness:
NET_EVENT_L4_DNS_READY,NET_EVENT_L4_DNS_LOSTandconn_mgr_dns_is_ready().Threads can block until the network is ready with
conn_mgr_wait_ready(), instead of tracking connection manager events, see Waiting for readiness. With alast_seenvalue, it also paces retries after a failed connection attempt.conn_mgr_get_ready_addr_family()gives theai_familyto pass tozsock_getaddrinfo()so that hostnames resolve only to addresses of a ready address family, see Resolving for a ready address family.dns_resolve_get_server_families()reports the address families of the available unicast DNS servers.zsock_getaddrinfo()ordersAF_UNSPECresults as per a subset of RFC 6724: reachable destinations first, then IPv6 before IPv4. Dual-stack applications that use the first result now connect over IPv6 when it is usable.CONFIG_NET_SOCKETS_DNS_PREFER_IPV4restores the preference of IPv4, see the migration guide.Added the STUN library, a codec for the messages of RFC 8489 with the attributes of ICE (RFC 8445): parsing, building, MESSAGE-INTEGRITY, FINGERPRINT and the address attributes. A device finds out its public address with the Binding transaction, the blocking socket client or the
net stunshell commands.OCPP: the charge point can authenticate to the central system with HTTP Basic authentication (
CONFIG_OCPP_BASIC_AUTH), with the credentials set in the newocpp_basic_authmember ofocpp_cs_info. This is the charge point authentication of the security profiles 1 and 2 of the OCPP 1.6 security whitepaper. TheirAuthorizationKeyconfiguration key is not implemented, see HTTP Basic authentication.Ethernet bridge
The bridge learns the port of each source MAC address into its FDB (
CONFIG_NET_ETHERNET_BRIDGE_FDB_LEARNING), so that a frame to a known destination is sent out of one port instead of being flooded. Learned entries age out afterCONFIG_NET_ETHERNET_BRIDGE_FDB_AGEING_TIMEseconds without a frame from their address, andeth_bridge_fdb_entryrecords when that frame was last seen (FDB API version 0.2.0).Experimental support for the Rapid Spanning Tree Protocol of IEEE Std 802.1Q-2014 (
CONFIG_NET_ETHERNET_BRIDGE_STP). Once started on a bridge witheth_bridge_stp_enable(), it blocks the bridge ports that would make a loop and falls back to STP BPDUs on a port where an STP bridge is attached. TheNET_EVENT_ETHERNET_BRIDGE_PORT_STATE,NET_EVENT_ETHERNET_BRIDGE_NEW_ROOTandNET_EVENT_ETHERNET_BRIDGE_TOPOLOGY_CHANGEnet_mgmt events report port role and state changes, a new root bridge and the start of a topology change. The protocol does not run on ports that forward frames in hardware, DSA switch ports and Ethernet devices that report the newETHERNET_HW_PORT_FORWARDINGcapability, as it cannot block them, unless the device also reports the newETHERNET_HW_STP_PORT_STATEcapability and takes the port state and FDB flushes from the protocol.
The
local_inpacket filter rules can match UDP and TCP packets by source or destination port withNPF_UDP_SRC_PORT_MATCH,NPF_UDP_DST_PORT_MATCH,NPF_TCP_SRC_PORT_MATCHandNPF_TCP_DST_PORT_MATCH, and TCP segments by the flags of their header withNPF_TCP_FLAGS_MATCH, see Network Packet Filtering. A rule list can thus, for example, drop the TCP connection requests to all but some ports.TCP can scale its window (RFC 7323) when
CONFIG_NET_TCP_WINDOW_SCALEis enabled, so a connection can use send and receive windows above 64 KB. The window size options,SO_RCVBUFandSO_SNDBUFthen accept values up to 65535 << 14.TCP derives the retransmission timeout (RTO) of each connection from its measured round trip time (RFC 6298).
CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUTis only used until the first measurement, so a path slower than that value, for example with large windows or Wi-Fi power save, no longer causes spurious retransmissions of the whole window. The RTO is kept betweenCONFIG_NET_TCP_MIN_RTOandCONFIG_NET_TCP_MAX_RTO. The retransmissions, and so the time until an unanswered connection fails with-ETIMEDOUT, grow with the RTO of the connection.Wi-Fi
Added external PMKSA cache import and export support, controlled by
CONFIG_WIFI_MGMT_PMKSA_IMPORTandCONFIG_WIFI_MGMT_PMKSA_EXPORT. New requests query and selectively flush the cache, and new events report added and removed entries. The hostap backend implements import, export, and selective flush. (GitHub #115470)
PTP Clock
ptp_clock_adjust_rate()adjusts the clock rate by an offset in scaled parts per million, as used by gPTP and IEEE 1588, instead of a floating-point ratio, so rate corrections no longer need floating-point arithmetic.MQTT 5.0 support in the MQTT client (
CONFIG_MQTT_VERSION_5_0) is no longer experimental.
USB Type-C
Dual-role ports can prefer the Sink role through the Try.SNK and TryWait.SRC states (
CONFIG_USBC_CSM_DRP_TRY_SNK).
Utilities
utf8_is_valid()checks a given number of bytes for well-formed UTF-8 as defined in RFC 3629; overlong sequences, UTF-16 surrogates and code points above U+10FFFF are refused.
Shell
With
CONFIG_SHELL_WILDCARDenabled, an argument containing*or?that matches no subcommand is now passed to the command handler unchanged. Previously the command was run without that argument and its remaining arguments, which usually failed with a wrong argument count.
Devicetree
New
var-uint64binding property type for variable-length unsigned integers of up to 64 bits, encoded as one cell (32-bit) or two cells (64-bit, high word first) and read with a scalarDT_PROPmacro.gnss-nmea-genericsupports optional enable and reset GPIOs, with configurable reset pulse and wake-up delays.zephyr,charger-gpiosupports charging and charge-complete status inputs, including chargers without a software-controlled enable pin.Networking
Added on-device generation of TLS private keys and Certificate Signing Requests (CSRs), so that the private key never leaves the device. See
tls_credential_keygen_generate()andtls_credential_keygen_delete(). Enable it withCONFIG_TLS_CREDENTIALS_KEYGEN. The TLS credentials shell has the newcred keygen,cred keydel,cred csrandcred pubkeycommands, and the TLS on-device key generation sample shows the full flow.
ESP32 SDHC slots support GPIO-based card detection, including GPIOs on external expanders. Configure the optional
cd-gpiosproperty inespressif,esp32-sdhc-slot. An optional sleep pinctrl state controls the signal pins while card power is off.
Other notable changes
Architectures
ARM Cortex-A/R: with
CONFIG_USE_SWITCH, ISRs run in SYS mode and nested interrupts use the interrupt stack, which fixes return address corruption by a nested IRQ (GitHub #122601).
Bluetooth
CONFIG_BT_PRIVACYcan now be enabled in Broadcaster- and Observer-only builds, withoutCONFIG_BT_SMP.
Hardware information
NXP RW61x hwinfo reports PM4 wakeup resets as
RESET_LOW_POWER_WAKE.
Interrupt controllers
GIC v3 LPI and ITS tables use bounded static storage, making their memory requirements predictable at build time and allowing initialization without a system heap. See the migration guide for capacity sizing and heap configuration changes.
Kernel
Threads can be created pinned to CPU 0 by default instead of being allowed on all CPUs, with
CONFIG_SCHED_CPU_MASK_DEFAULT_SINGLE_CPU. A thread’s mask can be widened withk_thread_cpu_mask_enable()while it is not runnable (before it is started, or while it is blocked or suspended).