double wifi card driver issue
Hello, I am having trouble configuring two wireless usb devices on my linux debian machine. I am trying to get two wireless usb adapters to both be visible to the machine and both use the correct drivers. The two wireless usb adapters are the same exact same model, TP-Link TL-WN722N, which uses the ath9k_htc driver. When I plug the devices in, they are recognized by the OS fine, but only one of them is assigned the right driver. The other is assigned the driver rtl8188eu, which is not the correct driver and causes the device to not function properly. I would like to have both devices plugged in and using the ath9k_htc driver, so I attempted to unbind the device using the rtl8188eu driver from the driver and rebind it to the proper one. I did this by following the tutorial in this link:
https://lwn.net/Articles/143397/ In the process of doing this, however, I am unable to bind the usb adapter back to the correct driver, ath9k_htc. When I do this by running the command echo -n "2-1.1:1.0" > /sys/bus/usb/drivers/ath9k_htc/bind I am given the error: bash: echo: write error: No such device Which is strange because I specifically checked the /sys/bus/usb/devices folder and found that 2-1.1:1.0 was in it, meaning the device is clearly there. Can two devices not use the same driver? Or is there something wrong with the way I am trying to bind the device? Also, I noticed that within the /sys/bus/usb/devices/2-1.1:1.0 folder there is a subsystem symbolic link if that has anything to do with the problem. Any help is greatly appreciated. |
I don't think it will work with identical cards, because you would require 2 instances of the driver, and I don't think it will tolerate that. But if you use different drivers you can connect to multiple wifi networks. Just be a little careful.
|
I wouldn't be dogmatic and say that 2 devices cannot use the same driver, but the potential for confusion is huge. The driver will have variables stored, and you will have 2 values presented to them; I imagine it will only store 1.
I would approach that as wlan0 & wlan1. Remove every trace of them & ath9k, and start in a terminal from scratch with ifconfig or it's successor, ip. Now module options reside in /lib/modprobe.d (populated by distro) & /etc/modprobe.d, which overrides that. I wouldn't fart about in /sys, but write /etc/modprobe.d/wlan0.conf & wlan1.conf specifying the ath9k_htc module. When this doesn't work, I would then trying getting the second (non functional) card going first, and see if the functional card is disabled when you do that. If so, give up. You would have to rename the module, and alter the code renaming every variable in it and dependent modules. An experienced programmer would take a week at least kernel hacking to try and stand that up. Far better to buy another wifi card, or juyst use 1. Then there's routing, which is another nightmare you haven't got to yet. Believe you me, bridging and/or routing is going to be a nightmare. |
Hello and welcome to LQ.
Off hand I'd think that you could use maybe 4 devices at least maybe way more. There shouldn't be a single use but you never know what happened when the person(s) wrote the driver. Example for internal nic http://coderazzi.net/linux/dual_nic_linux.htm so maybe some oddity of usb. |
It sounds like it would just be easier for me to use two different model cards rather than two identical ones. I'm going to try what buisness_kid said, but I'll probably just end up getting a different model card. Thanks for the help
|
Quote:
|
I can't comprehend why you would want two wireless adapters running simultaneously. What are you actually trying to achieve here?
Mike. |
@Mike_Walsh
You need two wireless adapters to connect to two wireless networks at the same time, which, in and of itself, is a bit obscure. |
@Awesomemachine: I don't strongly object to the content of your sigfile, but when the sigfile is so much bigger than the post, perhaps we're overdoing it a little?
|
Sent pm
|
Quote:
This, ( as you say!), is getting into the realms of the obscure. (Well, it is to me...) Mike. |
You might want to verify that they actually are "identical" devices. It's not uncommon for "parts" to be swapped for devices sold as the same make and model in the same cosmetic casing. If the [vendor:device] number differs, they probably are NOT the same. Otherwise it does depend on how the driver is written. It is common for someone to have multiple audio devices of the same type and many of those drivers do handle it. But I've had issues with two of the same powered usb hubs not playing nice. And wireless drivers in linux are not the shining example of how things should be done.
You could probably save yourself some headache and NOT use two of the same devices. Otherwise file a bug report. The coder in me would guess that the driver doesn't know how to load the firmware blob to the other device when there's more than one. The admin in me would probably ethernet bridge to the other device on a low powered sbc like a raspberry pi as a work around. But neither of those are my day job anymore. (labor shortage my ###) |
I've got 2 usb wifi dongles both RTL8188CUS plugged in
it just works I've got wlan0 setup using wicd which will only work with one wifi connection, wlan1 is just sitting there doing nothing, I would suggest setting it up manually using /etc/network/interfaces root@home:/home/me# lsusb Bus 002 Device 001: ID 1d6b: 0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 046d: c52e Logitech, Inc. MK260 Wireless Combo Receiver Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 003: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter Bus 001 Device 002: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub root@home:/home/me# iwconfig wlan1 wlan1 unassociated Nickname:"<WIFI@REALTEK>" Mode:Auto Frequency=2.412 GHz Access Point: Not-Associated Sensitivity:0/0 Retry: off RTS thr: off Fragment thr: off Encryption key: off Power Management: off Link Quality: 0 Signal level:0 Noise level: 0 Rx invalid nwid: 0 Rx invalid crypt: 0 Rx invalid frag: 0 Tx excessive retries:0 Invalid misc: 0 Missed beacon: 0 root@home:/home/me# iwconfig wlan0 wlan0 IEEE 802.11bgn ESSID: "Telstra" Nickname:"<WIFI@REALTEK>" Mode:Managed Frequency:2.437 GHz Access Point: C4:EA:1D:AD:B3:57 Bit Rate:65 Mb/s Sensitivity: 0/0 Retry: off RTS thr: off Fragment thr: off Encryption key: ****-****-****-****-****-****-****-**** Security mode: open Power Management: off Link Quality=100/100 Signal level=70/100 Noise level=0/100 Rx invalid nwid: 0 Rx invalid crypt: 0 Rx invalid frag: 0 Tx excessive retries: 0 Invalid misc: 0 Missed beacon:0 |
# ifconfig -a
$ ip link show Not that it would have different results. $ iwconfig $ iw dev Still probably not useful. $ dmesg | grep -i wl Should show at least one of the devices being claimed by a driver and it's assigned device name. Otherwise it looks like you did get two of the same device internally as well as externally. Perhaps unplug and replug one of them (the one not working) and check dmesg again. $ dmesg | tail -n 20 |
All times are GMT -5. The time now is 03:51 AM. |