IDS peak comfortC v1.13.1
Loading...
Searching...
No Matches
Firmware Update

Enumerations

enum  peak_firmware_update_step {
  PEAK_FIRMWARE_UPDATE_STEP_TOTAL , PEAK_FIRMWARE_UPDATE_STEP_CHECKPRECONDITIONS , PEAK_FIRMWARE_UPDATE_STEP_ACQUIREUPDATEDATA , PEAK_FIRMWARE_UPDATE_STEP_WRITEFEATURE ,
  PEAK_FIRMWARE_UPDATE_STEP_EXECUTEFEATURE , PEAK_FIRMWARE_UPDATE_STEP_ASSERTFEATURE , PEAK_FIRMWARE_UPDATE_STEP_UPLOADFILE , PEAK_FIRMWARE_UPDATE_STEP_RESETDEVICE
}
 Steps of the firmware update procedure. More...
 
enum  peak_firmware_update_status { PEAK_FIRMWARE_UPDATE_STATUS_STARTED , PEAK_FIRMWARE_UPDATE_STATUS_PROGRESS , PEAK_FIRMWARE_UPDATE_STATUS_FINSIHED , PEAK_FIRMWARE_UPDATE_STATUS_FAILED }
 Status of a firmware update step. More...
 

Functions

peak_status peak_FirmwareUpdate_CompatibleCameraList_Get (const char *gufFileName, peak_camera_descriptor *cameraList, size_t *cameraCount)
 Get a list of cameras that can be updated using the provided .guf-File.
 
peak_status peak_FirmwareUpdate_Execute (peak_camera_id cameraID, const char *gufFileName)
 Upload the firmware provided by the guf file to the given camera.
 

Detailed Description

Functions in this module can be used to work with and upload firmware files to a camera. The firmware is distributed separately in form of .guf (Generic Update Format) files.

As an alternative to integrating firmware update procedures into your own application you can also use the installed firmware update tool, which is provided by the setup. On most systems this can be achieved by double clicking the .guf file.

Note
The firmware update features are only available for cameras with the interface technologies PEAK_INTERFACE_TECHNOLOGY_U3V and PEAK_INTERFACE_TECHNOLOGY_GEV.

The following sample code shows how to determine what cameras are compatible with a given guf file, and how to update them.

Note
Error handling is omitted for the sake of brevity.
// NOTE: We need to update the camera list, as it is used by
// `peak_FirmwareUpdate_CompatibleCameraList_Get`
const char* gufPath = "GV-589x-C_3.30.21242.guf";
size_t size = 0;
printf("Found %zu cameras that can be updated using the GUF file at: %s\n", size, gufPath);
peak_camera_descriptor* compatibleCameras = malloc(size * sizeof(peak_camera_descriptor));
peak_FirmwareUpdate_CompatibleCameraList_Get(gufPath, compatibleCameras, &size);
for (int i = 0; i < size; ++i)
{
const peak_camera_descriptor* compatibleCamera = &compatibleCameras[i];
printf("Updating camera: Model %s Serial %s\n", compatibleCamera->modelName, compatibleCamera->serialNumber);
peak_FirmwareUpdate_Execute(compatibleCamera->cameraID, gufPath);
}
free(compatibleCameras);
peak_status peak_CameraList_Update(size_t *cameraCount)
Update the camera list.
peak_status peak_FirmwareUpdate_Execute(peak_camera_id cameraID, const char *gufFileName)
Upload the firmware provided by the guf file to the given camera.
peak_status peak_FirmwareUpdate_CompatibleCameraList_Get(const char *gufFileName, peak_camera_descriptor *cameraList, size_t *cameraCount)
Get a list of cameras that can be updated using the provided .guf-File.
peak Camera descriptor
Definition ids_peak_comfort_c.h:1532
char serialNumber[64]
The cameras serial number.
Definition ids_peak_comfort_c.h:1549
peak_camera_id cameraID
The camera id.
Definition ids_peak_comfort_c.h:1534
char modelName[64]
The cameras model name.
Definition ids_peak_comfort_c.h:1543

For a practical example that includes message and error handling, refer to the provided firmware_update_c sample.

Enumeration Type Documentation

◆ peak_firmware_update_status

Status of a firmware update step.

Enumerator
PEAK_FIRMWARE_UPDATE_STATUS_STARTED 

The update (step) has been started.

PEAK_FIRMWARE_UPDATE_STATUS_PROGRESS 

The update step has made progress.

PEAK_FIRMWARE_UPDATE_STATUS_FINSIHED 

The update (step) has successfully finished.

PEAK_FIRMWARE_UPDATE_STATUS_FAILED 

The update (step) has failed.

◆ peak_firmware_update_step

Steps of the firmware update procedure.

Enumerator
PEAK_FIRMWARE_UPDATE_STEP_TOTAL 

Step representing the whole update process.

PEAK_FIRMWARE_UPDATE_STEP_CHECKPRECONDITIONS 

The firmware update is checking for compatability with the camera.

PEAK_FIRMWARE_UPDATE_STEP_ACQUIREUPDATEDATA 

The firmware update is loading the firmware files to be uploaded.

PEAK_FIRMWARE_UPDATE_STEP_WRITEFEATURE 

The firmware update is modifying camera properties.

PEAK_FIRMWARE_UPDATE_STEP_EXECUTEFEATURE 

The firmware update is running tasks on the camera.

PEAK_FIRMWARE_UPDATE_STEP_ASSERTFEATURE 

The firmware update is validating the cameras state.

PEAK_FIRMWARE_UPDATE_STEP_UPLOADFILE 

The firmware file is uploaded to the camera.

PEAK_FIRMWARE_UPDATE_STEP_RESETDEVICE 

The firmware update resets the device and waits for it to reconnect.

Function Documentation

◆ peak_FirmwareUpdate_CompatibleCameraList_Get()

peak_status peak_FirmwareUpdate_CompatibleCameraList_Get ( const char * gufFileName,
peak_camera_descriptor * cameraList,
size_t * cameraCount )

Get a list of cameras that can be updated using the provided .guf-File.

This function implements the Two Staged Data Query principle.

Parameters
[in]gufFileNamePath to a .guf file
[out]cameraListPointer to a list of camera descriptors. If cameraList is NULL, cameraCount will contain the number of cameras that are compatible with the .guf file at guf.
[in,out]cameraCount
  • If cameraList is NULL: cameraCount will contain the number of items that cameraList needs to be able to hold.
  • If cameraList is not NULL:
    • in: Number of items that cameraList is able to hold.
    • out: Number of items that were written into cameraList.
Note
Relies on the camera list being up to date. See peak_CameraList_Update.
Attention
Only cameras that are closed and can be opened will be listed. Make sure network cameras have their IP configured correctly.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER Either guf is not a valid path, or cameraCount is a nullptr.
PEAK_STATUS_BUFFER_TOO_SMALL cameraList is not able to hold the required amount of items.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.9

◆ peak_FirmwareUpdate_Execute()

peak_status peak_FirmwareUpdate_Execute ( peak_camera_id cameraID,
const char * gufFileName )

Upload the firmware provided by the guf file to the given camera.

This function is blocking. If you want to be informed about the progress, see the PEAK_MESSAGE_TYPE_FIRMWARE_UPDATE message.

The camera must not be opened in order to upload a firmware.

Note
During a firmware upload, the camera will be restarted, therefore the camera needs to be re-discovered using peak_CameraList_Update after the upload is done.
Parameters
[in]cameraIDID of the camera to upload the firmware to
[in]gufFileNamePath to a .guf file, that contains firmware for the provided camera
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_CAMERA_NOT_FOUND There is no camera with the specified camera id.
PEAK_STATUS_CAMERA_NOT_AVAILABLE The specified camera is currently not available.
PEAK_STATUS_INVALID_PARAMETER guf is not a valid path.
PEAK_STATUS_TIMEOUT Finding the camera after reboot timed out.
PEAK_STATUS_IO An IO error occurred during the firmware upload.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.9