prusa3d / Prusa-Firmware-Buddy

Firmware for the Original Prusa MINI, Original Prusa MK4 and the Original Prusa XL 3D printers by Prusa Research.
Other
1.15k stars 221 forks source link

MK4 PrusaLink extremely slow upload speeds over Wi-Fi #3049

Open H0nzik1 opened 1 year ago

H0nzik1 commented 1 year ago

Printer type MK4

Printer firmware version 4.5.4

Original or Custom firmware - [Original/Custom] Original

Optional upgrades Nothing

USB drive or USB/Octoprint USB drive (PrusaLink)

Describe the bug Upload speed over PrusaSlicer or Web interface via Wi-Fto the MK4 printer is like 0.1MB/s max. So 10MB file takes forever to upload. MK3S+ with RPi Zero with PrusaLink was like 10x faster.

How to reproduce Just upload file to MK4 printer. My Wi-Fi router Asus AX68U is 2 meters from printer only.

Expected behavior I expect at least 1MB/s upload speed like with MK3S+ with RPi Zero

G-code Any

Crash dump file does not exist any

Video

https://user-images.githubusercontent.com/28353840/232289548-fe246e2d-c3f7-478f-97b5-b351ec2e3d9f.mp4

Prusa-Support commented 8 months ago

Thank you all for your feedback.

I seem to understand this issue is based on the initial firmware from April 2023, because, originally, the transfer speed was significantly slower. It was improved shortly after with FW 4.6.1 (Apr 29, 2023), and further with FW 5.1.0. Rest assured, we will perpetually improve the firmware over time though.

Surely there is always room to improve the transfer speed and I understand not everyone appreciates binary G-codes, but please notice data transfer and USB writing were actually improved over time, and the .bgcode format can be disabled if the user wants. The G-code streaming is rather safe too as the print will pause in case of network failure, and can simply be resumed after (see release notes). However, even mildly detailed/large print - say slightly above 20MB - would probably fully upload during the print preparation, leaving adequate time for the user to monitor the process and the correct start of the print at once.

I wonder if we - or the author - could consider closing this issue which is populated with scattered problems and requests. We could close this one in favor of other more recent and specific issues. A separate listing of different issues would help us understand which of the mentioned problems is yet to be fixed, what aspect of the firmware is most concerning for the users, and where our developers should put their largest effort next since the development plans are still quite packed.

Michele Moramarco Prusa Research

abjugard commented 8 months ago

20MB should upload in seconds. When it does this issue could be closed.

t-makaro commented 8 months ago

G-code streaming isn't a solution until it works without the cloud, and so large files are still way too slow to upload with PrusaLink. (Wifi or Ethernet). Really, the raw upload speed should be almost 10x higher IMHO.

Dilbertus commented 8 months ago

Looking into it: (Hardware/Software) - I think we need an honest answer now - after waiting so very, very long. The options for improving speed are limited because someone chose to use inadequate (cheap) networking hardware - and in particular a simple, slow interface to the processor. What can you expect? Workaround with binary code, because software can't overcome bad design decisions? - And the hope that some developer will come up with a brilliant idea. Again: Please give an honest answer – not “we should close”. Am I wrong? Dilbert

abjugard commented 8 months ago

Please give an honest answer – not “we should close”. Am I wrong?

No this summarises exactly how I feel.

pwojewodzic commented 5 months ago

Same here... very slow uploading speed - both WiFi / LAN connection.

Prusa-Support commented 5 months ago

The transfer speed was undesirably slower than expected one year ago, when Prusa MK4 was released and this issue was opened. The transfer speed was improved within a few weeks, virtually solving this specific issue. Requests and reports after FW 4.6.1 (Apr 29, 2023) should theoretically be posted as a separate issue.

Connection stability, transfer speed, and writing speeds have been improved in various ways over the last year, bringing their parameters somewhere close enough to the hardware limits. I strongly suggest closing this issue, bearing in mind that: this is a device of limited data usage; external factors like router & distance can also play a role (only to some extent); further requests should ideally be listed separately.

I'm positive that we will see further improvements in these regards, however, more ideas and external contributions for further firmware improvements will always be welcome in the form of new separate issues - as specific, realistic, and concise as they can be - or Pull Requests - especially.

Michele Moramarco Prusa Research

abjugard commented 5 months ago

The transfer speed was undesirably slower than expected one year ago, when Prusa MK4 was released and this issue was opened. The transfer speed was improved within a few weeks, virtually solving this specific issue. Requests and reports after FW 4.6.1 (Apr 29, 2023) should theoretically be posted as a separate issue.

Connection stability, transfer speed, and writing speeds have been improved in various ways over the last year, bringing their parameters somewhere close enough to the hardware limits. I strongly suggest closing this issue, bearing in mind that: this is a device of limited data usage; external factors like router & distance can also play a role (only to some extent); further requests should ideally be listed separately.

Should we open a separate issue for Ethernet then? Or can you be more specific what you consider to be "close enough to the hardware limits", because uploads of a few mb over ethernet still take tens of seconds when they should be instant.

miltieIV2 commented 5 months ago

Firmware 6.0.0+14794 Switched from WiFI to Ethernet - no apparent improvement

I'm seeing 22 minute PrusaLink upload times for a 131356101/(22*60) = 99512 bytes pers second PrusaSlicer to PrusaConnect gave a weird offline error.

Dilbertus commented 3 months ago

Hello! I was kind of amused "close enough to the hardware limits", lol. Yes, that is true, but because you have chosen (as i wrote before):

inadequate (cheap) networking hardware - and in particular a simple, slow interface to the processor. > Could this circumstance be the culprit? One could see this "close enough to hardware limits" as far an admission as a prusa employee is allowed or willing to do. Anything wrong with this conclusion?

Yes, with this chosen hardware.. no more improvement is possible - but isn't prusa otherwise well known to offer updates? What makes things worse for me is that other printers in my farm (for a fraction of price) do the transfer fast, easy and effortless... As the saying goes: it must be possible, others do it too. I just find it a pity, I don't like to complain about Prusa.

In this light, one should use the findings for future decisions... e.g. chose components in designing new controller.. and this case really could be closed, unfortunately.

Dilbert

bkerler commented 1 month ago

I just found an issue with ethernet handling the connection as half-duplex although full-duplex is possible. PR #4171 will resolve that issue. It won't help for wifi ... the wifi implementation is a uart-to-ethernet esp32 bridge, so speed is really limited. So at least for wifi, a different hardware would be required. Regarding ethernet I'm sure that there are still speed improvements left.

abjugard commented 1 month ago

I just found an issue with ethernet handling the connection as half-duplex although full-duplex is possible.

So just to clarify, what you mean is that the printers networking stack thinks the connection is half-duplex, even though the switch and interface itself has properly negotiated a full-duplex connection?

So at least for wifi, a different hardware would be required.

Again, for clarification, you mean a new xBuddy board design here right?

Regarding ethernet I'm sure that there are still speed improvements left.

That is great to hear, looking forward to testing the changes once that PR has merged!

erwan commented 1 month ago

Apparently the NFC card for the MK4S also does Wifi, does that mean it will be using this new hardware for wifi?

bkerler commented 4 weeks ago

@abjugard Right now, the ethernet hw does feature duplex, but as a wrong hw register is being read, the connection is only set to half-duplex instead of duplex. This usually means that there are issues especially with huge transfers as the packets have to be resent many times. I could of course also have a big influence on transfer speeds, but right now I'm seeking for a way to test this.

bkerler commented 4 weeks ago

@erwan some claim that with the mk4s wifi board, wifi speeds have improved. That could be the case if an esp32 is being used instead of an esp8266. But imho I wouldn't expect much. And it's not a nfc card but a nfc antenna that is just plugged into the existing buddy port.

Prusa-Support commented 3 days ago

I seem to understand that full-duplex and NFC-antenna may not make a substantial difference but we will run further tests and make considerations. Thanks for your feedback.

Michele Moramarco Prusa Research