RustyCAN — Software of Unknown Provenance (SOUP)

1.0 SOUP Identification

RustyCAN is a native cross-platform application for monitoring, decoding, and controlling CANopen networks on CAN bus.

Attribute Value
Name RustyCAN
Manufacturer Kodezine
Version 4bd143d
License MIT
Repository https://github.com/kodezine/RustyCAN
Language Rust (2021 edition)
Supported Platforms macOS 12+ (Apple Silicon, Intel x86-64), Windows 10+ (x86-64), Linux kernel ≥ 5.4 (x86-64)
SOUP Role CAN bus monitor and diagnostic tool used during manufacturing or testing of a medical device
IEC 62304 Clause 8.1
Attribute Value
type identification
iec62304-clause 8.1.1

2.1 Summit Adapter Support (SOUP002)

RustyCAN shall support connection to a Summit adapter for CAN bus access.

On macOS and Windows the vendor-provided Summit driver is used. On Linux, the SocketCAN kernel interface (pcan module) is used instead.

Child links: SOUPANOM004 Summit Adapter Not Supported on Linux via Vendor Driver, SOUPTC010 Summit Adapter Connection

Attribute Value
type functional
iec62304-clause 8.1.2

2.2 KCAN Dongle Adapter Support (SOUP003)

RustyCAN shall support connection to a KCAN Dongle (STM32H753ZI-based custom hardware) via USB bulk transfer using the nusb pure-Rust USB library.

The dongle exposes two CAN channels (FDCAN1 on channel 0, FDCAN2 on channel 1) using the KCAN binary protocol over USB bulk endpoints (OUT: 0x01, IN: 0x81).

Child links: SOUPANOM001 macOS: set_configuration() Causes kIOReturnAborted, SOUPANOM002 macOS: GET_INFO Returns Cancelled on First Attempt, SOUPANOM003 OTG FS: Bulk OUT Writes >64 Bytes Silently Truncated, SOUPANOM006 KCAN Bulk IN Timeout Must Exceed Frame Interval, SOUPTC011 KCAN Dongle Connection

Attribute Value
type functional
iec62304-clause 8.1.2

2.3 Adapter Disconnection Detection (SOUP004)

RustyCAN shall detect when a connected adapter is removed or becomes unresponsive during an active session and shall surface an AdapterDisconnected event to the user interface.

Child links: SOUPTC012 Adapter Disconnection Detection

Attribute Value
type functional
iec62304-clause 8.1.2

3.1 CAN Frame Reception (SOUP005)

RustyCAN shall receive CAN 2.0A (11-bit ID) and CAN 2.0B (29-bit ID) frames from the connected adapter and make them available for decoding and logging.

Child links: SOUPTC007 CAN Frame COB-ID Classification

Attribute Value
type functional
iec62304-clause 8.1.2

3.2 CAN Frame Transmission (SOUP006)

RustyCAN shall transmit CAN frames (including NMT commands and SDO requests) to the bus via the connected adapter.

Attribute Value
type functional
iec62304-clause 8.1.2

4.1 CANopen NMT Node State Monitoring (SOUP007)

RustyCAN shall monitor the NMT (Network Management) state of CANopen nodes on the bus by processing heartbeat messages (COB-ID 0x700 + node-ID) as defined in CiA 301, and shall track the last-seen state and inter-event period for each node.

Child links: SOUPTC001 NMT Heartbeat Decode

Attribute Value
type functional
iec62304-clause 8.1.2

4.2 CANopen NMT Master Commands (SOUP008)

RustyCAN shall issue NMT master commands (Start Remote Node, Stop Remote Node, Enter Pre-Operational, Reset Node, Reset Communication) to individual CANopen nodes or as a broadcast to all nodes (node-ID 0), as defined in CiA 301.

Child links: SOUPTC002 NMT Master Command Encoding, SOUPTC013 NMT Master Command Execution

Attribute Value
type functional
iec62304-clause 8.1.2

4.3 CANopen PDO Decoding (SOUP009)

RustyCAN shall decode Process Data Object (PDO) frames received from the bus using signal mappings defined in EDS (Electronic Data Sheet) files, and shall display live signal values with timestamps and inter-event periods.

Child links: SOUPTC003 PDO Decoding from EDS, SOUPTC004 EDS File Parsing (Integration)

Attribute Value
type functional
iec62304-clause 8.1.2

4.4 CANopen SDO Transfer (SOUP010)

RustyCAN shall execute SDO (Service Data Object) read (upload) and write (download) operations on CANopen nodes, supporting expedited transfer, segmented transfer, and block transfer modes as defined in CiA 301.

Child links: SOUPTC006 SDO Expedited and Segmented Transfer, SOUPTC014 SDO Read and Write on Live Node

Attribute Value
type functional
iec62304-clause 8.1.2

5.1 DBC Signal Decoding (SOUP011)

RustyCAN shall decode CAN signal values from DBC message definitions, supporting Intel (little-endian) and Motorola (big-endian) byte orders, scaling factors, offsets, and value description tables (VAL_).

Child links: SOUPTC008 DBC Message and Signal Decoding (Integration), SOUPTC009 DBC Bit Extraction Unit Tests

Attribute Value
type functional
iec62304-clause 8.1.2

6.1 JSONL Event Logging (SOUP012)

RustyCAN shall record all CAN events — including raw frames, NMT state changes, PDO signal values, and SDO transactions — to a timestamped newline-delimited JSON (JSONL) file for the duration of each session.

Child links: SOUPTC015 JSONL Event Log Integrity

Attribute Value
type functional
iec62304-clause 8.1.2

7.1 Native Desktop GUI (SOUP013)

RustyCAN shall provide a native desktop graphical user interface (implemented with egui/eframe) presenting a Connect screen for adapter selection and a Monitor screen displaying live NMT states, PDO signals, and SDO transactions.

Child links: SOUPTC016 Native Desktop GUI Launch

Attribute Value
type functional
iec62304-clause 8.1.2

7.2 Terminal User Interface (TUI) Mode (SOUP014)

RustyCAN shall provide a full-screen terminal user interface mode, activated via the --tui command-line flag, that presents the same monitoring and command capabilities as the GUI without requiring a graphical display.

Child links: SOUPTC017 TUI Mode Launch

Attribute Value
type functional
iec62304-clause 8.1.2

7.3 Live HTTP/SSE Dashboard (SOUP015)

RustyCAN shall expose a live browser-accessible dashboard at http://127.0.0.1:7878/ that streams CAN events via Server-Sent Events (SSE) and displays a live NMT node grid and colour-coded event log.

Child links: SOUPTC018 Live HTTP/SSE Dashboard

Attribute Value
type functional
iec62304-clause 8.1.2

8.1 JSON Configuration File (SOUP016)

RustyCAN shall accept a JSON configuration file supplied via the --config command-line flag, specifying at minimum the adapter kind, port or serial identifier, CAN baud rate, EDS file paths, and optional auto-connect behaviour.

Child links: SOUPTC019 JSON Configuration File Loading

Attribute Value
type functional
iec62304-clause 8.1.2

9.1 KCAN Dongle Firmware Update (SOUP017)

RustyCAN shall perform firmware updates of the KCAN Dongle via USB DFU using the KCAN binary protocol, and shall verify the cryptographic signature (Ed25519) of the firmware image before programming it to the device, rejecting images with an invalid signature.

Child links: SOUPANOM005 bbd Firmware Tool Excluded from Packaged Releases, SOUPTC020 KCAN Dongle Firmware Update via DFU

Attribute Value
type functional
iec62304-clause 8.1.2

10.1 Hardware Timestamp Resolution (SOUP018)

When used with a KCAN Dongle, RustyCAN shall record CAN frame timestamps with a resolution of 100 nanoseconds, latched at frame Start-of-Frame (SOF) by the FDCAN RXTS hardware counter on the STM32H753ZI.

Child links: SOUPTC021 Hardware Timestamp Resolution Verification

Attribute Value
type performance
iec62304-clause 8.1.2

10.2 Configurable CAN Baud Rate (SOUP019)

RustyCAN shall support operator-configurable CAN baud rates. For Summit adapters the supported range is up to 1 Mbit/s. For KCAN Dongles the supported baud rates are those defined in the KCAN firmware bit-timing configuration.

Attribute Value
type performance
iec62304-clause 8.1.2

10.3 Multi-Node Logging Stability (SOUP020)

RustyCAN shall sustain continuous JSONL event logging without frame loss on networks with seven (7) or more simultaneously active CANopen nodes transmitting heartbeat and PDO frames.

Child links: SOUPTC022 Multi-Node Logging Stability

Attribute Value
type performance
iec62304-clause 8.1.2

11.1 Supported Operating Systems (SOUP021)

RustyCAN shall operate on the following platforms without modification:

  • macOS 12 (Monterey) and later, on Apple Silicon (arm64) and Intel (x86-64)
  • Windows 10 (64-bit) and later (x86-64)
  • Linux with kernel ≥ 5.4 (x86-64)

Child links: SOUPTC023 Cross-Platform CI Build and Test

Attribute Value
type interface
iec62304-clause 8.1.2

11.2 Summit Adapter Hardware Interface (SOUP022)

RustyCAN shall interface with Summit adapters via the vendor-provided Summit driver on macOS and Windows, and via the SocketCAN kernel interface (using the pcan kernel module) on Linux.

Child links: SOUPTC024 Code Review: Adapter Interface Implementation

Attribute Value
type interface
iec62304-clause 8.1.2

11.3 KCAN Adapter Hardware Interface (SOUP023)

RustyCAN shall interface with the KCAN Dongle exclusively via the nusb pure-Rust USB library (no dependency on libusb or system USB frameworks), communicating over USB bulk endpoints OUT=0x01 and IN=0x81.

Child links: SOUPANOM001 macOS: set_configuration() Causes kIOReturnAborted, SOUPTC024 Code Review: Adapter Interface Implementation

Attribute Value
type interface
iec62304-clause 8.1.2

11.4 EDS and DBC File Formats (SOUP024)

RustyCAN shall accept CANopen Electronic Data Sheet (EDS) files conforming to CiA 306 for PDO signal mapping and object dictionary lookup, and DBC files in Vector DBC format for automotive CAN signal decoding.

Child links: SOUPTC005 EDS Parser Unit Tests, SOUPTC025 Code Review: EDS and DBC Format Compliance

Attribute Value
type interface
iec62304-clause 8.1.2

12.1 App Update Notification and Self-Update (SOUP025)

RustyCAN shall check for a newer released version at startup by querying the GitHub Releases API (GET /repos/kodezine/RustyCAN/releases/latest).

If a newer version is detected:

  • The user shall be notified in all modes (GUI, TUI, log-stream).
  • The user shall be offered the option to update now or defer.
  • Defer dismisses the notification for the current session only; the notification reappears on the next launch.

Update behaviour by platform:

Platform Behaviour
macOS Apple Silicon (aarch64) Downloads the release DMG, mounts it, replaces the running .app bundle in-place, and relaunches the new version automatically.
Windows (x86-64) Presents a labelled button and hyperlink to the GitHub release page for the available version.
Linux (x86-64) Presents a labelled button and hyperlink to the GitHub release page for the available version.

The version check shall be non-blocking; any failure to reach the GitHub API (network unavailable, rate-limit, parse error) shall be silently ignored and shall not prevent normal operation.

The version comparison shall parse Git tags of the form vMAJOR.MINOR.PATCH (with an optional -N-gHASH describe suffix) and compare them against the build-time version embedded at compile time.

Child links: SOUPTC026 App Update: Version Tag Parsing

Attribute Value
type functional
iec62304-clause 8.1.2

12.2 XCP-on-CAN Transport and CRO/DTO Routing (SOUP026)

RustyCAN shall decode ASAM MCD-1 XCP-on-CAN traffic on operator-configured CRO (master to slave) and DTO (slave to master) CAN identifiers, classifying each DTO packet as command response, error, event, service request, or DAQ data, and shall recognise XCP frames only on the configured identifiers so that the overlapping CANopen SDO identifier range is not misclassified.

Child links: SOUPTC027 XCP Transport Routing Decode

Attribute Value
type interface
iec62304-clause 8.1.2

12.3 XCP Master Command Set (SOUP027)

RustyCAN shall provide an XCP master capable of issuing CONNECT, DISCONNECT, GET_SEED, UNLOCK, SET_MTA, UPLOAD, and DOWNLOAD commands over CAN, tracking a single in-flight transaction and honouring the slave byte order and MAX_CTO negotiated in the CONNECT response.

Child links: SOUPANOM007 XCP Seed and Key Requires Manual Unlock, SOUPTC028 XCP Command Codec

Attribute Value
type functional
iec62304-clause 8.1.2

12.4 XCP DAQ Measurement Capture (SOUP028)

RustyCAN shall reconstruct XCP DAQ measurement layouts by observing the dynamic DAQ configuration command sequence (SET_DAQ_PTR, WRITE_DAQ, START_STOP_DAQ_LIST) and shall decode DTO DAQ frames into address-keyed measurement values using the resulting PID-to-ODT map.

Child links: SOUPTC029 XCP DAQ Tracker

Attribute Value
type functional
iec62304-clause 8.1.2

12.5 A2L Measurement and Characteristic Resolution (SOUP029)

RustyCAN shall parse a subset of ASAM MCD-2 MC (A2L) description files sufficient to resolve MEASUREMENT and CHARACTERISTIC name, ECU address, and datatype, and shall present decoded XCP UPLOAD and DAQ values as raw (non-engineering-unit) quantities.

Child links: SOUPTC030 A2L Parser

Attribute Value
type interface
iec62304-clause 8.1.2

12.6 Dongle CAN-RX Buffering for High-Rate DAQ (SOUP030)

The RustyCAN dongle firmware shall buffer received CAN frames in a queue of at least 256 entries between the CAN-RX path and the USB transmit path, and shall maintain a cumulative counter of frames dropped due to queue saturation, so that sustained high-rate XCP DAQ capture does not silently lose frames.

Child links: SOUPTC031 Dongle DAQ-Readiness Build Check

Attribute Value
type functional
iec62304-clause 8.1.2