0

I'm having lots of trouble getting my Raspberry Pi wlan*'s to work. I already have several Raspberry Pi 2's that work perfectly with the exact arrangement I'm about to describe, but this one I just ordered in the mail, and is brand new, doesn't work:

This works:

  1. Turn on the Pi
  2. Plug in either wifi dongle
  3. Pi recognizes the dongle, and it shows up under 'iwconfig'

This does not work, and is a huge issue:

  1. Turn on the Pi
  2. Plug in either wifi dongle
  3. Turn off or reboot the Pi without unplugging the wifi dongle
  4. Power back on the Pi
  5. The Pi does not recognize any devices under 'iwconfig'

This is probably related to this problem - I have two Wifi dongles that I use, one needs to go into monitor mode while the other stays in Wifi mode. When I run

$ sudo airmon-ng start wlan0

to start monitor on mon0, my Wifi dongle is kicked off my network on wlan1. Normally, I can easily fix that by running these commands on any of my other Pi's with the same exact two dongles:

$ sudo ifdown wlan1  
$ sudo ifup wlan1

But this doesn't work -- I get this error:

wpa_supplicant: wpa_action is managing ifup/ifdown state of wlan1  
wpa_supplicant: execute `ifdown --force wlan1' to stop wpa_action  
run-parts: /etc/network/if-pre-up.d/wpasupplicant exited with return code 1  
Failed to bring up wlan1.

Here's my /etc/network/interfaces file:

auto lo  
auto wlan0  
auto wlan1  

iface lo inet loopback  
iface eth0 inet dhcp  

allow-hotplug wlan0  
allow-hotplug wlan1  

iface wlan1 inet manual  
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf  
iface default inet dhcp  

Here's my /etc/wpa_supplicant/wpa_supplicant.conf file:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev  
update_config=1  

network={  
        ssid="MY SSID"  
        psk="MY Password"  
        key_mgmt=WPA-PSK  
}

How can I fix this?

1
  • What operating system do you use? Raspbian? What Raspberry Pi do you use?
    – Ingo
    Commented Jan 12, 2020 at 15:18

2 Answers 2

1

In my experience, when peripherals are plugged into the RPi while turning on and booting, they frequently will not work properly due to insufficent power supply current capability (power). This is especially true with networking issues. During boot up, the RPi requires more power than during normal operation. This additional power draw causes dips voltage as seen by the RPi and its peripherals which often results with network drivers failing to get a DHCP address, for example. Try a different power source for your RPi - maybe one of the ones that's working well with one of your other RPi units.

1

Wireless dongles are a common source of problems. They frequently require more power than the USB port can deliver. The USB port of the RPi is sometimes a bit underpowered which especially at boot time causes the dongle to malfunction. Buy a powered USB hub connect it to the RPi and connect the dongle to this hub and you'll see it will work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.