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

    Possible to send binary data with M559 over Telnet?

    Scheduled Pinned Locked Moved Unsolved
    General Discussion
    4
    18
    1.0k
    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.
    • Otsoundefined
      Otso @Otso
      last edited by

      @otso Now upgraded to 3.4 and the issue persists.

      Otsoundefined 1 Reply Last reply Reply Quote 0
      • Otsoundefined
        Otso @Otso
        last edited by

        @otso But I might as well implement the file upload using HTTP, since I realized there isn't any way to download files over Telnet, right? (For example if you want to edit files). So I might do both file upload and download over HTTP, and then M559 will not be an issue for me.

        1 Reply Last reply Reply Quote 0
        • Phaedruxundefined
          Phaedrux Moderator
          last edited by

          I can't imagine telnet being the preferred method for anything these days.

          Z-Bot CoreXY Build | Thingiverse Profile

          Otsoundefined 1 Reply Last reply Reply Quote 0
          • Otsoundefined
            Otso @Phaedrux
            last edited by

            @phaedrux I prefer Telnet in this case as it keeps the connection open and there is no overhead. Websockets would be an improvement (but still has unnecessary overhead). The "raw" connection of Telnet is nice and clean, and my app will work the same if connected over USB or serial.

            Otsoundefined 1 Reply Last reply Reply Quote 0
            • Otsoundefined
              Otso @Otso
              last edited by Otso

              @Phaedrux I'm running in Marlin compatibility mode, if that makes a difference for the M559 issue.

              Edit: Does not make a difference if I switch to RepRapFirmware mode.

              1 Reply Last reply Reply Quote 0
              • Phaedruxundefined
                Phaedrux Moderator
                last edited by

                I'll see if DC42 can take a look at your telnet question.

                Z-Bot CoreXY Build | Thingiverse Profile

                Otsoundefined 2 Replies Last reply Reply Quote 1
                • Otsoundefined
                  Otso @Phaedrux
                  last edited by Otso

                  @phaedrux Thank you! Please keep it at as a low priority, unless you have a general interest in fixing it. It's not that important or critical for me. A note in the documentation would be helpful, however.

                  1 Reply Last reply Reply Quote 0
                  • Otsoundefined
                    Otso @Phaedrux
                    last edited by Otso

                    @phaedrux With a quick test, sending with M559 without the Snnn parameter and instead terminating with M29 doesn't seem to work either:

                    M559 P"/gcodes/foobar.txt"
                    Writing to file: /gcodes/foobar.txt
                    ok
                    Hello
                    World
                    M29
                    
                    
                    

                    I would expect ok after M29. The only way I can continue is rebooting.

                    1 Reply Last reply Reply Quote 0
                    • OwenDundefined
                      OwenD
                      last edited by OwenD

                      M559 is supposed to be terminated by sending M29
                      I don't see that in your original test.
                      On the one where it froze did you send a line feed before M29?
                      Perhaps try again with the S parameter and M29

                      You might also try M560
                      It has a special EOF line

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

                        @otso The Telnet responder isn't designed to deal with binary file uploads. The reason is that Telnet data is processed line by line and if the line length exceeds the maximum length (255 chars), the line content is dropped and an error message is written to the USB line (if possible).

                        So, at least for now, you should use the rr_upload HTTP request for binary data. I'll discuss with @dc42 how we will treat M559 from Telnet in the next RRF version.

                        Duet software engineer

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