Firmware Update

Introduction

Zivid provides continuous updates for its cameras. This includes both what runs on the host computer and the camera itself. There are regular updates of the Zivid SDK, which improve image processing on the host computer. The SDK also includes the latest camera firmware. Camera firmware is updated less frequently than the host computer software. These updates improve stability, robustness and acquisition speed.

This tutorial will walk through how firmware updates are performed on the Zivid Camera.

Each SDK version is matched with camera firmware, and the SDK will make sure that the camera runs compatible firmware.

Zivid Studio

When Zivid Studio connects to a camera, it will check whether the camera has matching firmware. If the firmware does not match, it will be updated automatically.

Command Line Interface

It is possible to manually update the firmware on the camera through a command line interface tool ZividFirmwareUpdater. Upon execution, the tool will:

  1. Get a list of cameras connected to the computer.

  2. Connect to a camera in the list.

  3. Query the current firmware version.

  4. Update if there is a mismatch.

  5. Repeat 2-4 for the other camera in the list.


Executing ZividFirmwareUpdater

Launch the Command Prompt by pressing Win + R keys on the keyboard, then type cmd and press Enter.

../../../_images/run-cmd-windows.png

Navigate to the folder where you installed Zivid software:

cd C:/Program Files/Zivid/bin

Execute ZividFirmwareUpdater on your camera:

ZividFirmwareUpdater.exe
Update firmware from version 1.6.6 to version 1.6.7

Update firmware from version 1.6.6 to version 1.6.7

The ZividFirmwareUpdater source code can be found here.

Zivid API

Both Zivid Studio and ZividFirmwareUpdater CLI use the same APIs in the Zivid SDK. These APIs are available in your programming language.

Check if firmware update is required

int main()
{
    try
    {
        Zivid::Application zivid;

        auto cameras = zivid.cameras();
        for(auto &camera : cameras)
        {
            if(!Zivid::Firmware::isUpToDate(camera))
            {
                std::cout << "Firmware update required" << std::endl;
            }
            else
            {
                std::cout << "Skipping update of camera " << camera.info().serialNumber()
                          << ", model name: " << camera.info().modelName()
                          << ", firmware version: " << camera.info().firmwareVersion() << std::endl;
            }
        }
    }
}

Update firmware

int main()
{
    try
    {
        Zivid::Application zivid;

        auto cameras = zivid.cameras();
        for(auto &camera : cameras)
        {
            if(!Zivid::Firmware::isUpToDate(camera))
            {
                std::cout << "Updating firmware on camera " << camera.info().serialNumber()
                          << ", model name: " << camera.info().modelName()
                          << ", firmware version: " << camera.info().firmwareVersion() << std::endl;
                Zivid::Firmware::update(camera, [](double progressPercentage, const std::string &stageDescription) {
                    std::cout << std::round(progressPercentage) << " % : " << stageDescription
                              << (progressPercentage < 100 ? "..." : "") << std::endl;
                });
            }
            else
            {
                std::cout << "Skipping update of camera " << camera.info().serialNumber()
                          << ", model name: " << camera.info().modelName()
                          << ", firmware version: " << camera.info().firmwareVersion() << std::endl;
            }
        }
    }
}

Tip

The firmware is always updated to match the SDK version. Thus, when an older SDK version is used with a camera with newer firmware, then the firmware is rolled back.