Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Updating firmware with HTTP Requests

    Scheduled Pinned Locked Moved
    Third-party software
    3
    6
    318
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • roseg0ldundefined
      roseg0ld
      last edited by

      I'm interested in allowing our users to update their firmware and macros directly from the Nautilus plugin for Cura (I would be happy to submit a pull request with this functionality to the DuetRRF Plugin as well). I started with macros, and everything is working great there using the HTTP request scheme set up by the DuetRRF Plugin. I haven't published the code yet but I will soon.

      Before I tackle firmware I wanted to ask @chrishamm, @dc42, and any other knowledgeable folks what to watch out for in terms of firmware installation? For macros I just recursively delete everything in macros and then upload the new ones. I assume firmware updating isn't quite as easy? Is there a good example to look to somewhere as to what order things need to be uploaded/deleted/changed, I didn't find it in the DWC source (I'm not super experienced w/ JS so I'm sure I just missed it).

      1 Reply Last reply Reply Quote 0
      • dc42undefined
        dc42 administrators
        last edited by

        For firmware updates, you need to upload the correct firmware file to /sys with exactly the right name (i.e. without any version number suffixes) using rr_upload. When it completes successfully, send M997.

        Updates crossing some version numbers are a little more complicated, e.g. you may need to upload a new IAP file too.

        Duet WiFi hardware designer and firmware engineer
        Please do not ask me for Duet support via PM or email, use the forum
        http://www.escher3d.com, https://miscsolutions.wordpress.com

        roseg0ldundefined 1 Reply Last reply Reply Quote 0
        • A Former User?
          A Former User
          last edited by

          You might need to differentiate between Duet 2 Wifi, Maestro and Ethernet boards (as well as Duet 3).

          While Wifi and Ethernet share the RepRap firmware, the Wifi board can need to have the Wifi firmware updated. (Maybe you can just upload all firmware files and run M997 S0:1:2?)

          1 Reply Last reply Reply Quote 0
          • roseg0ldundefined
            roseg0ld @dc42
            last edited by

            @dc42 for now I'm only confronting the Duet Wifi since all of the printers we've produced use those. Given that, is there reason to avoid uploading firmware, iap, and dwc bins and running m997 s0:1:2 every time the user runs the update script regardless of version number?

            dc42undefined 1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User
              last edited by A Former User

              Flash memory does wear out, but unless you're doing it every other minute it shouldn't matter much I recon - on the other hand you have Murphys law.

              (Edit: To compliment dc42 below; Winbond says 100,000 cycles for their W25Q32 flash, which is used in the genuine ESP12S from AI-Thinker; knock-offs may have less durable flash but thats not a problem with genuine Duets)

              1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators @roseg0ld
                last edited by

                @roseg0ld said in Updating firmware with HTTP Requests:

                @dc42 for now I'm only confronting the Duet Wifi since all of the printers we've produced use those. Given that, is there reason to avoid uploading firmware, iap, and dwc bins and running m997 s0:1:2 every time the user runs the update script regardless of version number?

                The only possible issue I see with that is wearing out the flash memory on the WiFi module. Unfortunately I haven't seen a specification for how many erase cycles the flash memory in the ESP-12S module can survive.

                The SAM4E microcontroller on the Duet WiFi is rated to 10000 erase cycles.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Unless otherwise noted, all forum content is licensed under CC-BY-SA