An ugly way to enable Client + AP mode

I have GL.iNet GL-AR150 router, and have been trying to use Client+AP mode for many years. Tries some solutions suggested here and in other communities, but couldn't get them to work consistently, up to 19.07.7. But at least in one case I saw both Client and AP networks active and connected, working as expected, with the appropriate routing and at a good speed.

Today, I tried to use RT3570 USB WiFi dongle for the client. Have installed the appropriate packages (kmod-rt2800-lib, kmod-rt2800-usb, kmod-rt2x00-lib, kmod-rt2x00-usb), restarted, connected the dongle and saw that radio1 interface was created.

I was going to associate client network with radio1, but accidentally noticed that both AP networks are active. Connected to them and made sure that all works as expected (radio1 was still not associated with any network interface). I removed the dongle, and both Client and AP networks continued their stable work, with the appropriate routing, at a good speed. Kernel/system logs contain no additional messages, except USB/ieee80211 PHY connections.

I rebooted the device several times, and sometimes APs were activated automatically, with no intervention (the Client was always activated, there was no problem with it). In other cases, it was enough to just plug the dongle for several seconds to make APs active, then the dongle can be removed, and all continued to work perfectly.

There is no doubt that there are race conditions between initialization procedures and/or driver access when wpad is configured as both hostapd and wpa_supplicant. If there is only radio1 physical interface, the initialization is performed faster, and conflicts are much more often. If there is another physical interface, even not associated, there are some delays enough to configure both daemons and Atheros wireless driver properly.

1 Like