M575 P0 - duet wifi, usb connection
-
Hi,
I would like to increase the baud speed of the serial connection when using the USB connection.
I haven't been able to use anything else but 115200. (I've tried 9600, 57600, 460800)
when I use M575 P0 B57600 then M575 P0 through the duet web interface, it always reports 115200.Am I doing something wrong ?
-
Mhh, the WIKI tells us:
"…
this parameter is typically ignored if the port is a true USB port
..."Therefore it should not change anything if you set this Parameter. It works for a Panel DUE (if you use P1) but i assume that you cannot change the Baudrate for the USB-Port itself.
-
That's correct, there is no baud rate for the USB port because it is native USB, not USB-over-serial as on most 8-bit controller electronics.
If you are using a USB host program to send gcodes to the Duet, for best throughput you must configure the host program to use "hardware flow control".
-
ok, thanks to you both.
So even with hardware flow control I won't be able to get more than 115200 bps ?
As you know I'm replacing the wifi/server side by a python program running on a rpi. I'm just trying to get best bandwidth for file uploads. -
It depends on what you are doing and the program running on your PC, but with hardware flow control you should be able to achieve a bit rate much greater than 115200bps. You should configure the program on your PC to a baud rate higher than 115200, to prevent the program deliberately throttling the speed.
What are you doing over USB: printing, uploading files to the SD card, or something else?
-
ok, thanks to you both.
So even with hardware flow control I won't be able to get more than 115200 bps ?
As you know I'm replacing the wifi/server side by a python program running on a rpi. I'm just trying to get best bandwidth for file uploads.Are you actually switching the wifi off on the Duet as part of this project or are you just bypassing the GUI? If not could you do the upload via http instead?
There is a Cura 3 plugin to do this already:
https://github.com/Kriechi/Cura-DuetRRFPluginA fairly simple POST to rr_upload is about all it should take:
https://www.duet3d.com/forum/thread.php?id=778
rr_upload?name=XXX&time=YYY
Upload a file to path XXX with the last modified date and time using an HTTP POST request. This is the only supported POST request in RepRapFirmware, however be aware that the POST request is no standard HTTP request. To make this work in the firmware, the payload (ie. file) has to be send in one chunk right after the HTTP header without any encapsulation. This mechanism is used to speed up transfers. Once complete, the firmware responds with {"err":code}. If everything goes well, the error code will be 0 and 1 on failure.
Again, apologies if this isn't the aim of your project. As far as your baud rate question goes, I believe that the hardware flow control will ensure the transfer happens as fast as the interface (and associated hardware) can physically manage it.
-
Hi,
I'm switching the wifi and http/ftp servers off.
Having too many issues as others have reported.
It's just a python script that serves static files and process rr_ commands through usb.Thanks to you both for your answers about the hardware flow control, I'll give it a try as soon as I get home (not been at home quite often recently, moving home…)