6
endor
6y

There is no joy in life

So I finally managed to set up networking on my 3D printer's raspberry pi: now it can connect to my phone's hotspot or to my uni's wifi network, depending on which is available.

Then I set up OpenVPN, using a remote server as a middleman so I can connect to the printer remotely and start/stop/monitor prints from anywhere.

Everything works great, except for one thing: whenever the Pi connects to the uni's network first, OpenVPN fails to start and connect to my server, rendering the printer unavailable (unless I use an ethernet cable, but that's not a viable operation since I need to lift the printer, and it's heavy).
The only for it to work as intended is to either:
a) keep my hotspot active (which kinda defeats the point), or
b) let it connect to my hotspot first (so that OpenVPN can start properly) and then turn off the hotspot, allowing the printer to reconnect to the uni's wifi and reconnect to my vpn.

Why won't things just work the way they're supposed to? 😭

Comments
  • 1
    "There is no joy in life" /thread lol

    did you look why it fails to start though? sounds like it just takes longer to connect to the uni wifi and some timeout is thrown.
  • 1
    @JoshBent yep, I think that's the issue (the uni's wifi signal strength is very weak in that room), and I've tried to look for a solution but I couldn't find anything useful.
    What's weird is that restarting the service after a while doesn't help either. The only thing that seems to help is restarting the wlan adapter (ifdown/ifup) manually, so I'm thinking of a script/cronjob to reset it automatically ~2 minutes after booting
  • 2
    @endor a better wifi adapter could help, I remember it worked wonders to get that 1337 haxxor wifi adapter everybody uses for kali installs, to get a much better range
  • 1
    @JoshBent yeah those are cool, but the Pi is buried inside the belly of the printer so there's not much room for large adapters in there :/ (also it's not my personal printer, so I am not spending a single penny out of my pocket for that lol)
  • 1
    @endor oh, well there would be an option to drill a hole to pass just the cable through to the pi, but yeah if it's not actually your business, then don't fuck too much around with it
  • 1
    @JoshBent lol, yeah non gonna fuck about with a 2500€ printer 🤣
  • 1
    @endor aluminum foil antenna with foil stolen from the cafe?
  • 1
    You could maybe setup Bluetooth tethering...

    Your phone connects to the uni's wifi and then your printer connects to your phone by Bluetooth and gets internet from there...

    This is probably a painful hack, but unless there's usb ports you can access you're kinda screwed...

    Or, if you can find one, try getting a USB wifi dongle with antenna support, and make a long ass antenna which you duct tape on top of the printer or some shit lol
  • 0
    @FMashiro the whole point is to *not* have my phone there, so that I have remote access even from home.
    And as I said above, there's not enough room for wifi dongles in there
  • 0
    @endor I mean, you coud setup a repeater I guess... Bigger hack, and requires you to have a semi permanent setup...

    Or you could increase the timeout.

    Also, are you sure those 5mm dongles don't fit? They barely stick out of the USB port
Add Comment