I changed my adapter to monitor mode using:
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
Now, I cannot change it back (in the GUI, when I click on connections, it says that "wireless is disabled by wireless switch"). I have not switched off anything using the hardware buttons.
I tried:
sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode managed
sudo service network-manager restart
I also tried:
pccardctl eject
pccardctl insert
It appears that it has switched back to managed mode, but is still offline:
ifconfig
output:
eth0 Link encap:Ethernet HWaddr 00:24:21:6f:84:69 inet addr:10.100.1.41 Bcast:10.100.255.255 Mask:255.255.0.0 inet6 addr: fe80::224:21ff:fe6f:8469/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:27668 errors:0 dropped:0 overruns:0 frame:0 TX packets:3504 errors:0 dropped:0 overruns:0 carrier:0 collisions:1 txqueuelen:1000 RX bytes:4493143 (4.4 MB) TX bytes:659945 (659.9 KB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:553 errors:0 dropped:0 overruns:0 frame:0 TX packets:553 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:84110 (84.1 KB) TX bytes:84110 (84.1 KB)
iwconfig
output:
eth0 no wireless extensions. lo no wireless extensions. wlan0 IEEE 802.11bg ESSID:off/any Mode:Managed Access Point: Not-Associated Tx-Power=off Retry long limit:7 RTS thr:off Fragment thr:off Power Management:off