Possible to send binary data with M559 over Telnet?
-
@otso Now upgraded to 3.4 and the issue persists.
-
@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.
-
I can't imagine telnet being the preferred method for anything these days.
-
@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.
-
@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.
-
I'll see if DC42 can take a look at your telnet question.
-
@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.
-
@phaedrux With a quick test, sending with M559 without the
Snnn
parameter and instead terminating withM29
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
afterM29
. The only way I can continue is rebooting. -
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 M29You might also try M560
It has a special EOF line -
@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.