Should it be possible to directly send G-code to the printer serial connection using pipes under Linux?
Example:
echo M106 > /dev/ttyUSB0
My controller runs at 250000 baud, I have tried setting the TTY baud rate to 250 kBd with:
stty -F /dev/ttyUSB0 250000
But, unfortunately, this particular baud rate appears to be unsupported under Ubuntu, giving the error:
stty: invalid argument ‘250000’
1 Answer
This forum page strongly suggests you should be using setserial
for a port, not stty
, which is for terminals. I'd give the code snippets there a try. Alternatively, stackoverflow has a similar discussion, with somewhat more complicated modifications.
Are you sure you can't talk with your printer at a lower baud rate than the maximum capability of the printer-end?