Curious about the need to reset a wifi adapter on IP change. / General Questions / NetSetMan Support

NetSetMan Support

Search for already answered questions about NetSetMan (Pro) or ask new ones

You are not logged in.

#1 2023-07-04 04:46

Ispano
Member
Registered: 2023-07-04
Posts: 3

Curious about the need to reset a wifi adapter on IP change.

As the subject states.

I was setting up one of my devices to switch profiles when either at home on my network, or away on another network. Basically an either/or situation, where for the most part it is simply changing between a static IP and DHCP, as well as running a script to start or stop my Wireguard tunnel. All other settings besides those are left untouched.

For the most part it works fine, the issue however is if I connect to a wifi network away from home, and don't choose "automatically connect," the restart of the adapter that NSM does when changing profiles(or perhaps on changing the IP) actually disconnects it from the SSID.

So my question is, is there a specific reason it needs to restart the adapter? Maybe automatic changes via software like this cannot change it without resetting it like I can do manually? I can work around the issue by always using "automatically connect," but the underlying issue still nags at me.

I know I can change the settings via netsh(with admin privs of course) and it does not reset the adapter, but running NSM as admin does not work the same. I may end up just making separate scripts and running that instead of letting NSM change things, I'll need to test that later.

Offline

#2 2023-07-04 09:42

NetSetMan Support
Administrator
Registered: 2005-08-06
Posts: 1,841

Re: Curious about the need to reset a wifi adapter on IP change.

In the almost 20 years since this software has been around, we have tried many IP switching iterations. For many of them, there are certain constellations in which the IP switch does not work completely. The current implementation has now emerged as the most reliable and has been successfully used for many years now.

To solve your problem, you can simply select the WiFi network to be connected to in this profile. That way, you don't have to set it to auto-connect but also don't have to connect it manually after applying that profile.

If you are curious and willing to experiment, you can try the alternative IP method. This WMI method is based on the official Microsoft API, but had very many constellations where the IP change did not work properly. You can activate this function in the settings:
Preferences > General > Use WMI IP activation method (Deprecated)

Offline

#3 2023-07-04 11:04

Ispano
Member
Registered: 2023-07-04
Posts: 3

Re: Curious about the need to reset a wifi adapter on IP change.

Hmm, I know I looked through settings, must have missed that. It does indeed work as I want. I've used the software on other systems before, but have not needed to use it with wifi like this before.

If for some reason it flakes out, I can just make some netsh scripts and change that way.

Offline

#4 2023-07-04 12:27

NetSetMan Support
Administrator
Registered: 2005-08-06
Posts: 1,841

Re: Curious about the need to reset a wifi adapter on IP change.

Is there any reason you don't want to configure the WiFi network in your NetSetMan profile to be connected to with this profile, as we described?

Offline

#5 2023-07-05 03:23

Ispano
Member
Registered: 2023-07-04
Posts: 3

Re: Curious about the need to reset a wifi adapter on IP change.

It's not so much about not wanting to. I could easily set the SSID for the home network, but that switch isn't the one with the problem.

The second profile isn't for a specific SSID. It's for any that I may use away from home. Sometimes I do have those set to auto connect, say a family or friend's house, but sometimes I don't want it to for other locations.

It all works in the end the way I want now anyways. I've had much more janky workarounds with other things in the past, this is nothing.

Offline