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.

2
  • 1
    It is possible to run 2 WiFi adapters, but not using the default settings e.g. wpa-roam which is designed to select one interface. What exactly are you trying to achieve? PS there is no way we can tell which is the RTL8191, and neither can the Pi.
    – Milliways
    Commented Jan 6, 2015 at 22:41
  • 1
    Thanks. The goal is to connect to two different wifi networks. The one that doesn't detect/connect on boot is the RTL8191. I thought that might be useful information, maybe not. That's the one that I have to unplug/reinsert to get connected. But once I do that, I'm able to 'ifup wlan1' to connect to my two different networks using this config. Is there a different way to do it that would work as expected?
    – Barry
    Commented Jan 6, 2015 at 23:52

6 Answers 6

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.

2
  • Yes, tweaking udev rules so that each adapter gets a persistent name does seem to be the way to go...
    – SlySven
    Commented Jan 25, 2016 at 13:54
  • Welcome to Raspberry Pi! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – Ghanima
    Commented Jan 25, 2016 at 14:00
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.

1
  • I've tried your suggestion, without luck. I have two different supplicant files and changed to wpa-conf. I'm inclined to think it's an issue with the USB adapter because when I boot, the RTL8191 does not even attempt a connection (no flashing lights). It's not until I unplug/reinsert it that lights flash and connection is made. It doesn't seem like an issue in interfaces or wpa_supplicant since it connects once it recognizes the adapter is there. Maybe it's a driver issue?
    – Barry
    Commented Jan 8, 2015 at 18:22
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.

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

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 ;-)

-3

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

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.