Another clue; but, I'm still completely baffled. As I read more forums, it seems many are. Here's the next clue:
I again went back to the original files and tested the system to see that everything works as it should...and it does. So, the changes were all undone to "/etc/network/Interfaces" and "/etc/dhcpcd.conf". Reboot. Wlan0 connects merrily to my router. My second WiFi adapter, wlx... is in managed mode. Back to the beginning.
Following a suggestion from the previously linked forum thread, I moved the code for my defined network from /etc/wpa_supplicant/wpa_supplicant.conf to a new file /etc/wpa_supplicant/wpa_supplicant-wlan0.conf. Reboot. It comes up fine, seeming to find the new definition and connect to my local router again.
Next, I edited /etc/network/interfaces adding the code from the first referenced article. Then, I added new code to see if I could force wlan0 back into operation. It looks like this.
Code: Select all
allow-hotplug wlx...
iface wlx... inet manual
pre-up iw phy phy1 interface add mon1 type monitor
pre-up iw dev wlx... del
pre-up ifconfig mon1 up
auto wlan0
ifconfig wlan0 down
ifconfig wlan0 up
allow-hotplug wlan0
iface wlan0 inet manual
I'm not sure if the commands I added beginning with "auto" even make sense. I'm just parroting what I've seen in other threads. Maybe I shouldn't take it down after auto. Maybe hotplugging the on-board WiFi chip doesn't make sense. I don't know. I don't know if the indentation changes the code.
Anyway, without the code I added starting with "auto" I have my original problem for this thread, as soon as I define mon1 it kills the wlan0 connection. WITH the code I added, however, it does the OPPOSITE. The new code re-establishes wlan0 as a working interface and correctly connects to the new file defining my network....BUT, it kills mon1, which reverts back to its default managed mode.
What on earth?! Why is what I would expect would be wlan1 be called wlx+MAC? Why when I make changes to wlx... does it change wlan0? Why when I then change wlan0 does it change wlx...? When I enter an "iw dev", I clearly see phy#1 is wlx... and phy#0 is wlan0. I really don't see why changing one affects the other and vice-versa. Ideas?