Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order

    Duet embedded server stops responding after upload

    Duet Hardware and wiring
    2
    2
    321
    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.
    • Smartinez
      Smartinez last edited by

      Hi!

      I am having problems trying to automatize my Duet uploads.

      I use pycurl to upload to rr_upload. And it is being successful most of the times, but every now and then the same file makes our duets to stop responding with a URL ERROR [[Errno 111] Connection refused.

      The printers keeps printing, but we cannot longer communicate with it. I tried different firmware versions.
      I can ping the printer and it responds back.

      Anyone experienced this kind of problem before?
      Here is my current code to upload to the duet

          c = pycurl.Curl()
          upload_url = "http://%s/rr_upload?name=gcodes/%s&time=%s" % (self.config['ip'], onlyfiles[0], get_timestamp())
      
          file_name = join(self.print_folder, onlyfiles[0])
      
          c.setopt(c.HTTPHEADER, ["Content-type: application/json"])
          c.setopt(c.URL, upload_url)
          c.setopt(c.POST, 1)
          c.setopt(c.VERBOSE, False)
          file = open(file_name, "r")
          c.setopt(c.POSTFIELDS, file.read())
      
          c.perform()
          c.close()
          file.close()
      

      Is there any example of using python to upload into the Duets?

      Thanks!

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

        Hi, try sending a rr_disconnect http request after the file upload completes. That will free up the server resource. HTH David

        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