MicroOcpp icon indicating copy to clipboard operation
MicroOcpp copied to clipboard

FirmwareUpdate not implemented issue

Open engahmedaadel opened this issue 9 months ago • 2 comments

Hi @matth-x

When trying to update the firmware it says it is not implemented. I use the latest MicroOcpp lib with ESP32 wroom 32. Do I need to reconfigure any thing to activate the FirmwareUpdate feature? also the GetDiagnostics and ClearCache is not working too.

Here is the log: [MO] Recv: [2,"4b4e9537-3618-4247-a2ef-6d537e685cae","UpdateFirmware",{"location":"https://raw.githubusercontent.com/ahmedhamed/ version/main/code.bin","retrieveDate":"2025-05-14T11:35:05.187Z"}] [MO] ERROR (Operation.cpp:16): Unsupported operation: getOperationType() is not implemented [MO] ERROR (Operation.cpp:30): Unsupported operation: processReq() is not implemented [MO] Send: [4,"4b4e9537-3618-4247-a2ef-6d537e685cae","NotImplemented","",{}]

engahmedaadel avatar May 14 '25 11:05 engahmedaadel

Hi @engahmedaadel

Do you have an update or lead on this. Im on same boat.

kanishk-roadgrid avatar May 26 '25 07:05 kanishk-roadgrid

Hi @kanishk-roadgrid,

I check the software and found that the implementation exist but you should configure somethings to work:

in MicroOcpp/Model/FirmwareMaganement/FirmwareService.h line: 118

#if !defined(MO_CUSTOM_UPDATER) #if MO_PLATFORM == MO_PLATFORM_ARDUINO && defined(ESP32) && MO_ENABLE_MBEDTLS namespace MicroOcpp { std::unique_ptr<FirmwareService> makeDefaultFirmwareService(Context& context); } #elif MO_PLATFORM == MO_PLATFORM_ARDUINO && defined(ESP8266) namespace MicroOcpp { std::unique_ptr<FirmwareService> makeDefaultFirmwareService(Context& context); } #endif //MO_PLATFORM #endif //!defined(MO_CUSTOM_UPDATER)

Because I'm using esp32, I removed the #if conditions and just used: namespace MicroOcpp { std::unique_ptr<FirmwareService> makeDefaultFirmwareService(Context& context); }

I did this in some other files, and it worked but unfortunately it only support ftp servers to download the firmware file, I'm struggling now to convert it to https instead of ftp.

engahmedaadel avatar May 26 '25 07:05 engahmedaadel