Zubax / kocherga

Robust platform-agnostic Cyphal/DroneCAN bootloader for deeply embedded systems
https://zubax.com
MIT License
45 stars 10 forks source link

Only begins update if command sent from file server #24

Closed joerossrobotics closed 1 year ago

joerossrobotics commented 1 year ago

Hi,

I have a file server running with node ID 43. When kocherga is running, the update will only begin if the begin update command is sent from the same node ID as the file server. If the command is sent from any other ID, kocherga goes into AppUpdateInProgress mode with a VSSC of 1, and then enters NoAppToBoot mode. Once a program has been loaded onto the microcontroller, I am able to trigger an update successfully by sending an update command from any node ID.

Is this intended behaviour, or a bug? For my purposes, being able to trigger an initial software update from a node ID other than the file server would be very useful.

Cheers

pavel-kirienko commented 1 year ago

This is the intended behavior documented here: https://github.com/OpenCyphal/public_regulated_data_types/blob/935973babe11755d8070e67452b3508b4b6833e2/uavcan/node/435.ExecuteCommand.1.1.dsdl#L16-L20

The updatee (Kocherga) will attempt to fetch the specified image from the client that sent the update request. It is currently impossible to instruct the updatee to fetch the image from a third node. It was a feature available in UAVCAN v0 but it was removed during the standard DSDL overhaul as it was deemed unnecessary.

If there is interest, the feature can be re-introduced in ExecuteCommand.1.2 while retaining backward compatibility with existing systems.