Make Windows switch Wi-Fi adapters when second one is plugged in?

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
I'm fixing up an old laptop for my niece that has an old 2.4GHz 11n Wi-Fi adapter in it, which can't be upgraded much because Lenovo locked it down to whitelisted adapters in the BIOS. I'm plugging in a TP-Link T2U Nano which is much faster thanks to 5GHz, even if it's only going to max at 433Mbps. I don't want to disable the internal adapter in the BIOS so that Bluetooth will still work, and I'd like to leave it enabled in Windows so that if needed the T2U can be unplugged and it will still have basic connectivity. I found when plugging the T2U back in, Windows just stays connected on the internal adapter and doesn't reconnect with the T2U, even if they both were connected when I unplugged it.

Is there any way to force it to always reconnect even if the internal adapter is connected? I just want to make is automatic so there's no need to remember to click the icon and select the adapter and connect to the SSID, and they can just both always be connected to her home's SSID. (Windows automatically uses whichever route has the better connection, so it will choose the T2U's 5GHz link.) Otherwise, when the T2U is unplugged, it should switch to the internal automatically, but then have to be manually switched back when the T2U is plugged in again.

Not a crippling issue, just something that would be nice to not have to think about.
 

The Ventriloquist

Ars Praefectus
4,636
Subscriptor++
PowerShell:

Get-NetIPInterface | Format-Table
... will give you a concise list of adapters. Note the InterfaceIndex and InterfaceMetric values assigned to them, where in most cases the metric assigned at the IPv4 and IPv6 level will match.

Set-NetIPInterface -InterfaceIndex XX -InterfaceMetric YY
... where XX and YY are the InterfaceIndex # for the adapter you want to prioritize, and a priority (metric) that is set at a lower number than the onboard Wifi.
 

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
Yes, that will set the metric, which I already know how to do. But I don't think it will change whether Windows bothers to reconnect when the device is plugged back in, which is a different thing from metrics on an already connected interface of any type. I'll have to test it.

Edit: I think metric has nothing to do with it, because it automatically assigns a metric of 25 to any disconnected Wi-Fi adapter, which is lower than a connected one. The internal gets 55 when connected. The T2U got 45 when on 2.4GHz, and 35 when on 5GHz. Another 11n got 50 and 45, respectively. This reflects the link rates each one manages.

The 11n adapter DOES automatically reconnect when plugged in, while the T2U Nano never did, even when set to connect automatically. But, I think this T2U Nano may have always been defective, as it has now died. Out of the blue, it became "disabled" in the network adapters list, and Device Manager shows "the version number is incorrect for this driver", regardless of whether the TP-Link driver is installed or using the default Windows driver. A search shows results for this error ONLY with Wi-Fi adapters, regardless of USB/PCIe, brand or model, or model of PC. Most of them could intermittently fix it by uninstalling and reinstalling, but then it would fail again eventually, but this one fails even when I plug it into my desktop. Fuck me running.

So the whole thing was moot. Windows does exactly what it's supposed to do and what I hoped it would do, as long as you aren't using defective hardware. But the metric and the automatic reconnection are not related.
 
Last edited:

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
Can the 802.11n adapter be removed? They’re usually just slotted in.
Physically yes, but Lenovo locked down the BIOS to only accept specific models. It's possible that any Lenovo-branded adapter might work, even if it's much newer, but I didn't find any information on it. I don't know if the antennas are capable of working with a 5GHz adapter since I don't know what options it was built for. I'm not sure if Lenovo ever gave options in "build your own" configs to choose the specific Wi-Fi adapter the way Dell does, but the installed one is the ONLY model I can find information on for this laptop (other than some not very trustworthy listings). When I installed an Intel 7265NGW adapter in it, the system wouldn't even boot to the OS or allow BIOS access. It immediately comes up to a warning that an unauthorized adapter is installed and to shut down and remove it.

They also locked down the BATTERY, so generic third-party batteries can't be used. It will read the battery status, but won't charge or run the laptop with it, unless it has an identifier chip in it.

Edit: finally had the sense to find the FRU parts list for the laptop model, and there were actually three 11ac adapter models available for it, though they are all 1x1 so they aren't exactly fast. None of them will get over 150Mbps on 2.4GHz but they can hit 433 on 5GHz, which is what the T2U Nano is capable of since it's also 1x1. Still much faster than just 150 on N. Hopefully I can get one of these quickly. Trying to get the laptop upgraded and ready to take to my sister's house while my niece is visiting from out of state.
 
Last edited:

Xelas

Ars Praefectus
5,444
Subscriptor++
When you attach/detach devices to a Windows PC, that generates events that you can view in Event Viewer (Windows Logs --> System, most likely). When you right-click an Event entry, you can "Attach Task to this Event", and use the Event generated by the system recognizing the external Wi-Fi adapter to trigger the task to disable the internal one. There are a couple ways to do this.
You may also need to write a startup script and see if the external adapter is in place when Windows boots or wakes up, and if it isn't, to enable the internal one. Otherwise, if the user disconnects the external adapter while the PC is shut down or asleep, the relevant Event doesn't fire and the task to (re)enable the internal adapter won't trigger.


1) Use the Event log to trigger a script that makes the following netsh call, something like:

Code:
netsh wlan show networks | FIND "Internal adapter name" /I /C
if %errorlevel% equ 1 (wmic path win32_networkadapter where NetConnectionID="Internal adapter name" call disable)

And upon removal
Code:
netsh wlan show networks | FIND "Internal adapter name" /I /C
if %errorlevel% equ 1 (wmic path win32_networkadapter where NetConnectionID="Internal adapter name" call enable)

And then this will need to be run every time the PC is booted up or woken up from sleep:
Code:
netsh wlan show networks | FIND "External adapter name" /I /C
if %errorlevel% equ 1 (wmic path win32_networkadapter where NetConnectionID="Internal adapter name" call enable)
If External Adapter not found, enable the internal one.


1) a more brute-force is to use devcon;

Devcon is a CLI utility (by Microsoft, so it's legit) that lets you query and manipulate the device in the system's device tree - you can disable/enable or even remove devices and accomplish much the same like you would with netsh, I think. You would still need to trigger it via Events, but it may or may not be more reliable because you can use the PCI Device ID instead of the Adapter Name. If the network adapter changes names, it will break the netsh script above, but I think the devcon approach might be more reliable.

Take these with lumps of salt - I have not tested either one.
 
  • Like
Reactions: continuum

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
That would be helpful if I actually need to disable and re-enable the adapter automatically at some point (though I question what happens if it's plugged in or unplugged while the system is turned off), but as I found, that doesn't seem to have been necessary in this case for multiple reasons. Windows does seem to properly automatically connect to the SSID when it's plugged in (whichever was last used, if available), which was my primary concern, and it was just the failing TP-Link adapter that seems to have been the problem since it works fine with a different USB adapter. Once connected, Windows also chooses to use the higher-rate link automatically, which would have been the secondary issue. The only reason I'd really need to disable the internal at that point is if I knew the two SSIDs were on different Internet services, and the SSID with a better link was actually going through the slower ISP. That's about the most niche and convoluted situation possible.

But it should hopefully be completely unnecessary as I ordered the Lenovo 11ac adapter. A used one on eBay for less than $5 and under $5 for two- to five-day shipping. Hoping for it to come quickly as I'll only have 6 days with my niece visiting where I'll be able to install it, and it's a 1.5 hour drive to my sister's house.
 
  • Like
Reactions: continuum

GaitherBill

Ars Tribunus Militum
1,732
Subscriptor
Physically yes, but Lenovo locked down the BIOS to only accept specific models. It's possible that any Lenovo-branded adapter might work, even if it's much newer, but I didn't find any information on it. I don't know if the antennas are capable of working with a 5GHz adapter since I don't know what options it was built for. I'm not sure if Lenovo ever gave options in "build your own" configs to choose the specific Wi-Fi adapter the way Dell does, but the installed one is the ONLY model I can find information on for this laptop (other than some not very trustworthy listings). When I installed an Intel 7265NGW adapter in it, the system wouldn't even boot to the OS or allow BIOS access. It immediately comes up to a warning that an unauthorized adapter is installed and to shut down and remove it.

They also locked down the BATTERY, so generic third-party batteries can't be used. It will read the battery status, but won't charge or run the laptop with it, unless it has an identifier chip in it.

Edit: finally had the sense to find the FRU parts list for the laptop model, and there were actually three 11ac adapter models available for it, though they are all 1x1 so they aren't exactly fast. None of them will get over 150Mbps on 2.4GHz but they can hit 433 on 5GHz, which is what the T2U Nano is capable of since it's also 1x1. Still much faster than just 150 on N. Hopefully I can get one of these quickly. Trying to get the laptop upgraded and ready to take to my sister's house while my niece is visiting from out of state.

So take it out, then it can only use the USB adapter regardless.
 

Paladin

Ars Legatus Legionis
32,552
Subscriptor
Honestly, I wouldn't bother with any of this. You should be going for reliability and ease of use, not performance. 50 megabit is fine for any common use on wifi. They're going to be hitting youtube, facebook and instagram and stuff. Not hosting the world cup streaming site. :biggreen:;)

If you just want to do the best you can without too much fiddling, get the internal module that is on their approved list and install it. Seems like that is what you have already done so you're probably fine, as long as it is actually the right one with the right firmware and stuff.
 

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
Honestly, I wouldn't bother with any of this. You should be going for reliability and ease of use, not performance. 50 megabit is fine for any common use on wifi. They're going to be hitting youtube, facebook and instagram and stuff. Not hosting the world cup streaming site. :biggreen:;)
72 megabit/s link rate, meaning a whopping 30 Mb or so of actual throughput, at max. Or 150Mb/75Mb if it manages a 40MHz channel (which it's not with my current AP). Why do you assume nobody would need anything faster just because it's on Wi-Fi? Why does the link type matter?
 

Paladin

Ars Legatus Legionis
32,552
Subscriptor
72 megabit/s link rate, meaning a whopping 30 Mb or so of actual throughput, at max. Or 150Mb/75Mb if it manages a 40MHz channel (which it's not with my current AP). Why do you assume nobody would need anything faster just because it's on Wi-Fi? Why does the link type matter?
Because most people do absolutely fine with 20-50 megabit for their daily needs. Tons of people just live on LTE with middling signal quality where they are getting maybe 20 megabit of real performance.

Most people think they need gigabit internet but if you actually look at their usage graphs, it's like 10 megabit average over the month with a few 2 minute peaks around 400 megabit or so.

Of course, if someone constantly complains about slow performance and long download times despite paying for 500 megabit or gigabit internet etc., then yeah upgrading the wifi hardware might be worth the effort. Given the fact it's a PC that came with an 802.11n 2.4ghz only adapter, it's safe to assume the rest of the PC is no barn burner either so if it is fine for the user, the wifi performance is probably not a huge deal either. It's like someone buying a 2005 Corolla as a daily driver beater with 200,000 miles on it and then worrying about how difficult it is to fit it with new Pirelli P Zero track tires.

I get the idea though, if it's easy and cheap to get a better adapter and install it, go for it. No reason not to. But the USB option with hoops to jump through to make it work is not a great solution for a causal user who is used to an iPhone or iPad or whatever and just needs an appliance computer for basic use.
 
  • Like
Reactions: MR2DI4

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
Depends on the use case. For streaming movies and general web stuff that is plenty fast. If you are transferring files or downloading games over the network it could use more speed. What is the speed of the ISP?
And did anyone ask what the use case was before simply deciding that it was enough speed for the user and I shouldn't even bother? Don't think so.
 

Paladin

Ars Legatus Legionis
32,552
Subscriptor
And did anyone ask what the use case was before simply deciding that it was enough speed for the user and I shouldn't even bother? Don't think so.
You probably would have mentioned it if there were some specific need outside of what most young people do with a laptop (social media, homework, media streaming, email). You didn't mention anything so it seems reasonable to assume there are not any unusual requirements that would justify extreme efforts to get more than 50 megabit of wifi performance.
 

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
You probably would have mentioned it if there were some specific need outside of what most young people do with a laptop (social media, homework, media streaming, email). You didn't mention anything so it seems reasonable to assume there are not any unusual requirements that would justify extreme efforts to get more than 50 megabit of wifi performance.
There's no justification for assuming I don't need more, and making it seem like I'm stupid for wanting more, when I'm specifically asking questions about how to get more.

That's the theme for a lot of responses when I ask for information about something. "My needs and situation don't match yours, and I don't think your needs or desires are meaningful, and I've never been in your situation, so here's a bunch of recommendations for things you've specifically said you don't want which aren't going to resolve your problem or need."
 
Last edited:

steelghost

Ars Praefectus
4,975
Subscriptor++
three 11ac adapter models available for it, though they are all 1x1 so they aren't exactly fast. None of them will get over 150Mbps on 2.4GHz but they can hit 433 on 5GHz

72 megabit/s link rate

So, which is it?

And did anyone ask what the use case was before simply deciding that it was enough speed for the user and I shouldn't even bother? Don't think so.
Why do you assume nobody would need anything faster just because it's on Wi-Fi? Why does the link type matter?
You didn't specify, and in the absence of specific information, people are going to make assumptions about the likely use case from the information provided (old laptop being refurbed for neice of unspecified age). If you don't like people doing that, be more specific.

The fact you still haven't actually mentioned what such a use case might be suggests you're being performatively stroppy when, as far as I can see, other forum users are posting in good faith.

There's no justification for assuming I don't need more, and making it seem like I'm stupid for wanting more, when I'm specifically asking questions about how to get more.
The question originally asked was about having the OS choose a specific adapter for the sake of simplicity, nothing to do with performance.

In service of that stated goal, you're very likely on the right path since you're planning to install the "right" Wifi5 module.
 

Paladin

Ars Legatus Legionis
32,552
Subscriptor
There's no justification for assuming I don't need more, and making it seem like I'm stupid for wanting more, when I'm specifically asking questions about how to get more.

That's the theme for a lot of responses when I ask for information about something. "My needs and situation don't match yours, and I don't think your needs or desires are meaningful, and I've never been in your situation, so here's a bunch of recommendations for things you've specifically said you don't want which aren't going to resolve your problem or need."
I didn't say you didn't need more, I said it is not worth extreme measures like fiddling with windows settings, making batch scripts or powershell scripts, etc. You've already said you were getting the upgraded adapter to install in the laptop, which is the right way to proceed, assuming it works. Given the situation you described, that is the most practical and effective solution. If that doesn't work and it is not possible to upgrade it without other efforts then the remaining practical options are to replace the laptop with something that meets your desired performance or just leave it as is and let the user see whether it presents a problem. My contention was simply that people got along with 2.4 ghz 802.11n performance for a looooong time (or worse) and even with newer hardware, people are still getting that level of performance a lot of the time due to interference, high device count on the network, distance, or just because they simply don't need more performance for whatever they are doing. Most people simply don't care, nor do they know enough to really tell the difference whether their gigabit connection is giving them 20 megabit of web page load or 400 megabit.
 

Lord Evermore

Ars Scholae Palatinae
1,490
Subscriptor++
So, which is it?
72Mbps is the single stream 20MHz rate, 144/150 is 40MHz, but a lot of APs won't actually use 40MHz channels anymore because it's been decided that 2.4GHz is so crowded that interference is so certain that the reliability of only trying to maintain 20MHz is more important than trying to use 40MHz to get higher bandwidth. Some won't even attempt to use 40MHz anymore (the Cisco 3802i I just got has it completely removed, as they apparently did with all enterprise devices) while others like my Asus router have an option to allow it but it just chooses 20MHz and you don't have any way to adjust the sensitivity. The 3802i does have sensitivity adjustments for automatic 5GHz channel width adjustments, though.

You didn't specify, and in the absence of specific information, people are going to make assumptions about the likely use case from the information provided (old laptop being refurbed for neice of unspecified age). If you don't like people doing that, be more specific.

The fact you still haven't actually mentioned what such a use case might be suggests you're being performatively stroppy when, as far as I can see, other forum users are posting in good faith.
So since I didn't specify, the correct response is "you're stupid and obviously don't really need what you're asking for, and I'm going to recommend a bunch of things you've said you don't want"?

Were it me and I needed to use a specific adapter and not the on board, I would just disable the onboard wireless in Windows Networking. That leaves the BT adapter for you. If that doesn't work for you, it probably isn't worth the extra effort.
Another "not going to bother reading anything that has been posted previously" response.

Wouldn’t an Ethernet connection just be easier?
What kind of question is that for someone trying to improve network performance on a device that is explicitly intended to be mobile? Do you recommend people connect their phones with a USB to Ethernet adapter?
 

steelghost

Ars Praefectus
4,975
Subscriptor++
So since I didn't specify, the correct response is "you're stupid and obviously don't really need what you're asking for, and I'm going to recommend a bunch of things you've said you don't want"?
I have re-read the whole thread, twice, and I cannot see where anybody said this, or even implied it.

You initial question (spoilered for long) is below.
I'm fixing up an old laptop for my niece that has an old 2.4GHz 11n Wi-Fi adapter in it, which can't be upgraded much because Lenovo locked it down to whitelisted adapters in the BIOS. I'm plugging in a TP-Link T2U Nano which is much faster thanks to 5GHz, even if it's only going to max at 433Mbps. I don't want to disable the internal adapter in the BIOS so that Bluetooth will still work, and I'd like to leave it enabled in Windows so that if needed the T2U can be unplugged and it will still have basic connectivity. I found when plugging the T2U back in, Windows just stays connected on the internal adapter and doesn't reconnect with the T2U, even if they both were connected when I unplugged it.

Is there any way to force it to always reconnect even if the internal adapter is connected? I just want to make is automatic so there's no need to remember to click the icon and select the adapter and connect to the SSID, and they can just both always be connected to her home's SSID. (Windows automatically uses whichever route has the better connection, so it will choose the T2U's 5GHz link.) Otherwise, when the T2U is unplugged, it should switch to the internal automatically, but then have to be manually switched back when the T2U is plugged in again.
None of this is related to performance. It's all about ease of use and simplicity. You didn't mention a specific use case, or a requirement for a certain level of performance. So (in my opinion, perfectly reasonably), that's what Paladin in particular focused on, despite getting snapped at for his trouble. You still haven't given any sort of use case or minimum level of wireless performance, yet somehow you're still complaining that people aren't asking the right questions and have made unfair assumptions, etc.

I'll say it once more - in the absence of specifics, people will make assumptions. If you don't like that, be more specific - either from the off, or in response to other posters.

Another "not going to bother reading anything that has been posted previously" response.
So ignore it? Assume that fellow forum users are posting in good faith - most are, most of the time. Maybe they did skim read and missed something, and posted something that isn't relevant, or you've already discounted. But sometimes that off the cuff comment end up being the insight that gets you to the solution. Every time you snap at someone you reduce the pool of forum members who are inclined to answer helpfully in this, or any other thread you post.
 

Flipper35

Ars Scholae Palatinae
1,376
72Mbps is the single stream 20MHz rate, 144/150 is 40MHz, but a lot of APs won't actually use 40MHz channels anymore because it's been decided that 2.4GHz is so crowded that interference is so certain that the reliability of only trying to maintain 20MHz is more important than trying to use 40MHz to get higher bandwidth. Some won't even attempt to use 40MHz anymore (the Cisco 3802i I just got has it completely removed, as they apparently did with all enterprise devices) while others like my Asus router have an option to allow it but it just chooses 20MHz and you don't have any way to adjust the sensitivity. The 3802i does have sensitivity adjustments for automatic 5GHz channel width adjustments, though.


So since I didn't specify, the correct response is "you're stupid and obviously don't really need what you're asking for, and I'm going to recommend a bunch of things you've said you don't want"?


Another "not going to bother reading anything that has been posted previously" response.


What kind of question is that for someone trying to improve network performance on a device that is explicitly intended to be mobile? Do you recommend people connect their phones with a USB to Ethernet adapter?
Just put an icon on to re-enable it. Or not, up to you as I don't really care. Yes, I read your post. Assuming I didn't because you don't want to read advice given is on you. You are going to do it your own way regardless and I am not sure why you even posted here.
 
  • Like
Reactions: GaitherBill

w00key

Ars Praefectus
5,907
Subscriptor
Fine, fine. I'm done. And I may never ask a question here again.
You seem to be under the mistaken assumption that every reply needs to be replied to, or threads you start are your baby.

Just ignore off topic or unhelpful replies. Some are just general comments for other commenters or visitors from Google.

Threads drift off all the time and not everything said is for you.