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:
Get a list of cameras connected to the computer.
Connect to a camera in the list.
Query the current firmware version.
Update if there is a mismatch.
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.
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}/u20/zivid-tools_${zividVersion}_amd64.deb
wget https://www.zivid.com/hubfs/softwarefiles/releases/${zividVersion}/u18/zivid-tools_${zividVersion}_amd64.deb
wget https://www.zivid.com/hubfs/softwarefiles/releases/${zividVersion}/u16/zivid-tools_${zividVersion}_amd64.deb
sudo apt install ./zivid-tools_${zividVersion}_amd64.deb
Now you may execute the ZividFirmwareUpdater via:
usr/bin/ZividFirmwareUpdater
More information
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.