Duet3D Logo

    Duet3D

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Documentation
    • Order
    1. Home
    2. Smartinez
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 1
    • Best 0
    • Controversial 0
    • Groups 0

    Smartinez

    @Smartinez

    0
    Reputation
    1
    Profile views
    1
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Smartinez Unfollow Follow

    Latest posts made by Smartinez

    • Duet embedded server stops responding after upload

      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!

      posted in Duet Hardware and wiring
      Smartinez
      Smartinez