5

I have two USB wifi adapters plugged into a powered hub. When I reboot, one of them (wlan1) does not show. In order to get it to show I have to unplug it and reinsert it. Then wlan1 shows on a ifconfig and all is well, until the next reboot. If someone can help me figure out why it is misbehaving. Or, maybe help me with a script that simulates the unplug/reinsert after boot. Something like Windows Device Manager "Scan for new hardware..."

/etc/network/interfaces

auto lo
auto eth0

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-ssid "SSID"
wpa-psk "password"

iface default inet dhcp

lsusb

root@raspberrypi:~# lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 005: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
Bus 001 Device 006: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Bus 001 Device 007: ID 046d:c00c Logitech, Inc. Optical Wheel Mouse
Bus 001 Device 008: ID 413c:2106 Dell Computer Corp. Dell QuietKey Keyboard

The RTL8191 is the problem child.

Cheers.

Barry
  • 51
  • 1
  • 2

6 Answers6

1

A bit late, but just in case...

I found a solution to the same problem here:

https://www.raspberrypi.org/forums/viewtopic.php?p=459803#p459803

It worked for me in every boot/reboot since.

I did not try to swap the two adapters in the fist place, I asked the author if it could be a difference.

Regards.

Antonio
  • 29
  • 1
  • 5
0

NOTE I have not done this myself, but from my study of WiFi on Linux, I suggest you try the following:-

Create 2 wpa_supplicant.conf files, one for each network. They can be in different directories of different names in the same directory.

Try wpa-conf rather than wpa-roam. https://raspberrypi.stackexchange.com/a/9262/8697

My comment about telling the 2 adapters apart also applies to the Pi. You may not always get the same on wlan0.

I suggest you study the interfaces and wpa_supplicant man pages.

Milliways
  • 62,573
  • 32
  • 113
  • 225
0

I spotted this issue a few days ago. It seems to be a bug in the r8712u kernel module.

I "solved" this problem by executing as root: modprobe -r r8712u modprobe r8712u I wrote these commands into the START section of the networking init script. Indeed it's a kind of hacky solution, but it works.

J.F.
  • 1
0

Add auto wlan0 and auto wlan1 to the respective stanzas.
allow-hotplug tells the system to react when a specific event occurs, like plugging in your adapter.
auto tells the system to automatically bring up the interface on boot. Hence you need the auto part added to your /etc/network/interfaces

Diederik de Haas
  • 809
  • 8
  • 12
0

I have a problem with one of my Pi's (running MotionEyeOS as it happens) that it appears to be suffering from low power issues, or brown outs (I also have a USB camera connected).

It took me a while to realise that this was caused when I use low power phone adapters, and sometimes when plugged into extension sockets. I get much more reliable results when I use a 5v 2A power supply.

When this occurs, the WiFi never comes online and the Pi reboots (part of the MotionEyeOS featureset).

Of course my issues might be related to the camera, and not the Wifi... so many possibilities ;-)

Mark Cooper
  • 531
  • 1
  • 4
  • 12
-3

Remove "iface default inet dhcp" fron /etc/network/interfaces and reboot.