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

    General Question about File Transfer of Duet and Rasperry PI

    Scheduled Pinned Locked Moved
    General Discussion
    4
    7
    509
    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.
    • JBiscundefined
      JBisc
      last edited by JBisc

      Hey guys,

      I am relativly new to the topic and I currently do not understand the architecture od the Duet3 in combination with RPI. Especially file transfer is completly unclear for me.

      Maybe one of the experts can bring light into the dark:

      Main question: What are possible (and good) ways to transfer (programmatically not manually over the Web Control GU) Gcode to the duet?
      Currently I am using : PC in Network with Samba folder to RPI with pythonscript (call of M28 with @Danal interface ) to Duet3.

      Can I transfer the file directly over ftp from RPI to duet instead of using M28?

      Should I use for file transfer the ribbon cable (SPI), a usb cable or even an ethernet cable between RPI and duet? I am confussed.

      My Setup: Duet 3 MB6HC Main Board with attached RPI

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

        When operating with DuetSoftwareFoundation (DSF) on the Pi all the transfers between the Pi and the Duet3 are over SPI/the ribbon cable. There shouldn't be a SD card in the Duet in this scenario, and when you run M28 it should output to /opt/dsf/sd/gcode/ so you might as well share that file over samba/ftp/sftp/ssh or just upload the files through the web interface running on the pi? (you can run wget/fetch/curl/whatnot against the web interface as well)

        1 Reply Last reply Reply Quote 1
        • JBiscundefined
          JBisc
          last edited by

          Thx @bearer . Are you telling me that if I ran a gcode command M28 it is never excuted on the duet? Is just copying my file via M28 to another folder on the RPI? What excatly is than the advantage of M28 instead of just copying?

          My Setup: Duet 3 MB6HC Main Board with attached RPI

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

            @lepetitmort said in General Question about File Transfer of Duet and Rasperry PI:

            Are you telling me that if I ran a gcode command M28 it is never excuted on the duet? I

            not 100% sure but I suspect so, as the M28 is sent to the Pi and the Duet doesn't have a sd card so no reason it involve it in the process; but I can't say I've studied the implementation in detail; at least it isn't neccecary to do so.

            When using a rPi I'm not sure I see any advantage to using M28 unless the source is a legacy serial system maybe.

            1 Reply Last reply Reply Quote 1
            • Danalundefined
              Danal
              last edited by

              Standalone Duet firmware, working with Duet Web Control, uses their own combination of things to move gcode files (that will later be printed) and/or system files, or whatever. Depending on the exact version of Duet Firmware and DWC, this may be HTTP or Websockets under the covers... but that's really not all that relevant, the actual "transport protocol" is Firmware & DWC custom code. DWC places files in various directories, /sys, or /www, or others, based on the file extension, and on which upload button you used (system files vs. jobs).

              In addition, a standalone Duet can have FTP enabled, in which case you can FTP to and from the SD card. It is up to you to put the right files in the right directories.

              Duet3+Pi is different. The DWC buttons still work as described in the first paragraph above. In addition, if you turn on FTP (which would require installing an FTP server on the Debian OS on the Pi), that FTP will have access to whatever you configured to be able to reach in the file system of the Pi. Not the Duet board, it doesn't have a file system in this configuration. If you allow FTP to get there, what the Pi sees as '/opt/dsf/sd' is what the Duet board sees at its SD. Again, up to you to put the right files in the right directories.

              Delta / Kossel printer fanatic

              JBiscundefined 1 Reply Last reply Reply Quote 1
              • JBiscundefined
                JBisc @Danal
                last edited by

                @Danal That helps me. Thanks!

                My Setup: Duet 3 MB6HC Main Board with attached RPI

                1 Reply Last reply Reply Quote 0
                • chrishammundefined
                  chrishamm administrators
                  last edited by

                  The easiest way to transfer a file from a PC to the Pi would be to upload it using the HTTP PUT endpoint DuetWebServer provides: https://github.com/chrishamm/DuetSoftwareFramework#put-machinefilefilename

                  So for example you can send PUT /machine/file/gcodes/mygcode.g with the whole body being the file content and it would be transmitted without issues. I suggest you look for a Python REST API and use that.

                  I'll try to reproduce and fix the issue you reported about M28.

                  Duet software engineer

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