FirmwareVersion

This parameter is used to get the firmware version of the device associated with a PCAN Channel. It can be used to determine if a device is up to date, or simply as informational output in an application.

Availability

It is available since PCAN-Basic version 4.4.0.

Supported By

Access Mode

This parameter can only be read. It cannot be modified.

Possible Values

The firmware version value is represented as a string of the form “a.b.c”, where:

  • a: represents the major version number.

  • b: represents the minor version number.

  • c: represents the release version number.

All three values have a maximum size of 16 bits that allows a value of 65535 per each. The returned value is a null-terminated string with a maximum length of 18 bytes.

Default Value

Does not apply.

Initialization Status

Get: The PCAN Channel must be initialized before using this parameter.

Example

The following code shows how to retrieve the firmware version of a USB Channel:

C#
PcanChannel channelUsed = PcanChannel.Usb01;

if (Api.Initialize(channelUsed, Bitrate.Pcan500) == PcanStatus.OK)
{
    string firmware;
    if (Api.GetValue(channelUsed, PcanParameter.FirmwareVersion, out firmware) == PcanStatus.OK)
        Console.WriteLine($"Firmware version of {channelUsed}: {firmware}");
    else
        Console.WriteLine($"Error retrieving the firmware version on channel {channelUsed}");
    Api.Uninitialize(channelUsed);
}

See Also