LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-19-2017, 12:43 AM   #1
microcircuit
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Rep: Reputation: Disabled
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.

Last edited by microcircuit; 07-19-2017 at 01:01 AM. Reason: accidently posted before I was finished writing
 
Old 07-19-2017, 04:11 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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.
 
Old 07-19-2017, 04:35 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,294

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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.
 
Old 07-19-2017, 03:30 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
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.
 
Old 07-21-2017, 01:29 AM   #5
microcircuit
LQ Newbie
 
Registered: Jul 2017
Posts: 2

Original Poster
Rep: Reputation: Disabled
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
 
Old 07-21-2017, 02:31 AM   #6
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Quote:
Originally Posted by business_kid View Post
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.
 
Old 07-21-2017, 10:10 AM   #7
Mike_Walsh
Member
 
Registered: Jul 2017
Location: King's Lynn, UK
Distribution: Nowt but Puppies....
Posts: 660

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
I can't comprehend why you would want two wireless adapters running simultaneously. What are you actually trying to achieve here?


Mike.
 
Old 07-22-2017, 07:49 PM   #8
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
@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.

Last edited by AwesomeMachine; 07-22-2017 at 07:50 PM.
 
Old 07-23-2017, 02:56 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,294

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
@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?
 
Old 07-23-2017, 07:39 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625Reputation: 3625
Sent pm
 
1 members found this post helpful.
Old 07-24-2017, 06:19 AM   #11
Mike_Walsh
Member
 
Registered: Jul 2017
Location: King's Lynn, UK
Distribution: Nowt but Puppies....
Posts: 660

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362
Quote:
Originally Posted by AwesomeMachine View Post
@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.
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...)


Mike.
 
Old 07-24-2017, 07:07 AM   #12
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
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 ###)
 
Old 08-02-2017, 12:55 AM   #13
coltree
Member
 
Registered: Nov 2003
Location: Jacobs Well, Queensland AU
Distribution: OpenBSD
Posts: 102
Blog Entries: 1

Rep: Reputation: 34
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
 
Old 08-02-2017, 10:23 AM   #14
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
# 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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] getting wifi card driver on openSUSE lapishater276 Linux - Newbie 11 10-11-2014 12:10 PM
Broadcom Wifi Driver Issue nicxclusive Linux - Newbie 4 01-03-2012 09:34 AM
how to develop a wifi's driver by using the SDIO WIFI card the hope Linux - Software 2 03-15-2011 02:57 AM
Force WIFI card to use Hostap driver Fusspils Linux - Wireless Networking 3 08-26-2007 05:57 PM
Driver for Linksys Wifi Card jbraum Linux - Wireless Networking 1 12-01-2003 10:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration