Weirdest issue ever... For years, through countless versions: not able to connect to OP via web or SSH! Reconnects after print is finished. Tryed it ALL

I am using OP for years now but only recently returned to 3D printing after a longer break (1-2 years). The problem started a while after I first installed OP on my RPi3 around 4 years ago. I remember trying everthing I could think of back in the day and now here I am again. I am quite tech savvy so plz dont spare me.

  • Problem details:

I can use OP via the web interface as long as I want and controll the printer, play around on the controll/temp tabs. There is no action I can perform that reproduces the problem outside of printing via OP, even if it is connected for several days.
A variable time after a print starts (5-20min) OP becomes unreachable via the web interface, via SSH and I dont even get a ping response (doesnt matter what device I use). The router shows my Pi is still connected during this time though... Wifi signal is excellent the whole time.
During this time OP prints on without any issues achieving top quality without signs of connection/transfer issues. Even timelapse works fine.
After the print is finished most of the time I can reconnect within 1-5 minutes. If this is the case the RPi did not restart and I can continue exactly where I left. Rarely I am not able to reconnect after printing finished and need to power cycle.

  • Hardware:

Printer:
Was a Wanhao I3 (Melzi board) when I bought it. Now its an abomination :smiley: with a SKR 1.4 running Marlin 2.X bugfix.

Raspi:
Raspberry Pi 3 Model B ARM-Cortex-A53 4x 1,2GHz, 1GB RAM - no overclocking, passive cooling block, doesnt run hot.
Used a quality 2A micro USB power supply until a week ago, when I switched to a quality 2.5A PSU just to check.
Some Logitech Webcam (doesnt make a difference if its connected)

Router:
TP-Link Archer running OpenWRT (used a different one before, no difference), no issues at all.

  • What did I try?

Tryed multiple Octoprint FW Versions over the years and had several clean installs on different high quality SD cards. Latest clean install was around a week ago.

Printer mainboard swapped from Melzi to SKR 1.4

Tryed without any plugins and without webcam

Applyed electrical tape to the 5V pin on the USB connector a few days ago.

Tryed different USB cables.

Used different high quality power supplys for the RPi

Maybe a lot more I cant remember

  • What did I NOT try?

Never used a different RPi since I only have a Pi zero around and dont want to get another one. Running other software on the RPi doesnt cause issues though and there are no apparent hardware issues or hints of such in my opinion.octoprint.log (81.1 KB) freaked.zip (14.1 KB)
syslogs.zip (122.6 KB)

Hello @freaked !

Could you please share the logs?

Oh, very sorry, I downloaded some but forgot to add them.

I dont really know what to look for so I hope you can help me out.

In fact I skimmed one log right now and saw a low voltage error for the first time. Guess I´ll have to try a third PSU now. Shouldnt a 2.5A PSU be enough?

added the logs to my first post.

Edit: Looked at some older logs and couldnt find any undervoltage warnings, so it seems that only the latest PSU causes this. I just installed another one to try.

Edit: Added Syslogs too. Really looks like the undervoltage only started 2 days ago when i changed the PSU

Try hard wiring the pi with an ethernet cable, the wifi sucks on all of them, even my Pi4 .. make sure you disable the wifi and I have gone as far as removing the device .. had to google that when setting up my Pi4 for kodi..

Thank you, I´m a ethernet lover myself but I just dont want to drill holes through 2 40cm brick walls just for that Pi. Also I cant imagine that it has to do with the onboard WiFi because:
-Pi says excellent reception
-Router says that Pi is still connected during "downtime"
-Looses connection ONLY while printing

  • Run a sudo apt-get update && sudo apt-get upgrade on the Pi. It's possible that a newer driver stack won't have problems with Powerstar-related features like trying to save power by turning off network devices.
  • Verify that your router isn't short-leasing IP addresses in the DHCP service. It's possible that the router has dropped the lease on that IP address and issued a different one.
  • Whenever you get problems with inability to reconnect later, I usually just recommend a combination of issuing a static IP address at the router for your Pi's MAC address as combined with then creating a HOSTS file entry for it on your workstation. So name lookups are no longer a problem. Note that there's an Avahi behavior that might broadcast your Pi as octopi-2.local instead of just octopi.local if you've moved the microSD back and forth.
  • 802.11 wifi shares the same frequency as microwave ovens; this is the actual reason why wifi isn't regulated by the FCC since it's technically a junk range of addresses. It's the resonant frequency for water molecules so it's too trashy, really, to be used by a bonafide radio device, if you will. In theory, an aquarium would be an awesome wifi shield. I know for a fact that a tree blocks wifi signals (leaves are mostly water).
  • Blocky metal objects like a chain-link fence or an old-school radiator wreak havok on radio signals. The object gets a signal induced and then re-transmits it. Try using Bluetooth headphones and walking past a metal fence.

Thank you @OutsourcedGuru !

I just started an overnight print using a different PSU again.

  1. Will update after getting up tomorrow, since quarantine has me, I have all the time in the world.
  2. My RPi has a static DHCP lease (set on the router) so there should not be any issues. I take that as confirmed since my router still lists the Pi as connected while its printing and not accessable
  3. See above, also I am connecting via the static IP
  4. Hah yeah, nice trivia! Reminds me in the days when my mates and I built a wifi network across a few streets using huge selfmade wifi antennas :smiley: ... yep, in the end it was a huge pain in the ass but sharing mp3 files and playing Counterstrike sometimes(!) worked if the weather was okay
  5. My router is only around 5m from the RPi, seperated by two 40cm strong brick walls. Thats not a problem for 2.4GHz (5GHz would have trouble). In the same room sits my wifi printer and both show excelent signal strength.

Thank you very much for putting so much effort in your response!

I will report back tomorrow.

OK, its getting more interesting now...

Using the PSUs that cause a undervoltage warning in the log it was always possible to connect to the webinterface. I´ve switched back to the original PSU that doesnt cause undervoltage warnings and disconnected the webcam and the problen is back again - can´t access the webinterface while it is printing.

Anyway, I just ordered a 5V 5A PSU and I´m printing a new case so I can install a fan. Place your bets gentlemen!

I would place my bets on that crappy wifi adapter.. Run a long cable and eliminate Wifi just cause it is simple to do and is a known issue with the RP. Mine would not work (was connected) with the pi next to the access point even though it was connected.. just sayin.. eliminate the simple stuff. Good luck

2 Likes

I had similar problems when I used a pi-3B and wireless. I never lost contact completely and could usually still access it during printing, but sometimes it became really really sluggish -- slow to respond, terrible webcam stream, to the point of being unusable -- and typically only when printing. This was in same room with wireless router less than 15' away, no walls. The final solution for me was wired ethernet, which completely solved the issues.

The 3B+ and 4B have improved wifi, but I had nothing but trouble with the 3B's built-in wifi. As @airscapes suggested, temporarily using a long ethernet cable would be a quick way to prove the problem was indeed related to wireless. If it is and going wired isn't an option due to your walls, you might consider upgrading to a 3B+ or using a usb wifi dongle instead of the 3B's built-in wireless. Power-line ethernet might be another route to try.

My problem is that I dont even have an ethernet cable around that is long enough. On tuesday i should get my 5V 5A power supply, that should be interesting.

I didnt know that I could just use a WiFi dongle. I have a really good one around. How would I use that on OctoPi?

Well, why not just move the printer and the pi to where a short cable will work.. it is only a test..

Would be no problem if the printer wasnt in a custom enclosure thats fixed into place. The wires go through a hole in the enclosure to the controll box and PSU so I would have to detach all the cables and reattach them. But just for the sake of troubleshooting I will move the router closer to the printer if the new PSU wont do the trick.

Help on using a WiFi dongle would still be appreciated.

Edit:

This brings up another mod I once planned to do.... I thougt about using connectors to make removing the printer from the enclosure easier. Do you have any suggestions? My crimping tool does: PH2.0, XH2.54, KF2510, JST, Molex

No idea, I built my enclosure with a front, side and top door and routed cables under the door so the printer will just lift out when needed. I have never needed to remove the printer as I use drop on hinges on the front door so it lifts off. Good luck with your trouble shooting unfortunately I do not know anything about the external wifi adapter but I assume it plugs into the USB port and is configured at boot.. Google whatever brand you have along with pi and see if there are instructions on how to configure it,

Not an expert on this, so hopefully someone else will chime in... but first step would be to disable on-board WiFi by adding this line to /boot/config.txt, then plug in dongle and reboot:

dtparam=pi3-disable-wifi

That should allow the dongle drivers to load as wlan0, and then I think your existing ssid/password info in wpa_supplicant.conf will get used by the dongle.

You couple by a wireless to ethernet bridge and see If plugging the PI in via ethernet and letting a stronger device handle the Wifi