Hey Pavel
I'm trying to implement a UAVCAN bootloader and think I have the skeleton working, but some things are strange with the UAVCAN GUI Tool and I don't understand what it is doing, or what I need to do to make it happy.
I'd like to mention that my node outputs debug info on an uart, which means that I can see quite accurately what is actually going on, i.e., everything I say in the below I can see to actually happen.
Questions/issues:
1) When I start "Update Firmware", I can see that my node sends out a response to the file.BeginFirmwareUpdate requset with error = 0, the bootloader starts, the mode goes into mode Software_Update, and with file.Read requests and receives the complete data of the file, of correct length, and with all errors = 0.
However: This happens twice, and in the GUI Tool I do see - while the update is ongoing - plenty of messages related to file.BeginFirmwareUpdate, which includes "One of the firmware update requests have timed out", or "Firmware update response: ..." with errors 1 or 255.
It appears that the GUI Tool is continuing to send out file.BeginFirmwareUpdate, even though the update has already started. i.e., the mode is Software_Update and the GUI has received file.Read requests. I have noted that the GUI tries initiating an update up to 4 times, but I would have thought that it would stop this once it got a positive response.
What is going on here?
What does one have to do to satisfy the GUI Tool?
The specs read as if only one positive response to a file.BeginFirmwareUpdate is required.
2) There can be two situations, either there is a valid application which should be updated or there is not. As much as I understand, in the first case the node should go into mode Software_Update and immediately start with requesting file.Read. However, in the second case I would want the node to go into a regular loop and wait for a file.BeginFirmwareUpdate, and only when start the update process. Into which mode should the mode be during this period? Initialization? Maintenance?
Thx!
Cheers, Olli