Raspberry Pi 3 disconnects from WiFi

My modified legacy BrewPi (with Tilt and bubble counter integration) works beautifully, however it occasionally disconnects from the WiFi network. I have searched the internet at length and none of the commands I have tried successfully reconnects it. I have to reboot to get it to reconnect. Any advice, or suggestions of sources on the internet I could follow would be most appreciated.

Unfortunately I can’t resort to a cable connection as I can’t fit in a cable with the way it is mounted in the control box…

To clarify: this is about a Raspberry Pi, or about a Spark?

It is a Raspberry Pi 3 that I am having trouble with.

Wifi disconnects can have dozens of causes. It’s hard to tell without more information. Some generic tips (assuming the issues is with the Pi and not with the signal):

  • Whenever there is an intermittent problem / instability with a Pi, my first thought is always the power supply (unstable or underpowered old phone chargers cause a lot of problems).
  • Connect a screen and keyboard to your pi after the network has disconnected and inspect dmesg, sudo journalctl and iwconfig to look for clues why the disconnect happened.
  • Try to run some network activity in the background the whole time to see if that keeps your connection alive. E.g. ping & (replace with your router IP).

I am using the power supply that came with Pi so I assume (hope!) it is good.
Next time it disconnects I’ll run those commands to try and get a clue. I have a small 320x280 TFT display and a wireless keyboard, so I can interact with it but seeing things in the GUI is problematic, and my Linux command line skills are not good enough for debugging, so tips like this help greatly! Thanks. Will let you know how it goes…