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.09k stars 215 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

arekm commented 1 year ago

(same for wired ethernet - 0.3MB/s)

H0nzik1 commented 1 year ago

(same for wired ethernet - 0.3MB/s)

OMG. I have tried also different USB drive which can do 100MB/s write speed, but it did not helped either.

arekm commented 1 year ago

For wifi:

https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/e688bdf53b0296267a67c31f21960c937193d89d/lib/WUI/espif.cpp#L71-L72 comment suggests that maximal possible MCU-ESP8266 communication speed (so then also wifi speed) is about 575KB/s (4.5Mbps) and it's not done because of some corruption.

For wired ethernet the driver copies between buffers: https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/e688bdf53b0296267a67c31f21960c937193d89d/lib/WUI/ethernetif.c#L241 which means it is not a zero-copy driver (like modernly written network drivers are, even for STM32 - https://github.com/lsgunth/lwip_contrib). Copying buffers will always be slow but no idea if that's the only reason for bad 300KB/s wired ethernet speed.

Fail-Fast-V0 commented 1 year ago

My upload speeds are unusable. I noticed the same problem with my Prusa Mini (also running a buddy board).

It seems that this is a problem with how Marlin upload files. It does it line by line.

H0nzik1 commented 1 year ago

Downloading gcode via browser is also insanely slow. obrazek

mrlinuxfish commented 1 year ago

I'm also having very slow uploads to prusa link on my MINI+. I think this may be a similar/ related issue. Uploading by browser is also very slow compared to uploading to the old solution which was a rpi3 running octoprint

levivoelz commented 1 year ago

Same. Uploads slow for me in Slicer then sometimes I get a 408 timeout error. I haven't tried in the browser but I assume it's the same problem.

gbsallery commented 1 year ago

Yes, same - as the wifi/Ethernet capability was one of the reasons for upgrading to a Mk4, this is somewhat disappointing. Are there any improvements on the way?

zuidwijk commented 1 year ago

+1 here (actually +2 as I've got two MK4's). One is running Alpha 5.0.0 and the other 4.6.2 ... both connected to my unify switch ... those speeds are bad, real bad.

n4bft commented 1 year ago

+1, this is an unusable level of slow. I've begun using a combination of a pi running usb mass storage gadget (to remotely load files on/off) and use prusa link to control the printer and start/stop prints.

jgreely commented 1 year ago

What is the intended performance of the ethernet and wifi for uploading print jobs? If it's not "multiple megabits per second", then it's just a checkbox marketing feature of no value to end users.

FYI, my 3-year-old Dremel 3D45 has lightning-fast uploads. I was about to buy a Mk4 to replace it until I found out I'd have to print via USB.

abjugard commented 11 months ago

Can confirm I'm also experiencing this. Fast USB-drive (I assumed this was the issue initially as the drive shipped with my MK4 kit was INSANELY slow), latest firmware (4.7.1), slow upload speeds both over Wi-Fi and Ethernet. Very irritating when uploading large gcodes. There has to be something we can do about this @Prusa-Support.

neuron-whisperer commented 11 months ago

+1

Transferring files to and from the MK4 (firmware 4.7.0) is often very slow - on the order of 100kb/second or less.

In general, slow transfer speeds are merely an annoyance, but the issue becomes more significant when transfers of larger files (> 20mb) result in a timeout. On several occasions, I have had to retry file transfers due to timeout issues. For one model that involved a 20mb file, repeated attempts failed, and I needed to retrieve the flash drive and copy the file manually.

The issues also occur for downloads of files stored on the printer - six attempts to download a 20mb file have all failed with timeout messages.

The odd part of this behavior is that the web interface is generally very snappy and responsive; it does not show the same dialup-quality connection issues as file transfer. Only file transfer operations appear to exhibit these performance issues.

abjugard commented 11 months ago

Same behaviour on 5.0.0 RC.

EDIT: It is in fact significantly worse on 5.0.0 RC in comparison to 5.0.0 alpha 4...

bobasaurus commented 11 months ago

I noticed something odd. WiFi prusalink file transfer speeds were pretty good in 5.0.0-alpha4, but when I upgraded to 5.0.0-RC it went back to being slow again. I tried updating the WiFi module software from the networking menu on the printer as well, it didn't make any difference. I think there was some regression of this issue between alpha4 and RC.

drchslrk commented 10 months ago

I noticed something odd. WiFi prusalink file transfer speeds were pretty good in 5.0.0-alpha4, but when I upgraded to 5.0.0-RC it went back to being slow again. I tried updating the WiFi module software from the networking menu on the printer as well, it didn't make any difference. I think there was some regression of this issue between alpha4 and RC.

Same here!

frozenfoxx commented 10 months ago

Same problem here, it's absurdly slow

devbyrd commented 10 months ago

Same. Very disappointed with this. Alpha/Beta or not, sub 1Mb isn't acceptable. Any thoughts from a prusa dev?

MartinMajewski commented 10 months ago

Uuurgh! I encountered this issue with my new MK4 a Minute ago. This is not usable in its current state. I will stick to OctoPrint. Very disappointing.

P.S.: I'm on the current 5.0.0-RC. Saw on Reddit that it might be a hardware issue with the bandwidth available to the system. Hopefully, it's not, and they can fix it in software.

bobasaurus commented 10 months ago

MartinMajewsk:

Speeds were pretty good on alpha4, but they're back to being slow again on the latest RC.

abjugard commented 10 months ago

MartinMajewsk:

Speeds were pretty good on alpha4, but they're back to being slow again on the latest RC.

Speeds were almost not terrible in alpha 4, that's a far cry from pretty good.

But they were indeed better.

santiac89 commented 10 months ago

Just discovered this after finishing upgrading my MK3S. Is there any update on it?

bca3244 commented 10 months ago

Bump... these upload speeds are extremely frustating.

abjugard commented 10 months ago

@josefprusa Can we get an official response on this issue? FYI, it's not just WiFi, it's Ethernet too.

TeTeHacko commented 10 months ago

no progress ? just have my MK4 and have same problem on Ethernet, speed is werry slow uploading od 11MB file is pain

FW version: 5.0.0-RC+11963

StephanCassel commented 10 months ago

@josefprusa We were just about to order three Prusa MK4 but have put the order on hold until the matter is clarified by Prusa. Was hoping to hear more from Prusa. Silence is not a good sign. We are very happy with Prusa products in general and hope it will be resolved soon. There are alternatives.

TravisWilder commented 10 months ago

@josefprusa We were just about to order three Prusa MK4 but have put the order on hold until the matter is clarified by Prusa. Was hoping to hear more from Prusa. Silence is not a good sign. We are very happy with Prusa products in general and hope it will be resolved soon. There are alternatives.

There is no Silence Josef as mention it last week and that it will be address - the new version should arrive this week

StephanCassel commented 10 months ago

Excellent news. Thanks 😊

CodePhase commented 8 months ago

I am running 5.0.0 and still have this problem. On my switch, the speed reports to be 100M Half Duplex. Just in case it's not clear, this is a hardwired connection; not wireless.

machinekoder commented 7 months ago

@josefprusa We were just about to order three Prusa MK4 but have put the order on hold until the matter is clarified by Prusa. Was hoping to hear more from Prusa. Silence is not a good sign. We are very happy with Prusa products in general and hope it will be resolved soon. There are alternatives.

There is no Silence Josef as mention it last week and that it will be address - the new version should arrive this week

I'm still seeing this problem with 5.0.1. I assume this was not the mentioned fix version? A lot of times the slowdown is followed with 408 HTTP error. Wifi or Ethernet doesn't matter.

The interesting thing about this is that it worked fine the first day or so after the new printer arrived. It only got worse over time.

EDIT: I managed to fix the problem in my case: I used the printer with Ethernet in the beginning. I moved it to another room after some time because of noise and switched to wifi. For convenience reasons I used the same static IP address for both interfaces, the main reason I chose to do that was because I thought only 1 interface is active at a time. Apparently this caused the problems. I've switched Wifi back to DHCP and left Ethernet with the static address, upload works again and also Prusa Connect, which also stopped working.

MartinMajewski commented 7 months ago

@josefprusa We were just about to order three Prusa MK4 but have put the order on hold until the matter is clarified by Prusa. Was hoping to hear more from Prusa. Silence is not a good sign. We are very happy with Prusa products in general and hope it will be resolved soon. There are alternatives.

There is no Silence Josef as mention it last week and that it will be address - the new version should arrive this week

I'm still seeing this problem with 5.0.1. I assume this was not the mentioned fix version? A lot of times the slowdown is followed with 408 HTTP error. Wifi or Ethernet doesn't matter.

The interesting thing about this is that it worked fine the first day or so after the new printer arrived. It only got worse over time.

EDIT: I managed to fix the problem in my case: I used the printer with Ethernet in the beginning. I moved it to another room after some time because of noise and switched to wifi. For convenience reasons I used the same static IP address for both interfaces, the main reason I chose to do that was because I thought only 1 interface is active at a time. Apparently this caused the problems. I've switched Wifi back to DHCP and left Ethernet with the static address, upload works again and also Prusa Connect, which also stopped working.

Even with different IP addresses, I have some connection breakdowns now and then. Most times, it is related to the utterly unintuitive behavior of PrusaLink, which considers the printer's status (like being in a filament-changing process while the file gets uploaded) but does not tell you what exactly caused the issue (in PrusaSlicer). Sometimes, the file has been uploaded successfully, and I still get an error response, or it cannot overwrite an existing file, which happens when you make only minor changes to the slicing settings that do not affect print time and generate the same filename.

It is a mess, and slow transfer speeds are only a part of it. I guess the "introduction of the innovative binary gcode format" is a PR stunt to work around the hardware limitations of the entire network interface.

TeTeHacko commented 7 months ago

yes bgcode and G-code streaming, new features, new bugs - https://github.com/prusa3d/Prusa-Firmware-Buddy/issues/3475 its only ugly workaround of the real problem ...

Dilbertus commented 7 months ago

Testing my Mini and MK4 - sadly this more and more looks like a bad joke - Where has all my money gone buying Prusa printers? Such a bad job of implementing all the network stuff, PrusaLink and connecting to Wifi - so embarrassing. I would be fired in my job (and even would fire anybody) delivering such a bad work. The PrusaLink feature a ... (bad) proof of concept... - not any more. Downloading shows 100% after a second - than waiting for minutes (Ethernet) without any progress bar.... Now is 6 MONTH later, other companies had constructed new printers with complete eco system in this time. bgcode is a awkward workaround - not a solution at all. Who ever is responsible for the software (excepted PrusaSlicer) should look for an easier job. This is imho no longer acceptable. Programming a web interface isn't rocket science - What am I missing?

samuelT2 commented 7 months ago

@Dilbertus Luckily it's your "imho" - Prusa stands out as one of the rare entities in the field where all the code is open source. If you have innovative ideas or believe you can contribute improvements, don't hesitate to create a pull request. While there might be some issues with over-the-air (OTA) uploads, personally, I find it to be a negligible concern, given the efficiency and ease of use of the entire ecosystem. I'm confident that a multitude of individuals are well aware of any existing problems and are actively working towards enhancing the situation.

Regarding Bgcode, some might perceive it as a somewhat awkward workaround. Typically, people prefer utilizing less space, but if that's not your preference, you can simply disable it. And please, spare me the "but I paid money and I want the full whatever" argument - conduct your research before making a purchase. If OTA bandwidth is a critical factor for you, perhaps consider exploring the latest "printers with a complete ecosystem" that have been developed within 6 months.

TeTeHacko commented 7 months ago

@Dilbertus Luckily it's your "imho" - Prusa stands out as one of the rare entities in the field where all the code is open source. If you have innovative ideas or believe you can contribute improvements, don't hesitate to create a pull request. While there might be some issues with over-the-air (OTA) uploads, personally, I find it to be a negligible concern, given the efficiency and ease of use of the entire ecosystem. I'm confident that a multitude of individuals are well aware of any existing problems and are actively working towards enhancing the situation.

Regarding Bgcode, some might perceive it as a somewhat awkward workaround. Typically, people prefer utilizing less space, but if that's not your preference, you can simply disable it. And please, spare me the "but I paid money and I want the full whatever" argument - conduct your research before making a purchase. If OTA bandwidth is a critical factor for you, perhaps consider exploring the latest "printers with a complete ecosystem" that have been developed within 6 months.

So put it this shitty slow speed of all ethernet inerfaces to printer specification. I expect more than few Mbps on "LAN" interface in these days, if i know this before i will probably buy another printer but i stupidly thinks that 100Mbps interface or modern wifi works as usual not as modem line before 20 years

abjugard commented 7 months ago

@Dilbertus Luckily it's your "imho" - Prusa stands out as one of the rare entities in the field where all the code is open source. If you have innovative ideas or believe you can contribute improvements, don't hesitate to create a pull request. While there might be some issues with over-the-air (OTA) uploads, personally, I find it to be a negligible concern, given the efficiency and ease of use of the entire ecosystem. I'm confident that a multitude of individuals are well aware of any existing problems and are actively working towards enhancing the situation.

Regarding Bgcode, some might perceive it as a somewhat awkward workaround. Typically, people prefer utilizing less space, but if that's not your preference, you can simply disable it. And please, spare me the "but I paid money and I want the full whatever" argument - conduct your research before making a purchase. If OTA bandwidth is a critical factor for you, perhaps consider exploring the latest "printers with a complete ecosystem" that have been developed within 6 months.

Being open-source is great, but it doesn't excuse shitty implementations, which this absolutely is.

I wouldn't go so far as to say I would have bought another printer solely because of this. But they are advertising PrusaLink/PrusaConnect as features, and the transfer speed at present is not anything anyone in their right mind would be expecting from a high-end device in 2023.

If the problem is ultimately a slow bus to the display-mounted USB drive and not solvable via code, then allow us to use the USB-C port for storage if we want, those relying on network transfers won't need easy access to the USB drive anyway.

jedisct1 commented 7 months ago

To counterbalance this negativity. Since the firmware update (+ wifi firmware update), I've been satisfied with the time it takes to upload models to the printer.

Binary GCode can be called a workaround, but it's actually an improvement (less storage space required), and as a side effect, models don't take long to transfer.

The web UI had issues with Safari, but they have apparently been solved in the latest firmware.

vindolin commented 7 months ago

To counterbalance this negativity. Since the firmware update (+ wifi firmware update), I've been satisfied with the time it takes to upload models to the printer.

O RLY? How big are your models? Complex, bigger models e.g. with higher infill and gyroid pattern take FOREVER to upload using wifi or ethernet, even as binary files. My mk3s with a flashair card runs circles around a mk4 no matter what file type.

abjugard commented 7 months ago

To counterbalance this negativity. Since the firmware update (+ wifi firmware update), I've been satisfied with the time it takes to upload models to the printer.

O RLY? How big are your models? Complex, bigger models e.g. with higher infill and gyroid pattern take FOREVER to upload using wifi or ethernet, even as binary files. My mk3s with a flashair card runs circles around a mk4 no matter what file type.

Which is totally bonkers. A FlashAir card is a damn €40 SD card that besides implementing storage, also contains a WiFi implementation that beats wired networking on an €1199 high-end 3D printer. That's insane and completely unbelievable.

samuelT2 commented 7 months ago

As a noteworthy addition, I'd like to highlight that with the latest firmware update (5.1.0), my printing process now commences promptly, thanks to the newly integrated streaming feature (independently of the file size and g-code format):

With G-code streaming support, you can start the print without downloading the entire file to the printer beforehand. Instead, only a small portion of the file is downloaded, allowing the print job to start almost immediately. The remaining G-code is automatically downloaded while the print is in progress. In most cases, the print starts within seconds.

(from the release 5.1.0 notes)

vindolin commented 7 months ago

With G-code streaming support, you can start the print without downloading the entire file to the printer beforehand. Instead, only a small portion of the file is downloaded, allowing the print job to start almost immediately. The remaining G-code is automatically downloaded while the print is in progress. In most cases, the print starts within seconds.

Ok, that's a clever workaround if it works, I'll give them that.

neuron-whisperer commented 7 months ago

The last thing in the world that 3D printing needs is yet another failure mode. What happens if you start streaming the model, your printer starts printing it, and then you have a network failure that interrupts the stream?

I will never use this feature. I will always want to see that my model is 100% uploaded, stored, and preprocessed before hitting the Print button.

abjugard commented 7 months ago

I will always want to see that my model is 100% uploaded, stored, and preprocessed before hitting the Print button.

Corruption free, which the current networking stack doesn't seem to promise.

t-makaro commented 7 months ago

I just realized in the patch notes: PrusaLink the G-code streaming / Instant Printing features is not supported. Well that's a shame. Locally over PrusaLink would be a more reliable network connection with the only thing that would ever take out that network is a full power outage (for me at least). I don't really want to use cloud enabled printing.

Icenor commented 5 months ago

So almost a year later and nothing has changed. Have Prusa no plans of fixing this?

machinekoder commented 5 months ago

So almost a year later and nothing has changed. Have Prusa no plans of fixing this?

Well, the current state may not satisfy all users, but saying that nothing has changed is also not correct. For me, the network stack became a lot more stable and the binary gcode feature makes the files small enough to not be annoying anymore. But yes, I can see that with bigger files this still is an issue and not at the expected level of a 2023/2024 device.

TeTeHacko commented 5 months ago

bgcode is only ugly workaround of the real problem and i didnt see any change here and please dont mention gcode streaming as another solution/fix for this problem until it works on local network and not on cloud only and streaming is of course another workaround not fix of real problem ...

abjugard commented 5 months ago

It should be noted that since print times where the files are large are generally measured in hours, an upload taking a few minutes might not matter to a lot of people, and I'll agree with the people saying that there are/have been more serious issues to address, which I'm sure is how Prusa has prioritised internally as well.

All I personally need is an acknowledgement that this issue isn't forgotten, is deemed fixable, and will eventually get prioritised once the XL, MK4 and MMU3 happy-case flows are stable and all corruption issues are ironed out.

erwan commented 5 months ago

It should be noted that since print times where the files are large are generally measured in hours, an upload taking a few minutes might not matter to a lot of people, and I'll agree with the people saying that there are/have been more serious issues to address, which I'm sure is how Prusa has prioritised internally as well.

Many people still want to monitor the few first layers of their prints, so in that case you still need to wait.

And yes, it's not the most serious issue out there but it's frustrating because it's hard to understand how network can be that slow in 2024... I don't know of any device released in the last 10 years that has such a slow network stack.

abjugard commented 5 months ago

It should be noted that since print times where the files are large are generally measured in hours, an upload taking a few minutes might not matter to a lot of people, and I'll agree with the people saying that there are/have been more serious issues to address, which I'm sure is how Prusa has prioritised internally as well.

Many people still want to monitor the few first layers of their prints, so in that case you still need to wait.

And yes, it's not the most serious issue out there but it's frustrating because it's hard to understand how network can be that slow in 2024... I don't know of any device released in the last 10 years that has such a slow network stack.

Completely agree on all your points.