Built-in OTA and Diagnostics over FTP #313
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.