Restart/reset/reload WiFi without disconnecting current clients

I remember there was a thread on this subject, but I've googled and couldn't find it.

I think from Luci you can reload WiFi without disconnecting current clients, but I can't figure out how it's done. What are the shell commands which need to be ran to achieve that?

Running just wifi disconnects current clients which I want to avoid.

Thanks!

What issue are you trying to resolve?

Flakey wireless driver/firmware. Why?

You asked a similar question in this thread 17 days ago...

I fail to see the similarity. Ignoring the fact that I only enquired about the difference of calling ubus command vs ifup and ifdown, that thread is about interfaces, my question is about physical devices.

Ignoring your snarky responses, I didn't do a deep dive on your posts.

Restarting, resetting, or reloading wifi with connected clients...will disconnect clients.

One solution is to bag the wifi reset and set up a cron job to reboot the router once a day.

Or purchase a router that doesn't have "flakey wireless/driver firmware".

Have a good evening.

And yet making changes in Web UI does not necessarily disconnect all clients. I can't find that piece of code tho and looking for help, not random replies from people who "didn’t do a deep dive on your posts".

Flakey wireless is a very general problem with an unknown source, not the kind of thing that one can fix without completely reseting wifi (and kicking clients in the process). In order to have a hope of fixing it without completely reseting wifi you'd need to know more specifically what the problem is.

Each change would do something different. Unless a specific change to the web UI temporarily improves your wifi, then there is nothing there that can help.

I think that the current code does disconnect all clients from that wifi device that you are reloading but not from the other radio. The "wifi" command always runs down+up, in order to get all changes reflected to the radio that you are configuring.

So, if you make config changes to just one radio, it is likely possible to maintain clients connected to the other radio when you reload the config of the first radio..

If you look at the source code of "wifi", you can see that plain "wifi" affects all radios, but you can also specify just one radio for the "wifi up X" command.
https://git.lede-project.org/?p=source.git;a=blob;f=package/base-files/files/sbin/wifi;hb=HEAD#l125

Only radio0 = wlan0 gets affected below:

root@LEDE:~# wifi down radio0
root@LEDE:~# wifi up radio0
root@LEDE:~# logread | tail -n 20
Mon Dec 18 16:59:07 2017 authpriv.notice dropbear[11817]: Pubkey auth succeeded for 'root' with key sha1!! 25:30:1e:50:42:81:6c:c2:d1:26:9c:02:bf:b0:c2:f7:f4:6b:a3:a1 from 192.168.1.180:50596
Mon Dec 18 17:06:30 2017 daemon.notice netifd: Network device 'wlan0' link is down
Mon Dec 18 17:06:30 2017 kern.info kernel: [188877.715584] device wlan0 left promiscuous mode
Mon Dec 18 17:06:30 2017 kern.info kernel: [188877.715707] br-lan: port 2(wlan0) entered disabled state
Mon Dec 18 17:06:30 2017 kern.warn kernel: [188877.767484] ath10k_pci 0000:01:00.0: peer-unmap-event: unknown peer id 1
Mon Dec 18 17:06:30 2017 kern.warn kernel: [188877.767595] ath10k_pci 0000:01:00.0: peer-unmap-event: unknown peer id 1
Mon Dec 18 17:06:30 2017 kern.warn kernel: [188877.773301] ath10k_pci 0000:01:00.0: peer-unmap-event: unknown peer id 1
Mon Dec 18 17:06:34 2017 daemon.notice netifd: radio0 (11881): command failed: Not supported (-95)
Mon Dec 18 17:06:35 2017 daemon.err hostapd: Configuration file: /var/run/hostapd-phy0.conf
Mon Dec 18 17:06:41 2017 kern.info kernel: [188888.417129] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Mon Dec 18 17:06:41 2017 kern.info kernel: [188888.425148] br-lan: port 2(wlan0) entered blocking state
Mon Dec 18 17:06:41 2017 kern.info kernel: [188888.425188] br-lan: port 2(wlan0) entered disabled state
Mon Dec 18 17:06:41 2017 kern.info kernel: [188888.430165] device wlan0 entered promiscuous mode
Mon Dec 18 17:06:41 2017 daemon.err hostapd: Using interface wlan0 with hwaddr dc:ef:09:ef:f3:e6 and ssid "HN5WLAN"
Mon Dec 18 17:06:41 2017 kern.info kernel: [188889.238516] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Mon Dec 18 17:06:41 2017 kern.info kernel: [188889.238862] br-lan: port 2(wlan0) entered blocking state
Mon Dec 18 17:06:41 2017 kern.info kernel: [188889.243991] br-lan: port 2(wlan0) entered forwarding state
Mon Dec 18 17:06:41 2017 daemon.notice netifd: Network device 'wlan0' link is up
2 Likes

Are you sure that the "reload" action performed by LEDE when you change something in LuCi is enough to fix a flakey driver, without disconnecting clients?

Thanks! I believe there also was a thread on the old forum, it probably had the same information.

No, I'm not sure. But it's either trying that while keeping the router plugged and possibly capturing enough information for driver developers or unplugging the router and being no help at all for future development.

By trial and error, at least on my device, wifi does not disconnect majority of existing clients if none of the radio's channel is set to auto. Otherwise, radios enter promiscuous mode on restart to search for underused channels and that is noticeable on clients.

I was very happy to find this old thread, and I have a related question.

I have one wifi ssid I would like to change dynamically. I do not want to disturb the clients associated with another wifi ssid running on the same radio.

wifi reload seems to work on all ssids related to one radio. Is the any way to restart only one interface or ssid?

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.