Running Ubuntu 16.04 the WiFi-only computer has a marginal connection to the router. Usually it works for hours on end and even has worked for days.
It is using a rt2800usb external USB WiFi adapter (it claims 3000mW) with a 14 inch antenna on it. (Perhaps I need a yagi or a dish?)
I never use suspend; just lock. This is a computer located out in a workshop but I do use RDP to access it for various tasks (like monitoring the workshop and CPU temperature environment with an Arduino connected via USB).
To the problem at hand: Occasionally the connection drops. I'm not sure why but it will drop the connection entirely from time to time.
To fix it requires logging in out there and using the up/down icon to shut off Wireless then turn it back on. Then it will again go for hours or days working fine.
It would be preferable if it could reconnect itself when this happens.
The only other questions I see here on this subject are like 5 years old and for previous versions, or involving suspend. None match the conditions of this box.
So, the question is in the title. How can I set up 16.04 to automatically reconnnect when it drops off?