3.28 Update Firmware

The UpdateFirmware message in OCPP 1.6J is sent by the central system to instruct the charge point to update its firmware. The message includes the firmware URL and a checksum to verify the file integrity and may specify an install date and retry parameters. The charge point responds to confirm if the update was successfully started or if an error occurred, ensuring the device is running the latest software.

API Syntax

Description

Input Params

Return Value

GetUpdateFirmwareParms

Retrieves the parameters from the UpdateFirmware request.

RX_UPDATEFIRMWARE_T *params

void

Example:

  case UPDATE_FIRMWARE:
  {
    if (responsecode == UPDATEFIRMWARE_LOCATION_RECEIVED)
    {
      RX_UPDATEFIRMWARE_T params;
      GetUpdateFirmwareParms(&params);
      LogDebug("APP_LOG", " UpdateFirmware Params location: %s retrieveDate: %s retryInterval: %d retries: %d\n", params.location, params.retrieveDate, params.retryInterval, params.retries);
    }
    else if (responsecode == UPDATEFIRMWARE_LOCATION_MISSING)
    {
      LogDebug("APP_LOG", " UpdateFirmware Missing Location Parameter");
    }
  }
  break;

Syntax

Description

Constants/Members

RX_UPDATEFIRMWARE_T

Structure for RX UpdateFirmware request parameters

char uuid[];

char location[];

char retrieveDate[];

uint16_t retryInterval;

uint16_t retries;

UPDATEFIRMWARE_CODE

Enumeration for UpdateFirmware response codes

UPDATEFIRMWARE_LOCATION_RECEIVED

UPDATEFIRMWARE_LOCATION_MISSING