Skip to content

LibUDS 2.1.0

Choose a tag to compare

@github-actions github-actions released this 21 Sep 20:40
· 7 commits to develop since this release
d42d5e5

UDSLib v2.1.0

Universal Diagnostics Stack for Embedded Systems


What's New

Added

  • DTC store persistence helpers uds_dtc_store_serialize() /
    uds_dtc_store_deserialize(): copy runtime DTC state to a caller-owned
    buffer so the application can keep it across a reset in its own NVM. The
    library stays storage-agnostic. Blob version 0x02 stores the 24-bit DTC,
    status, fault-detection counter, aging counter, extended-data counters, and
    the freeze frame. Version 0x01 blobs (status and counters only) still load.
    Catalog fields are registered again at boot and are not in the blob.
    See examples/dtc_persist.
  • Reference-store snapshot and extended data (#120). On confirmation, and on the
    first failure of each later operation cycle, the store counts an occurrence,
    stores the environment from uds_dtc_store_set_environment(), and serves it
    from uds_dtc_store_snapshot_cb (0x19 0x04, DID 0x1001 time and DID 0x1002
    voltage/power mode) and uds_dtc_store_extdata_cb (0x19 0x06: occurrence,
    pending, aged, ageing). A clean operation cycle ages the DTC; reaching the
    aging threshold clears status and the freeze frame and increments the aged
    counter. The byte layout inside the snapshot is this reference record, not
    an OEM-specific struct.

Fixed

  • ReadDTCInformation (0x19): validate the MemorySelection byte on
    reportUserDefMemoryDTCByStatusMask (0x17) and the user-defined-memory
    record sub-functions (0x18/0x19). A request short of its own parameters
    now returns NRC 0x13 instead of reaching fn_dtc_read for the application
    to re-validate. Raised by issue #113.

Test Results

All Tests Passed

  • Total Tests: 75
  • Passed: 75
  • Failed: 0

Build Information

  • Version: 2.1.0
  • Build Date: 2026-09-21 20:40:39 UTC
  • Compliance: ISO 14229-1 (UDS)
  • Platform Support: Bare Metal, FreeRTOS, Zephyr, Linux, Windows

Supported Services

UDSLib v2.1.0 implements 16 ISO 14229-1 services:

Service Description SID
Diagnostic Session Control Session management 0x10
ECU Reset Reset operations 0x11
Clear Diagnostic Information DTC clearing 0x14
Read DTC Information DTC reporting 0x19
Read Data By Identifier Data reading 0x22
Read Memory By Address Memory access 0x23
Security Access Seed/Key exchange 0x27
Communication Control TX/RX control 0x28
Authentication Certificate exchange 0x29
Write Data By Identifier Data writing 0x2E
Routine Control Routine execution 0x31
Request Download OTA init 0x34
Transfer Data Block streaming 0x36
Request Transfer Exit OTA completion 0x37
Write Memory By Address Memory writing 0x3D
Tester Present Keep-alive 0x3E
Control DTC Setting DTC ON/OFF 0x85

Installation

Download Pre-built Binaries

Download the attached artifacts:

  • uds_host_sim - Host-based ECU simulator
  • unit_tests - Complete test suite

Build from Source

git clone https://github.com/w1ne/udslib.git
cd udslib
git checkout v2.1.0
mkdir build && cd build
cmake ..
make
ctest

Documentation

Licensing

  • Community: PolyForm Noncommercial 1.0.0 (noncommercial use). See LICENSE.
  • Commercial: 5,000 EUR for production/commercial use, includes integration + 1 year support.
  • Contact: andrii@shylenko.com for commercial terms and support.

Report Issues

Found a bug? Open an issue

Full Changelog

See CHANGELOG.md for complete version history.


Code Coverage

Line Coverage: 94.5% · Function Coverage: 100.0%

Summary coverage rate:
lines......: 94.5% (2271 of 2403 lines)
functions..: 100.0% (119 of 119 functions)
branches...: no data found

Full coverage report available in release artifacts.