I'm finishing setting up a used laptop (ca. 2015?) with a pretty current version of Debian. I have a USB wifi device that worked with a Raspberry Pi a few years ago. It's an rtl8192cu. To get it to work initially I had to follow the advice here, using
ln -s /dev/null /etc/systemd/network/99-default.link
Now, it comes up, but after about 5 minutes it drops. However, running ip statistics continues to list wlan0 as UP with no dropped packets. The Gnome status bar still shows a connection. However ping says Destination Host Unreachable. And, if the IP statistics are always up to date, about 300 packets are received without errors from probably Youtube after a ping fails.
Pulling out the USB stick and reinserting brings it back up.
I've looked at dmesg and /var/log/syslog for clues. There isn't anything obvious, but one odd thing is when the USB stick is plugged in, it tries one firmware, fails, tries a second firmware, fails, tries the second firmware again and succeeds.
Is there another log I should look at?
Any idea how I might prevent these drops or at least make recovery quick and effortless?