Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
Last edited by microcircuit; 07-19-2017 at 01:01 AM.
Reason: accidently posted before I was finished writing
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
Last edited by AwesomeMachine; 07-19-2017 at 04:12 AM.
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.
Last edited by business_kid; 07-19-2017 at 07:37 AM.
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.
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
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
Quote:
Originally Posted by business_kid
I wouldn't be dogmatic and say that 2 devices cannot use the same driver
Unless the driver is designed to use more than one device at a time, it will only use one device. AFAIK, most, if not all, Linux wireless drivers are designed to control one device.
@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?
You need two wireless adapters to connect to two wireless networks at the same time, which, in and of itself, is a bit obscure.
Oh, that bit is self-obvious, yes. The bit I can't get my head round is why anybody would want two separate network connections running at the same time? I know it's possible; I've had situations where both eth0 and wlan0 (or wlan1) are active at the same time - unintentionally - and they haven't interfered with each other, it's true; but that wasn't 'planned'.
This, ( as you say!), is getting into the realms of the obscure. (Well, it is to me...)
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.