1

I plugged an additional wifi connector in my Raspberry Pi 3B+. I can‘t see the interface of the additional connector after plugging my Raspberry Pi out of power or use sudo poweroff for save shutdown. But after sudo reboot the wifi connector is visible after typing sudo iwconfig in the terminal.

My /etc/network/interfaces contains:

source-directory /etc/network/interfaces.d
auto lo 
iface lo inet loopback
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
    post-up iw dev $IFACE set power_save off
auto wlan1
allow-hotplug wlan1
iface wlan1 inet manual
    post-up iw dev $IFACE set power_save off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

My /etc/modules contains:

i2c-dev
bcm2835_wdt
# r8712u # this driver makes problems 
r92su

The internal WiFi adapter in my Raspberry Pi 3 b+ is a broadcom and my external WiFi adapter is a Realtek RTL8191SU.

I tried already to shut down the power save mode of the wlan adapter:

post-up iw dev wlan1 set power_save off

EDIT:

Networking.service:

systemctl status networking.service

Returns: Failed to initialize control interface 'DIR=/var/run/wpa_supplicant GROUP=netdev'. You may have another wpa_supplicant process already running or the file was left by an unclean termination of wpa_supplicant in which case you will need to manually remove this file before.

EDIT 2: My WLAN connected after

sudo killall wpa_supplicant
sudo poweroff

Shutdown the stream and start Raspberry Pi and it works nice, but if I do this and remove a usb mouse and keyboard it won‘t connect with the wifi. It looks like there is a start problem with usb connectors of the Pi.

EDIT 3:

There seems to be a bug in the system with the USB connection and the current distribution. Every time I remove the usb mouse and keyboard, the wlan usb adapter is no longer activated.

EDIT 4:

It could also be a driver problem for rtl8191su and therefor r8712u. My post on the raspberry pi forum: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=230193&p=1410456&hilit=wlan1#p1410456

EDIT 5: I tried already https://www.raspberrypi.org/forums/viewtopic.php?t=191844 , but after i did this my system won‘t boot correctly and the broadcom internal wlan adapter won‘t work correctly. After this i got wlan0 and wlan1 but both were the same network adapters connected to the same wlan (strange). So the problem is not fixed until now!

How to get Raspberry Pi‘s wlan1 interface work after shut down the stream and start the Raspberry Pi?

user9245497
  • 71
  • 1
  • 6

3 Answers3

0

I looked into this issue and here is a fix that I found:

1.In the terminal type sudo nano /etc/network/interfaces

2.Edit your interfaces config file by making sure the text looks like the following...

auto lo
auto wlan0

iface lo inet loopback
iface eth0 inet dhcp

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

4.Save your work by pressing Ctrl X and confirming save. Turn the pi off and on

5.When your Pi has restarted bring up the GUI again. Now double click the WiFi Config icon to bring up the wpa_gui properties box. If all was successful you should now see wlan0 show up in the Adapter section. From here you should scan for you SSID and set up the connection.

Hope this helps.

  • After shut my Rasperry Pi down and restart it does not connect automatically to the wifi because the interface wlan1 is not there. If I press iwconfig it shows only wlan0. But after sudo reboot it works fine. – user9245497 Dec 31 '18 at 00:01
  • Every time I disconnect the Rasperry Pi, it has to be restarted after plug it in again. – user9245497 Dec 31 '18 at 00:06
  • Sorry I must not have understood. I have has a look and written another answer. – Matt Hawkins Dec 31 '18 at 00:20
0

First suppress the loading of the modules by blacklisting and load them in a specific order later on:

Type this to the terminal:

$ sudo vi /etc/modprobe.d/wlan-blacklist.conf

This creates a new file. Make sure to end it with ".conf". Insert your modules here:

blacklist r8712u
blacklist 8192cu

Save and close the file. Now run this:

$ sudo depmod -ae
$ sudo update-initramfs -u
$ sudo vi /etc/modules

At the end of the file you add your modules in the order that they are supposed to show up (i.e. wlan0 before wlan1, etc.):

# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.

snd-bcm2835
8192cu
r8712u

Then try turning it off and on

0

I got the solution for this problem:

First load the module (driver) for your usb wlan adapter after the internal chip adapter. In this example case, I got the RTL8191SU with the sudo apt-get install firmware-realtek and therefor r8712u driver.

sudo nano /etc/modprobe.d/wlan-blacklist.conf

Edit wlan-blacklist.conf like this:

blacklist r8712u

After this run:

sudo depmod -ae
sudo update-initramfs -u
sudo nano /etc/modules

Edit modules like this:

i2c-dev
brcmfmac
r8712u

Now load the r8712u module a little bit later after the internal wlan chip of the Raspberry Pi 3b+:

sudo nano /etc/crontab

Add line to crontab:

@reboot root (sleep 20; modprobe r8712u) &

Now have a right interfaces file:

sudo nano /etc/network/interfaces

wlan1 is the realtek wlan adapter and wlan0 the internal broadcom wlan chip:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
post-up iw dev wlan0 set power_save off
auto wlan1
allow-hotplug wlan1
iface wlan1 inet dhcp
post-up iw dev wlan1 set power_save off
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet manual

It is really important, that the default interface is manual!

sudo reboot 

or

sudo poweroff

Both of these commands will let the wifi configured correctly. Even if I turn off the raspberry pi and then boot again.

Enjoy your second wlan adapter!

user9245497
  • 71
  • 1
  • 6