Slow file upload to Duet Wifi
tjschweizer last edited by
So I've been having a super slow file upload to my Duet Wifi (on a Rostock Max V3). I hit around 20 kB/s, and I'm on a gigabit network.
A little background info: I am on a University network, and the printer has a hostname so I can just type (example.example.edu) and load the DWC. My computer is hooked up via ethernet. When I ping the hostname or manually find the IP address of the printer and ping that, I get less than a millisecond with no lost packets.
However, when I upload files the speed starts around 1MB/s, and instantly drops to 20 kB/s. I installed Wireshark and noticed a lot of TCP errors during upload. I have tried from multiple computers and multiple browsers.
Here is a link to a wireshark capture that I sanitized with TraceWrangler
That is filtered to only the communication between my printer and my computer. Right when the capture starts is when I first open the DWC in the browser.
I attempt to upload a file around the 57.2s mark.
Also here is the output of M122:
=== Diagnostics ===
Used output buffers: 4 of 32 (8 max)
=== Platform ===
RepRapFirmware for Duet WiFi version 1.19 running on Duet WiFi 1.0
Board ID: 08D6M-91AST-L23S4-7JTD8-3S86Q-1PXXK
Static ram used: 21176
Dynamic ram used: 96040
Recycled dynamic ram: 1568
Stack ram used: 1304 current, 5928 maximum
Never used ram: 6360
Last reset 00:31:42 ago, cause: power up
Last software reset reason: User, spinning module GCodes, available RAM 3224 bytes (slot 3)
Software reset code 0x0003, HFSR 0x00000000, CFSR 0x00000000, ICSR 0x00400000, BFAR 0xe000ed38, SP 0xffffffff
Error status: 0
Free file entries: 10
SD card 0 detected, interface speed: 20.0MBytes/sec
SD card longest block write time: 46.4ms
MCU temperature: min 20.2, current 27.8, max 28.6
Supply voltage: min 14.7, current 14.8, max 15.0, under voltage events: 0, over voltage events: 0
Driver 0: standstill
Driver 1: standstill
Driver 2: standstill
Driver 3: standstill
Driver 4: standstill
Date/time: 2017-09-19 09:32:29
Slowest main loop (seconds): 0.047592; fastest: 0.000000
=== Move ===
MaxReps: 0, StepErrors: 0, FreeDm: 240, MinFreeDm 240, MaxWait: 0ms, Underruns: 0, 0
Scheduled moves: 0, completed moves: 0
Bed compensation in use: none
Bed probe heights: 0.000 0.000 0.000 0.000 0.000
=== Heat ===
Bed heater = 0, chamber heater = -1
Heater 1 is on, I-accum = 0.0
=== GCodes ===
Segments left: 0
Stack records: 1 allocated, 0 in use
Movement lock held by null
http is idle in state(s) 0
telnet is idle in state(s) 0
file is idle in state(s) 0
serial is idle in state(s) 0
aux is idle in state(s) 0
daemon is idle in state(s) 0
queue is idle in state(s) 0
autopause is idle in state(s) 0
Code queue is empty.
Network state is running
WiFi module is connected to access point
WiFi firmware version 1.19.2
WiFi MAC address xx:xx:xx:xx:xx
WiFi Vcc 3.15, reset reason Turned on by main processor
WiFi flash size 4194304, free heap 39176
WiFi IP address xx.xx.xxx.xxx
WiFi signal strength -61dBm
HTTP sessions: 1 of 8
Socket states: 2 0 0 0 0 0 0 0
Responder states: HTTP(1) HTTP(0) HTTP(0) HTTP(0) FTP(0) Telnet(0)
My guess is that your university network is throttling the upload bandwidth, or there is a lot of contention on it. However, a heavily-used or fragmented SD card will slow down uploads, so it's worth trying a new SD card. Format it to FAT32, then copy the /sys, /www and /macros folders to it and create an empty /gcodes folder.
fma last edited by
I also noticed some slow transfers to my Duetwifi: it can start very slowly, and suddenly increases to normal speed.
But I don't know if it is a Duet problem or something with my AP… It does not happen all the time.
Is there a way to simulate a transfert with the Duet without really sending files? I would like to use Wireshark, but I don't want to mess up my SD card by writing too much stuff on it.
Frank833 last edited by
I can't comment on SD fragmentation issues…
But in general, when we see that is is 'normal' for transfers to start fast and then slow down, it is caused by a router (or bandwidth manager), throttling speed. These throttles are generally setup to allow short transfers to be fast (so normal web browsing gets good performance), and slows larger transfers. The methods employed to slow the transfers often result in TCP errors.
If speeds are just hit or miss, it is generally contention somewhere. With WiFi, a busy network takes lots of errors - hurting everyone. You might check and see how many other APs are in your area (how many can you 'see' with your phone?). If there are others, setting your AP to a different channel may help.
I can definitely confirm SD card fragmentation/use makes a difference. I almost doubled my upload speed when changing SD cards to an identical brand and size.
tjschweizer last edited by
Thanks everyone for the info. I tried a new micro sd card, and that didn't help. I then setup Octoprint on an rpi3, plugged that into the duet via USB, and my file upload to the rpi3 is extremely fast.
Conclusion: there is something either by the Universities network or the Duet's wifi firmware causing issues with uploading to the Duet.
Now I have Octoprint setup, which I wanted anyways for the webcam streaming. The only problem is I liked DWC more than the Octoprint interface.
Is there any method of transferring files from the RPI3 running Octoprint to the Duet over USB? That'd be clunky, but if possible then I could use the DWC for everything but uploading files.
Also out of curiosity, are there plans to sell the Duet Ethernet's daughter board as a standalone? I've seen mention of that on the forums, but I couldn't find anything in the shop. I might just buy the W5500 and make my own circuit in the meantime.