Firmware Update automation

Hi everyone, does anyone know if it is possible to update firmware on CubeOrange just by launching a script?
My goal is to launch the script in a pc connected to cube orange and it should get in the bootloader, find the firmware in a determined directory, install it and give me feedback.
Let me know if any of you has try smt similar. Thanks

The ardupilot firmware can be updated from a file on the SD Card for those craft where the USB port is inaccessible - you could potentially script that somehow.
The new firmware file can be copied to the SD Card over MavFTP, then reboot to bootloader (like a normal power cycle).

Hello, the problem is that I want it to be remote, making a script made to update the FW on the SD card, will make me lose the remotization component. Sorry for not being clear from the start.

If you cant copy the new firmware file over MavFTP to the SDCard and reboot the flight controller then you’re out of luck.
There’s no auto-update or over-the-air system in place - most would probably view that as a liability and potential source of problems.

Is it only a security problem or there’s a feasibility problem too?

The road block to implementing an over-the-air automatic system is the firmware size and flash memory size available.
Assuming you’ve got a full time telemetry link, you could make a MissionPlanner plugin to do the same steps that a person would do and save a few seconds. A person may still be required to sanity check the process or provide approval.

So you’re saying that even if i’d try to remotize the usb interface of cubeorange, through USB/IP, I still wouldn’t be able to perform a FW update cause of the FW size?
Correct me if I’m wrong, I’m just trying to understand :grin:

No, that’s not what I mean. I meant the process cant be built into the firmware because of space limitations.
If you can script the mavftp transfer to SDCard then do a proper power-cycle of the flight controller the firmware will get updated. Performing the power cycle usually requires physical access, so that could be a road-block. Just rebooting the FC doesnt do the job because it skips the bootloader mode.

ok, that’s not really what I had in mind. I didn’t mean to upload a script inside the firmware flash, i meant to use the script from the machine connected to the cubeorange, perhaps by specifying the USB port. Does that make sense?

yes, that’s what I was thinking too. You could script something in MissionPlanner (or Mavproxy) to transfer (mavFTP) the firmware file to SDCard (over USB or radio) then power-cycle the FC. That will initiate the firmware update if you follow that doco I linked to.

Thank you, everything clear now!