Documentation icon indicating copy to clipboard operation
Documentation copied to clipboard

FirmwareManagement.UpdateFirmwareRequest doesn't update DeviceFirmwareHistory

Open ThE-MaRaC opened this issue 4 years ago • 3 comments

FirmwareManagement.UpdateFirmwareRequest operation should update DeviceFirmwareHistory (device_firmware_file table in osgp_core DB) after successful installation of new FW. There is a separate FirmwareManagement.SaveCurrentDeviceFirmware operation that can be used to manually update DeviceFirmwareHistory, but I assume that this operation should be used only if FW is not installed via GXF. Please let me know if you need any other info or assistance.

ThE-MaRaC avatar Jun 04 '21 13:06 ThE-MaRaC

The operation UpdateFirmwareRequest sends an URL to an SSLD. Later, a GetFirmwareVersionRequest is executed to check if the new firmware version is installed. The database record is updated when the firmware version matches the new expected firmware version.

kevinsmeets avatar Jun 28 '21 22:06 kevinsmeets

But, this process is not automated. My idea was the following:

  1. UpdateFirmwareRequest sent to SSLD
  2. after successful FW installation SSLD will send an event
  3. GXF receives events and updates DeviceFirmwareHistory

ThE-MaRaC avatar Jul 06 '21 11:07 ThE-MaRaC

Actually the process is automated, albeit in a slightly different way. After an SSLD updates it's firmware, it will reboot and register itself. When a device registration is completed, osgp-adapter-domain-core receives a message that is handled by DeviceRegistrationCompletedMessageProcessor which in turn calls FirmwareManagementService.handleSsldPendingFirmwareUpdate which initiates a GetFirmwareVersionRequest. The same FirmwareManagementService class will handle the response of this request and update the firmware version history when needed.

smvdheijden avatar Feb 22 '22 16:02 smvdheijden