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.13k stars 219 forks source link

[BUG] Setting static IP causes prusa connect to always refuse connection #3549

Open markaabo opened 9 months ago

markaabo commented 9 months ago

Printer type - MK4 Kit

Printer firmware version - 5.1.0

Original or Custom firmware - Original

USB drive or USB/Octoprint - USB drive

Describe the bug When setting static IP via prusa_printer_settings.ini (As mentioned in #3101) prusa connect always refuses the connection never allowing the printer to get a code and makes it ALWAYS fail acquiring of code.

Additional info: my printer is connected via WIFI (ethernet not available) and when trying to set the static ip via wifi router settings, the printer never connects and the router generates an error causing the router to block internet. which is why i have set the static ip via the ini file, the reason why i need to set a static ip is stuff like Home assistant and networking issues, which don't like the ip of the printer to change. and the reason why the ip changed i don't know, literally one day the printer just wanted a different ip even tho the normal ip was available for use.

How to reproduce Use prusa_printer_settings.ini (As mentioned in #3101) to set static IP Try to acquire code for prusa connect

Expected behavior For prusa connect to work and allow the connection

TojikCZ commented 7 months ago

Hi, unfortunately setting static IP on buddy is clunky. I have managed to do it. It CAN work.

You have to set the DNS servers in the [network] section of the config

so you have your wifi or eth ::ipv4 section with addr, mask and gw + the network section with dns4. Also, avoid leaving comments

To load the settings, go into Settings, System, Load setting from file, the other load wifi settings or connect settings read just a part of the file, not the whole thing.

prusa_printer_settings.ini doc: https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/860909b34e4cd7f116b4e803d1abd21dec2e145b/doc/prusa_printer_settings.ini

ChiefPoints commented 5 months ago

This is still an issue for static IP's, I'll edit my current prusa_printers_setting.ini to add in the DNS section - I improperly assumed it would pick it up from the gateway address. Prusalink works fine, just couldn't get it to register without Prusa Connect. Perhaps the devs can update the error message it gives with "hostname not found", instead of just saying "Failed"

github-actions[bot] commented 2 months ago

This issue has been flagged as stale because it has been open for 60 days with no activity. The issue will be closed in 7 days unless someone removes the "stale" label or adds a comment.

markaabo commented 2 months ago

This is still an issue, it's still doesn't work like it should

ChiefPoints commented 2 months ago

Yes, this issue should not be closed until it's actually fixed.

danopernis commented 2 months ago

Hey folks, we tried to reproduce this on 6.0.3 and according to our testing, this is working. We used following INI file for testing:

[network]
hostname = knoblet
dns4=10.67.22.1

[wifi::ipv4]
type=static
addr=10.67.22.88
mask=255.255.255.0
gw=10.67.22.1

FWIW, we are working on a GUI to improve debugging network-related problems, because at the moment printer doesn't really tell you what is wrong with the configuration. I can't give you ETA on that. In the meantime, please double check that all of those field are setup correctly. You can load the INI file via Settings -> System -> Load Settings From File

Prusa-Support commented 1 week ago

Hi everyone. Because the connection and static IPs can fail in many different ways, and for several reasons that are not strictly related to the printer's firmware, in FW 6.1.2 our developers implemented the new "Network Status screen" in the hope to help advanced users debugging connection at various levels.

The new interface provides information about latency and rate of data package delivery failures at several levels of the connection: connect (our server), gateway (router), DNS server (local/provider server).

[!TIP] If DHCP works but static doesn't, it may quite likely be the case of a problem of static IP configuration, or a problem of settings on the router' side. In case of large networks, the chosen IP address should be outside of the DHCP range to avoid conflict of address.

In addition, users now can set their own hostname and forget about IPs via the new "User-configurable hostname" feature implemented in the same firmware release.

Michele Moramarco Prusa Research