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_INFO is 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 registered bt_pacs_cb.

    • bt_l2cap_server_unregister() removes a registered L2CAP server.

    • bt_gatt_cb.execute_write_ended tells 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 removed media_proxy_ API, see the migration guide.

  • Display

  • FIDO2

  • I3C

  • 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 POSIX write() path the duplicated carriage return (CR CR LF) is gone; Picolibc’s printf() 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, matching printk().

  • LoRaWAN

  • MCUmgr

  • Mbed TLS

  • Networking

    • CONFIG_NET_DHCPV6_START_ON_RA starts 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_NODELAY set, 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 disable CONFIG_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 to CONFIG_NET_SOCKETS_TLS_CONNECT_TIMEOUT per 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_WORKQUEUE and the migration guide.

    • The connection manager tracks name resolution readiness, see Name resolution readiness: NET_EVENT_L4_DNS_READY, NET_EVENT_L4_DNS_LOST and conn_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 a last_seen value, it also paces retries after a failed connection attempt.

    • conn_mgr_get_ready_addr_family() gives the ai_family to pass to zsock_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() orders AF_UNSPEC results 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_IPV4 restores 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 stun shell 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 new ocpp_basic_auth member of ocpp_cs_info. This is the charge point authentication of the security profiles 1 and 2 of the OCPP 1.6 security whitepaper. Their AuthorizationKey configuration 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 after CONFIG_NET_ETHERNET_BRIDGE_FDB_AGEING_TIME seconds without a frame from their address, and eth_bridge_fdb_entry records 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 with eth_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. The NET_EVENT_ETHERNET_BRIDGE_PORT_STATE, NET_EVENT_ETHERNET_BRIDGE_NEW_ROOT and NET_EVENT_ETHERNET_BRIDGE_TOPOLOGY_CHANGE net_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 new ETHERNET_HW_PORT_FORWARDING capability, as it cannot block them, unless the device also reports the new ETHERNET_HW_STP_PORT_STATE capability and takes the port state and FDB flushes from the protocol.

    • The local_in packet filter rules can match UDP and TCP packets by source or destination port with NPF_UDP_SRC_PORT_MATCH, NPF_UDP_DST_PORT_MATCH, NPF_TCP_SRC_PORT_MATCH and NPF_TCP_DST_PORT_MATCH, and TCP segments by the flags of their header with NPF_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_SCALE is enabled, so a connection can use send and receive windows above 64 KB. The window size options, SO_RCVBUF and SO_SNDBUF then 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_TIMEOUT is 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 between CONFIG_NET_TCP_MIN_RTO and CONFIG_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

  • 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

  • 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_WILDCARD enabled, 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-uint64 binding 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 scalar DT_PROP macro.

  • gnss-nmea-generic supports optional enable and reset GPIOs, with configurable reset pulse and wake-up delays.

  • zephyr,charger-gpio supports charging and charge-complete status inputs, including chargers without a software-controlled enable pin.

  • Networking

  • ESP32 SDHC slots support GPIO-based card detection, including GPIOs on external expanders. Configure the optional cd-gpios property in espressif,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

  • Hardware information

  • 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