processReq() is not implemented for UpdateFirmware Request
Hi @matth-x I am trying to Initiate command for UpdateFirmware request from server but I am getting the message as Unsupported operation: processReq() is not implemented.
[2024-07-10 15:27:42.936] [MO] Recv: [2,"00e7fc4a-059a-477f-99b8-efcaedd164c8","UpdateFirmware",{"location": "anything"}] [2024-07-10 15:27:42.947] [MO] ERROR (Operation.cpp:38): Unsupported operation: processReq() is not implemented [2024-07-10 15:27:42.952] [MO] Send: [4,"00e7fc4a-059a-477f-99b8-efcaedd164c8","NotImplemented","",{}]
Can you please help me on this. Thank you.
Hi @vadhura, this happens when the FW write handlers are not set. To set the FW handlers, see the built-in updater for the ESP32 on Arduino:
https://github.com/matth-x/MicroOcpp/blob/8b1f0fdbae8785c49453f0b2d54a1a8db2fbe3ed/src/MicroOcpp/Model/FirmwareManagement/FirmwareService.cpp#L381-L451
Instead of instantiating the FirmwareService like in L382, you should use the FWService returned by this:
https://github.com/matth-x/MicroOcpp/blob/8b1f0fdbae8785c49453f0b2d54a1a8db2fbe3ed/src/MicroOcpp.h#L344-L355
Then you can implement the DownloadFileWriter which is being passed the download chunk by chunk. And the same goes for the other callback functions from the reference implementation above.