I have 2 RPi 3 Bs, each running Stretch and each with an EDIMax N150 USB device plugged in and no changes have been made to the default network configuration files.
When the PIs are turned on, I can use the WiFi icon in the status bar to connect each interface to a network. Once connected I can change the onboard WiFi to connect to a different network.
But if I change the USB WiFi to change to a different network, it disconnects and thereafter will not connect to any network. No visible errors are displayed. The only way to get the USB WiFi working again is to reboot.
Both PIs are acting the same way. It doesn't seem to make a difference if predictable names are enabled.
Any ideas why the USB WiFis are behaving this way?
Edit: This is a research setup. The onboard WiFi is used to connect to an isolated ad-hoc network, and the USB WiFi is used to connect to a router so that the performance of each node can be monitored, and also to provide Internet access so that software updates can be installed.
Edit II: I setup a wpa_supplicant-wlxMAC.conf file (where MAC is the MAC address for my USB WiFi), as suggested by @Milliways. This did not change the behaviour I describe above.
I suppose, if I wanted to change networks, I could manually edit the wpa_supplicant-wlxMAC.conf file for the new network and then reboot. I tried reconnecting the interface via the command line using dhcpcd -n wlxMAC
, but that didn't do anything for the USB WiFi. When I check the status of dhcpcd (using systemctl status dhcpcd
), I can see
dhcpcd[342]: control command: dhcpcd -n wlxMAC
dhcpcd[342]: wlxMAC: waiting for carrier
And then nothing