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.

More information

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

ZividFirmwareUpdater is part of the Zivid-Tools package for Ubuntu. This may not have been installed when you installed Zivid SDK and Studio. Follow these steps to install Zivid-Tools:

ZividFirmwareUpdater can be found in /usr/bin/.

Open a terminal window by pressing Ctrl + Alt + T keys on the keyboard:

mkdir -p Zivid
cd Zivid
zividVersion=$(curl -L https://www.zivid.com/software/latest_version)
wget https://www.zivid.com/hubfs/softwarefiles/releases/${zividVersion}/u22/zivid-tools_${zividVersion}_amd64.deb
wget https://www.zivid.com/hubfs/softwarefiles/releases/${zividVersion}/u20/zivid-tools_${zividVersion}_amd64.deb
wget https://www.zivid.com/hubfs/softwarefiles/releases/${zividVersion}/u18/zivid-tools_${zividVersion}_amd64.deb

Note

Support for Ubuntu 16.04 is removed since SDK 2.7. To see Ubuntu 16.04 instructions for an earlier SDK version, change the Knowledge Base version in the top left corner.

sudo apt install ./zivid-tools_${zividVersion}_amd64.deb

Now you may execute the ZividFirmwareUpdater via:

usr/bin/ZividFirmwareUpdater
Update firmware from version 1.6.6 to version 1.6.7

Update firmware from version 1.6.6 to version 1.6.7

More information
No update required

No update required

Roll back firmware from version 1.6.7 to version 1.6.6.

Roll back firmware from version 1.6.7 to version 1.6.6.

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

Go to source

source

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;
            }
        }
    }

    return EXIT_SUCCESS;
}

Update firmware

Go to source

source

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;
            }
        }
    }

    return EXIT_SUCCESS;
}

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.