SigmaOrigo.Swdl 2.1.0

Prefix Reserved
dotnet tool install --global SigmaOrigo.Swdl --version 2.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local SigmaOrigo.Swdl --version 2.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SigmaOrigo.Swdl&version=2.1.0
                    
nuke :add-package SigmaOrigo.Swdl --version 2.1.0
                    

This package provides a .NET tool (swdl) and is part of the Sigma Origo Diagnostics Agent SDK.

Use this tool to run and debug software download operations to a vehicle that is connected to the local machine.

Install tool

 > dotnet tool install --global SigmaOrigo.Swdl

Run local agent

 > swdl PACKAGE-ID .\DummyAgent.exe

Debug local agent

First start the agent process from Visual Studio (or another debugger) then execute:

 > swdl PACKAGE-ID

Command options

Option Description
--vin value When specified, identifies the vehicle for which the software download operation shall be executed. When not specified, the first discovered vehicle will be used.
--environment value When specified, identifies the environment of the software download operation.
--confirm Automatically confirm SWDL continuation.
--deployment-type value When specified, the deployment type of the software download operation.
--tester-present-target address When specified, the UDS target address to which tester present messages shall be sent while awaiting confirmation unless the agent specifies explicit tester present settings.
--tester-present-interval millis When specified, the interval in milliseconds at which tester present messages shall be sent while awaiting confirmation unless the agent specifies explicit tester present settings. Default: 2000
--client-data file Path to a file that provide client data, encoded in a JSON object, that shall be given as input to the SWDL agent
--verbose Enable verbose output.
--timestamp Write timestamps when logging to console.
--sermi-approved Indicates that the caller is approved for SERMI access.

Example: Dummy agent

This dummy SWDL agent is implemeted using NuGet package:
SigmaOrigo.Diagnostics.Agent

using SigmaOrigo.Diagnostics.Agent;

await new DummyAgent().RunAgentAsync().ConfigureAwait(false);

internal sealed class DummyAgent : AgentApplication
{
    protected override async Task<bool> RunSwdlAsync(SwdlContext context)
    {
        await context.LogInformationAsync(
            $"Simulating execution of SWDL package {context.Input.PackageId} " +
            $"in the {context.Input.Environment ?? "DEFAULT"} environment");

        try
        {
            var data = await this.ReadDataAsync(context).ConfigureAwait(false);
            await context.LogInformationAsync($"Data from vehicle: {data}");
        }
        catch (Exception error)
        {
            await context.LogErrorAsync($"Failed to read data from vehicle: {error.Message}");
        }

        for (var i = 0; i <= 33; ++i)
        {
            if (context.GracefulAbortToken.IsCancellationRequested)
            {
                return false;
            }

            await Task.Delay(100);
            await context.SetProgressAsync(i * 3, "Simulating progress...");
        }

        return true;
    }

    private async Task<string> ReadDataAsync(SwdlContext context)
    {
        const string did = "ED20";
        const string ecu = "1A01";

        var completionSource = new TaskCompletionSource<string>();
        using var timeout = new CancellationTokenSource(1000);
        using var timeoutHandler = timeout.Token.Register(() => completionSource.TrySetCanceled(timeout.Token));
        using var responseHandler = context.RegisterResponseHandler((source, payload) =>
        {
            if (source == ecu && payload.StartsWith($"62{did}"))
            {
                completionSource.TrySetResult(payload.Substring(6));
            }
        });

        await context.SendRequestAsync(ecu, $"22{did}").ConfigureAwait(false);

        return await completionSource.Task.ConfigureAwait(false);
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
2.1.0 175 10/1/2025
2.0.1 215 6/3/2025
2.0.0 199 5/26/2025
1.7.3 165 2/24/2025
1.7.1 177 2/19/2025
1.6.11 188 2/10/2025
1.6.10 203 8/27/2024
1.6.9 209 7/6/2024
1.6.6 198 6/19/2024
1.6.5 281 3/19/2024
1.6.4 257 3/16/2024
1.6.3 294 3/13/2024
1.6.2 270 3/3/2024
1.6.1 260 2/13/2024
1.6.0 226 2/13/2024
1.5.1 266 2/12/2024
1.5.0 405 10/12/2023
1.4.0 355 10/3/2023
1.3.2 383 9/28/2023
1.3.1 290 9/28/2023
1.3.0 346 9/26/2023
1.2.0 293 9/26/2023
1.1.0 288 9/25/2023
1.0.1 376 9/4/2023
1.0.0 355 9/4/2023
1.0.0-preview.3 173 6/19/2023
1.0.0-preview.2 180 5/22/2023
1.0.0-preview.1 163 5/10/2023
1.0.0-preview.0 193 5/10/2023