For those requiring multiples of WiFi adapters recognized and functional on their Raspberry Pi- A large variety of trouble shooting/ general setup(for those lucky types who things "just work" for them...) and further trouble shooting for the others where things just can't, aren't, may never be as simple as plug and play- it is more; play, plug, play, un plug, reset, plug, play play play, plug, reset,restart computer since all resources have been tied up in all the tabs/ windows open for a solution so that at one weird odd moment down the road the thing might just work and you may have no idea what even was the fixx since it just did,,,, Or you just give up having done enough cursing to no avail- questioning the saving that are seen when considering DIY or Buy?
Sometimes all we need is that 1 forum thread...
...being:
https://forums.raspberrypi.com/viewtopic.php?t=49283
Solution and Trouble Shooting Issues with 2 WiFi Adapters/ Interfaces Running at the Same Time
Run dmesg to see kernel messages of hardware when added,,,
whatis dmesg -- dmesg description/ what dmesg is
dmesg -w
Remove all USB WiFi Dongles/adapters,
do dmesg -c command. (clears buffer)
plug adapter in.
wait...
plug second adapter in.
wait...
use `dmesg >dmesg_log.txt` to write log to a file.
and `cat dmesg_log.txt` to show.
Some of the Many Commands used:
lsusb - connected by USB
ifconfig - hardware info -- be scared if you se r8712u <much troubles, many bad time.
ifconfig -a
uname -a - hardware, Pi OS
sudo ifdown --force wlan0 - turns wlan off
sudo ifup --force wlan0 - turns wlan on
or:
sudo ifdown wlan1 and then sudo ifup wlan1 or even sudo ifdown --force wlan1 and then sudo ifup --force wlan1
What you are looking for:
wlan0, wlan1 etc.. what are these? Take note of description, make/model, IP, MAC, chipset
Edit the file /etc/network/interfaces to look like this adding your own network names and passwords
Look for the below in the last file- should look same same/ similar and will allow the 2 adapters to play together- mind your power consumption where you may require a powered hub, find 1 with 5v, 4amps preferably- also mind USB version...2 or 3? Your devices compatible> Cables? OTG? Hub compatible?: Continue on....
auto lo
iface lo inet loopback
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "Network-0"
wpa-psk "Password-0"
allow-hotplug wlan1
iface wlan1 inet dhcp
wpa-ssid "Network-1"
wpa-psk "Password-1"
Hardware Mentions
Hardware confirmed to work:
...Edimax EW-7811Un, using rtl8188cus driver, and TP-LINK TL-WN725N V2, using rtl8188eu driver. I have sometimes had 4 of these connected to my Pi at the same time and all working. -- from https://forums.raspberrypi.com/viewtopic.php?p=385707&sid=68d34da69e7472b3a2ffc9b469822e9c#p385707
Primarily use devices that use the 8192cu and 8188eu drivers, Edimax EW-7811Un and TP-Link TL-WN725N V2 but also sometimes use Edimax EW-7622UMn (r8712u driver) and Netgear WNA1100 (Atheros ath9k_htc driver). -- From https://forums.raspberrypi.com/viewtopic.php?p=459833&sid=68d34da69e7472b3a2ffc9b469822e9c#p459833
Other Considerations
Issues with resolution:
One was powered by the 8192cu module, the other one was a r8712u. Each of them worked fine as long as you connected them separately. At the moment run the two of them together, the wlan1 device would not register,
Solution that Worked
This worked:
The solution was to first suppress the loading of the modules by blacklisting and load them in a specific order later on:
$ sudo vi /etc/modprobe.d/wlan-blacklist.conf
blacklist r8712u
blacklist 8192cu
$ sudo depmod -ae (may have issues here where instead of -ae you may require -E or -F)
$ 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
Reboot
and it worked for this person...
More to add to the above solution:
https://forums.raspberrypi.com/viewtopic.php?p=891662&sid=68d34da69e7472b3a2ffc9b469822e9c#p891662
To have your interfaces/ adapters named with specific interface names - from https://forums.raspberrypi.com/viewtopic.php?p=1302491&sid=4e8b91bc6ed59e0528e5121e58854e45#p1302491
Create a new file in directory /etc/wpa_supplicant/. The new file should be named with interface name i.e
wpa_supplicant-wlan1.conf
- file /etc/wpa_supplicant/wpa_supplicant-wlan0.conf for interface wlan0
- file /etc/wpa_supplicant/wpa_supplicant-wlan1.conf for interface wlan1
- content of wpa_supplicant-wlan0.conf file
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="ssid0"
psk="pass0"
}
- content of wpa_supplicant-wlan1.conf file
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
ssid="ssid1"
psk="pass1"
}
reboot PI and you should have SSID attached to an interface.
Final Comment
If you don't get 2 WiFi adapters to work after all that then... I wish you good luck. But, if you do find a different solution that wasn't found here, yet worked for you, then report back- leave a comment- If it works, then i'll feature your solution also.
Anyone else, if this helped, please do let me know- or maybe you required a bit oif editing of the info above- leave a comment- it will help others.
Comments
Post a Comment