Skip to content

Built-in OTA and Diagnostics over FTP#313

Merged
matth-x merged 10 commits intomainfrom
feature/ota-over-ftp
Jun 11, 2024
Merged

Built-in OTA and Diagnostics over FTP#313
matth-x merged 10 commits intomainfrom
feature/ota-over-ftp

Conversation

@matth-x
Copy link
Owner

@matth-x matth-x commented Jun 9, 2024

Provide a default FirmwareManagement implementation based on FTP (i.e. firmware updates and diagnostic uploads).

UpdateFirmware

The UpdateFirmware handler now triggers an FTP download which which can be set up to store all data on flash. This PR includes a full default OTA implementation for the ESP32 on Arduino (using the Update library) as a reference on how to store the FTP traffic on flash.

Furthermore, this PR contains unit tests for the FirmwareService and cleans up the existing OTA procedure a bit.

The OTA reference on the ESP32 replaces the previous HTTP-based reference.

GetDiagnostics

The Diagnostics handler now takes care of establishing the FTP connection and uploading the diagnostics file which contains a full copy of the local OCPP files. The firmware integration can add further diagnostics data (like sensor readings or status variables) to provide troubleshooting information about the chargers.

General

Since the FTP client is based on MbedTLS, these changes only work when the build flag MO_ENABLE_MBEDTLS=1 is set.

This PR also fixes the Unix filesystem adapter which reported the files "." and ".." in ftw_root. Since most filesystems for microcontrollers don't use these helper directory entries, they are filtered out now.

@matth-x matth-x merged commit 0582410 into main Jun 11, 2024
matth-x added a commit that referenced this pull request Jun 11, 2024
@matth-x matth-x changed the title Built-in firmware updates over FTP Built-in OTA and Diagnostics over FTP Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant