UpdateFirmware
Sent by the CSMS to instruct the Charging Station to download and install a firmware update from a given URL.
Quick Reference
Required Fields
requestId integer Unique ID for this firmware update request
firmware FirmwareType Object with the firmware location, retrieve date, and optional signature
firmware.location string(512) URI pointing to the firmware file (HTTPS recommended)
firmware.retrieveDateTime string (date-time) Earliest date/time to start downloading the firmware
Optional Fields
retries integer Number of download retry attempts
retryInterval integer Seconds to wait between retry attempts
firmware.installDateTime string (date-time) Date/time to install the firmware (after download)
firmware.signingCertificate string(5500) Certificate for verifying the firmware signature
firmware.signature string(800) Base64 encoded firmware signature
Example Payload
{
"requestId": 1,
"firmware": {
"location": "https://firmware.example.com/station/v2.1.0.bin",
"retrieveDateTime": "2024-01-15T02:00:00Z",
"installDateTime": "2024-01-15T03:00:00Z"
},
"retries": 3,
"retryInterval": 60
} Example Full Frame
[
2,
"msg-001",
"UpdateFirmware",
{
"requestId": 1,
"firmware": {
"location": "https://firmware.example.com/station/v2.1.0.bin",
"retrieveDateTime": "2024-01-15T02:00:00Z",
"installDateTime": "2024-01-15T03:00:00Z"
},
"retries": 3,
"retryInterval": 60
}
]
Format: [MessageType, MessageId, Action, Payload]
Overview
UpdateFirmware initiates an over-the-air firmware update on the Charging Station. The station downloads the firmware at the specified time and installs it, reporting progress via FirmwareStatusNotification.
When to Send
- To deploy a security patch
- To add new features or fix bugs
- During scheduled maintenance windows
Expected Response
status:Accepted,Rejected,AcceptedCanceled, orInvalidCertificate
The full update progress is then reported via FirmwareStatusNotification with status values: Downloading, Downloaded, Installing, Installed, DownloadFailed, InstallationFailed, etc.
Key Differences from OCPP 1.6J
requestIdis now required (was optional in 1.6J)- Firmware is wrapped in a
FirmwareTypeobject (not flat fields) - Signature verification fields added directly to
FirmwareType retrieveDateTimereplacesretrieveDate
Best Practices
- Schedule downloads off-peak — Use
retrieveDateTimeat night to avoid interrupting sessions - Use HTTPS — Always use HTTPS for the firmware location URL
- Include signature — Use
signingCertificate+signaturefor secure firmware delivery - Monitor via FirmwareStatusNotification — Track progress using the matching
requestId
Testing Tips
- Test successful download and install cycle
- Test with an invalid URL to verify
DownloadFailedstatus notification - Test the signature verification path with a valid certificate + signature pair
Common Errors
PropertyConstraintViolation
Cause: firmware.location exceeds 512 characters
Solution: Keep the firmware URL under 512 characters
TypeConstraintViolation
Cause: requestId missing
Solution: requestId is required in OCPP 2.0.1 to track the update via FirmwareStatusNotification