OSGP / Documentation

This repository contains documentation for the Open Smart Grid Platform project. This repository is built as a GitBook, therefore all content has to be written using markdown syntax. See the latest GitBook:
https://documentation.gxf.lfenergy.org/
Apache License 2.0
24 stars 15 forks source link

UpdateFirmwareRequest: OSLP firmwareUrl not correctly constructed #229

Closed ThE-MaRaC closed 4 years ago

ThE-MaRaC commented 4 years ago

When the firmware is created only filename is provided, but the platform will add manufacturer and model code when storing the actual firmware file. For example:

/var/www/html/firmware/Iskr/AM550T_GPRS/test-firmware.fw

But, in the case of UpdateFirmwareRequest manufacturer and model code are not added when OSLP firmwareUrl is constructed. For example:

2020-06-29 10:18:43.464] [dev-box] [protocolOslpInboundSigningServerResponsesMessageListenerContainer-1] INFO
o.o.a.p.o.e.i.n.OslpChannelHandlerClient@send:109 - Sending OSLP request: updateFirmwareRequest {
  firmwareDomain: "127.0.0.1"
  firmwareUrl: "/firmware/test-firmware.fw"
}

As a workaround FirmwareIdentification can be set to: manufacturerCode/modelCode/firmwareFilename and OSLP firmwareUrl will be correctly constructed. For Example: FirmwareIdentification: "Iskr/AM550T_GPRS/test-firmware.fw"

2020-06-29 10:26:21.662] [dev-box] [protocolOslpInboundSigningServerResponsesMessageListenerContainer-3] INFO o.o.a.p.o.e.i.n.OslpChannelHandlerClient@send:109 - Sending OSLP request: updateFirmwareRequest {
  firmwareDomain: "127.0.0.1"
  firmwareUrl: "/firmware/Iskr/AM550T_GPRS/test-firmware.fw"
}
kevinsmeets commented 4 years ago

@ThE-MaRaC,

Thank you for reporting this issue. The workaround you found is exactly how we use the UpdateFirmware function. This is an example of the SOAP request for a firmware update for an SSLD:

<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header>
        <OrganisationIdentification
            xmlns="http://www.opensmartgridplatform.org/schemas/common">test-org
        </OrganisationIdentification>
        <ApplicationName
            xmlns="http://www.opensmartgridplatform.org/schemas/common">CLIENT_APPLICATION
        </ApplicationName>
        <UserName
            xmlns="http://www.opensmartgridplatform.org/schemas/common">Kevin
        </UserName>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns2:UpdateFirmwareRequest
            xmlns:ns2="http://www.opensmartgridplatform.org/schemas/common/firmwaremanagement/2014/10"
            xmlns:ns3="http://www.opensmartgridplatform.org/schemas/common/2014/10"
            xmlns:ns4="http://www.opensmartgridplatform.org/schemas/devicemanagement/2014/10">
            <ns2:DeviceIdentification>TST-1</ns2:DeviceIdentification>
            <ns2:FirmwareIdentification>TSTMAN/TSTMOD/firmware.file</ns2:FirmwareIdentification>
            <ns2:FirmwareModuleType>FUNCTIONAL</ns2:FirmwareModuleType>
        </ns2:UpdateFirmwareRequest>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This is converted to an OSLP request like this:

updateFirmwareRequest {
  firmwareDomain: "127.0.0.1"
  firmwareUrl: "/firmware/TSTMAN/TSTMOD/firmware.file"
}

For these examples, TSTMAN is the manufacturer code and TSTMOD is the device model identification.

I see that the documentation page is not up to date, it only reflects the device model identification: https://documentation.opensmartgridplatform.org/Protocols/OSLP/v0.6.1/UpdateFirmware.html

I will update the documentation.