![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
I use a cheap USB 802.11n WiFi adapter for my junkyard PC. (An Edimax EW-7811Un, which is just a wrapper around the Realtek RTL8188CUS chipset... or maybe the RTL8192CU, it's kind of unclear.)
And it worked great when I was running from an Ubuntu live disk! Slow, sure, but fine. But a little while after I got Windows 10 up and running, it got REAL flaky — losing the default gateway and dropping me off the internet while still claiming to be connected to the network, every 5 or 10 minutes. (A fast way to provoke this was downloading multiple games in Steam, but it would also just do it unprovoked.) I could get back online by running the "network troubleshooter" (which just reset the adapter, lol), but it would just break again in 5-10m.
BUT. I think I've finally got it fixed.
Searching the web for info on this kind of issue is kind of a nightmare, so I present this guide as an offering, in hope that it’ll cross the path of the next person wrestling w/ this problem. Godspeed. (And if you're not having this problem, maybe bail out now, because this is really not a good use of your time.)
The Problem:
- You have decided this is almost definitely a driver problem.
- After all, the same adapter was working fine with the same router in another operating system (like Windows 8 or Linux).
- And from trying other stuff, it didn't seem to be a problem with the whole Windows network stack, since ethernet was working fine... although you might have the same problem with a different cheap wifi adapter, because they all seem to use the same chips provided by Realtek and might have similar driver issues.
- And the driver was weirdly old, like from 2015 or something! Wasn't there a huge WPA2 vulnerability in 2017? (Yes, it was called "Krack.") So you'd think any wireless device would have a driver from AT LEAST after that! Something's definitely up.
- But! you can't update the driver in the normal way, because Windows says you're using the best available driver. If you downloaded the newest drivers for your device from the manufacturer's site, they don't seem to be any newer than what you've got.
- So, you probably need a newer driver... but you can't seem to find one for your device.
The Fix:
A Reddit post I found suggested finding a newer Windows 8 driver and installing it, but I couldn't find one for my device. If that works for you, sweet.
But there's also another approach: There are newer drivers out there for other devices that are actually secretly for your device (because all these cheap adapters use the same damn Realtek chipsets). The trick is finding them!
Finding Bait
First, gather your details. Write all this stuff down, probably in a text file for easier copy/paste.
- Find the manufacturer and model number of your device, somehow.
- Go to the Windows device manager to find the description (mine was something like
150Mbps Wireless 802.11bgn Nano USB Adapter
) and current driver version, which probably includes a year somewhere in it (mine was something like1027.4.630.2015
). Finally (and this is the weirdest part), crack open the current driver's
.inf
file and find the name (usuallysomething.ndi
) of the actual DDInstall section it wants to use, plus a hardware ID that works with your device. To do that:- Download the most recent drivers you can get for your device, unzip the package, ignore the "setup" stuff, and look for the actual driver folder it would use for your OS and architecture (mine was a folder like
<unzipped directory>\RTWLANU_Driver\Win10X64
). - Open the
.inf
file in a text editor. Search for the description you found earlier, and you'll probably find it being assigned to a variable in the Strings section, like this:
EDIMAX.DeviceDesc = "150Mbps Wireless 802.11bgn Nano USB Adapter"
Then search for that variable name and find the line (in a Models section) where it associates that description with a DDInstall section name (
something.ndi
) and a hardware ID value (USB\VID_XXXX&PID_XXXX
). Like this:%EDIMAX.DeviceDesc% = RTL8192cu.ndi, USB\VID_7392&PID_7811
- Write down the
something.ndi
value and the hardware ID. They'll both be important later.
- Download the most recent drivers you can get for your device, unzip the package, ignore the "setup" stuff, and look for the actual driver folder it would use for your OS and architecture (mine was a folder like
- If you REALLY plan to go off-road and you understand how to find the lists of hardware IDs and compatible IDs for a device, go ahead and do that; if you get REALLY unlucky, you might still be able use those to find something usable. (Likely you won't need to do that.)
Next, do some research:
- Go to one of the info sites that Linux people use for keeping track of all the crap they need to make drivers for. I had some luck with "WikiDevi".
- Find your device in that site, or something close enough to your device. Here's mine. Find the Realtek chipset that powers the device, and also look for the name of the Linux driver.
- Search the same site to get info on that chipset and/or Linux driver, and find the list of other devices that use it and seem real similar to yours.
Fishing
Next, start looking for Windows 10 or 8 drivers for those real similar devices! Start with your own device's manufacturer, and download drivers for anything that does the exact same job and looks like it might be powered by a similar-ish chip. Try to only get drivers from the manufacturer's website, don't go looking for malware trouble.
Later, if those don't pan out, look at the list of devices from the Linux wiki and go to their manufacturers' sites (starting with the most reputable-looking ones whose names you've heard before, since they're the most likely to actually update their drivers). Find the devices from the wiki list, download their drivers, and hit up anything really similar but unlisted while you're in there.
Cleaning the Fish
Now you need to unzip the driver packages, one by one, and see whether your device can use them. This is similar to what you did to find the something.ndi
value above:
- Find the folder for your OS and arch.
- Open the
.inf
file in a text editor. - First, check the
DriverVer
value near the top of the file and make sure it's newer than yours; if not, delete and move on. You probably want one from 2017 or later, but follow your own instincts. Next, search for the DDInstall section name (
something.ndi
) you found in your original driver. (There might be several occurrences of that string, so make sure to search the whole file.)- If you're unlucky, that string won't be anywhere in the new INF file. Delete that batch of drivers and move on to the next one you downloaded. (If you're extremely off-road by now and are attempting a Hail Mary, you can search for your hardware IDs and compatible IDs instead of the DDInstall section, but I don't know for sure whether that would ever work — basically it would mean that Realtek had changed the way their driver installers are organized at some point, and it looks like maybe they strenuously avoid doing that.)
If you're lucky, you'll find a line that looks exactly like the one from your original INF, with the same description variable name,
something.ndi
, and hardware ID (USB\VID_XXXX&PID_XXXX
)! If you find a direct hit, and the driver is new enough to be worth it, move on to the next step.In my case, I got a direct hit with the drivers package for the EW-7722UTn V2. Which I think doesn't even use the same chipset! But it was carrying a new version of my driver along for the ride anyway, probably because Realtek gave them a big wad of stuff on Krack disclosure day and they didn't bother to sort it.
- If you're only sorta lucky, you'll find several lines that use the same
something.ndi
name, but they might be for different devices or even from different manufacturers, and they probably don't have the same hardware ID. You'll have to make the call yourself: you can continue on with one of these, or set it aside for now and keep looking for a direct hit, coming back later if you have to.
Leave the .inf
file open in your editor.
Cooking the Fish
Once you've got a driver you're willing to use, make some small adjustments to the .inf
, if necessary:
- If you didn't end up with an exactly identical line but it's using the same DDInstall block name, edit the
USB\VID_XXXX&PID_XXXX
value to exactly match the one from your original driver, to fool Windows into thinking it's suitable for your device. This is probably somewhat risky, but you're probably desperate if you've already read this far, and I don't think it'll make smoke come out of anything. - Optionally, find the place where the description variable for your chosen line is defined and tweak the actual description so that you can distinguish between the old driver and this new one. (This ends up being the name that appears when Windows gives you a list of drivers to pick from.)
- Save and close the
.inf
file.
Then install it:
- Right-click the
.inf
file and choose "install." - Approve any stuff. If you edited the
.inf
at all, it will probably complain about the signature being invalid from your edits, but that's expected.
Then go to your device in the Windows device manager and try to upgrade the driver.
- Right-click it and choose upgrade.
- Tell the wizard you want to choose your own driver, instead of letting Windows choose.
- There's a browse button, but ignore that; look below and click the bigger button that says "choose from a list of installed drivers."
- Find the driver you just installed, and update to it. (Hopefully your tweaked description helps; I forgot to do that and had to do this step twice because I picked the wrong one the first time.) You might need to uncheck the "compatibile hardware" thing, but I think you won't as long as your device's hardware ID was in there.
- Confirm that it's using the newer version number! The manufacturer might be listed as something different, depending on how your luck was... but probably that's fine.
And then hopefully you're good to go.
Good luck.
Of course, I'm probably going to replace the damn thing eventually anyway because the download speeds are so heinously slow. Earlier I used connection sharing via Ethernet to plug the PC into my MacBook's wireless, and it was literally like ten times faster.
Well, still, I was offended that I couldn't understand what was going on and I really wanted to win, so I guess it was worth it just for that.