Create a Server for FwUpdate

I’m tring to download a firmware update from a remote server. Some points are not clear to me:

  1. The listening server what kind of service have to expose? http? ftp?
  2. What’s the default port to listen?

once I have the firmware server up, can I issue the command fwupload download myfilename.cwe XXX.XXX.XXX.XXX ?


  1. can you install vscode + leaf in the remote machine?
    If yes, you don’t need to care those protocol and listening port
  1. If the firmware download process is triggered by module, you can just set up a http server or ftp server. Module can download the required firmware to /tmp folder from these server by http/ftp protocol. After that module can start the firmware upgrade by “fwupdate download /tmp/xxx.cwe”.

  2. If the firmware download process is triggered by server, you can use this sample application fwupdateDownloader

It will listen to port 5000 after running the application in module, and the host PC needs to send the image through TCP (e.g. “nc64 -w 120 5000 < legato_test.cwe”)
Since there is firewall setting in module, you need to first enter “iptables -I INPUT -j ACCEPT” to disable the module’s firewall.

Thank you so much. My actual approach is to have a tftp server and get new firmware. Unfortunatly I have to download all the legaco.cwe (round 5,8 Mb) and this can be very slow.
I cant just download new apps only cause in some cases the devices running version (even if marked as good) goes back to a previus version.


TFTP uses User Datagram protocol which doesn’t establish a connection and therefore cannot guarantee that files to get to their destinations

If you concern the rollback of version which will make the application disappear, I would suggest you to embed the app into legato image

That’s what i do. Embedd everything in the legato build. About tftp I’ve tried to do a wget of firmware, but many times the file i receive is corrupted.
What i really need is to exclude every useless part from my legato build (useless apps, other resources i will never use) to have a smaller footprint.


As said before, tftp is not suggested as it is not reliable

What you suggest to use? Ftp? It seems i dont have any built in tools for ftp transfer…


you can use another busybox:

Furthermore, how about http server?
you can use wget or curl to get the file

Lastly, here says you can use wget to get FTP file:

1 Like