LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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
 
LinkBack Search this Thread
Old 12-09-2012, 10:11 PM   #16
ursusca
Member
 
Registered: Sep 2008
Location: Toronto, ON, Canada
Distribution: Gentoo, RHEL (Fedora, CentOS, OEL), Ubuntu, FreeBSD, Solaris 10
Posts: 170

Original Poster
Rep: Reputation: 34

I think the ralink driver is for kernel 2.6 Maybe it's not compatible with version 3 yet. I'll try to play with virtual CentOS.
 
Old 12-10-2012, 09:03 AM   #17
smnemeth
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Rep: Reputation: Disabled
I've been working on this still and have gotten nowhere. Upgraded the lib firmware, and there was no difference.

I think the basic problem is in the WPA security code in the driver. The reason is cause without wireless security being used, the unit works perfectly fine. With security enabled, I see the stations, and it attempts to connect but fails.

From one of my first logs, notice these lines:

[11971.993855] /home/scott/tplink_driver/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_asic.c:2630 assert KeyIdx < 4failed
[11971.995999] /home/scott/tplink_driver/DPO_RT5572_LinuxSTA_2.6.1.3_20121022/os/linux/../../common/cmm_asic.c:2630 assert KeyIdx < 4failed

These lines are indeed in a function related to security and could be the reason why the unit fails. Also when code throws an assertion like this, it stops the process dead in its tracks, which means whatever process was running this code has now stopped.

I have also tried to get a wpa_supplicant log file but have been unable to generate one and/or find it. I think it could help in identifying exactly where the problem is. I believe my built in card uses wpa_supplicant as well, so it seems to work great for that card.

I don't have time to do this right now cause I'm helping my son through some college finals, but here's what I would look at next.

1) Enable debugging for the driver. I see they have debug stuff in the code, it should be just a matter of turning on a Makefile flag to enable debug.

Looking at this code

Code:
VOID AsicRemoveSharedKeyEntry(
	IN PRTMP_ADAPTER pAd,
	IN UCHAR		 BssIndex,
	IN UCHAR		 KeyIdx)
{
	/*ULONG SecCsr0;*/
	SHAREDKEY_MODE_STRUC csr1;

	DBGPRINT(RT_DEBUG_TRACE,("AsicRemoveSharedKeyEntry: #%d \n", BssIndex*4 + KeyIdx));

	RTMP_IO_READ32(pAd, SHARED_KEY_MODE_BASE+4*(BssIndex/2), &csr1.word);
	if ((BssIndex%2) == 0)
	{
		if (KeyIdx == 0)
			csr1.field.Bss0Key0CipherAlg = 0;
		else if (KeyIdx == 1)
			csr1.field.Bss0Key1CipherAlg = 0;
		else if (KeyIdx == 2)
			csr1.field.Bss0Key2CipherAlg = 0;
		else
			csr1.field.Bss0Key3CipherAlg = 0;
	}
	else
	{
		if (KeyIdx == 0)
			csr1.field.Bss1Key0CipherAlg = 0;
		else if (KeyIdx == 1)
			csr1.field.Bss1Key1CipherAlg = 0;
		else if (KeyIdx == 2)
			csr1.field.Bss1Key2CipherAlg = 0;
		else
			csr1.field.Bss1Key3CipherAlg = 0;
	}
	DBGPRINT(RT_DEBUG_TRACE,("Write: SHARED_KEY_MODE_BASE at this Bss[%d] = 0x%x \n", BssIndex, csr1.word));
	RTMP_IO_WRITE32(pAd, SHARED_KEY_MODE_BASE+4*(BssIndex/2), csr1.word);
	ASSERT(BssIndex < 4);
	ASSERT(KeyIdx < 4);
Notice that if the KeyIdx is not 0-3 (which it's not cause the assertion < 4 fails), we end up with using csr1.field.Bss1Key3CipherAlg = 0 (a default case). Not sure where to go with this but debugging here would help.

2) Put a print/debug statement in the code above to figure out why this assertion is happening.
3) This could get deep into the code, but it's possible they have a bug related to 32/64 bit memory size. Lots of pointers and memory stuff going on here.
4) Another option is just comment out that one assertion and see if it works. Not the most desirable thing to do, cause they probably put that in there for a good reason, but who knows.

If you get any more progress or log files post them up and we can all take a look.

Scott

Last edited by smnemeth; 12-10-2012 at 09:04 AM.
 
1 members found this post helpful.
Old 12-10-2012, 09:18 AM   #18
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,970

Rep: Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848Reputation: 848
Scott, thanks for your explicatory posting.
Quote:
Originally Posted by smnemeth
I have also tried to get a wpa_supplicant log file but have been unable to generate one and/or find it. I think it could help in identifying exactly where the problem is. I believe my built in card uses wpa_supplicant as well, so it seems to work great for that card.
here paragraph from wpa_supplicant's manpage
Code:
-f output file
              Log output to specified file instead of stdout.
...
-d     Increase debugging verbosity (-dd even more).
...
The easiest way to debug problems, and to get debug log for bug reports, is to start wpa_supplicant on foreground with debugging enabled:

              wpa_supplicant -c/etc/wpa_supplicant.conf -iwlan0 -d
Hope this helps.

Markus
 
Old 12-10-2012, 11:57 AM   #19
EDDY1
Senior Member
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: DebianSqueeze, winsxp, wins7, Debian wheezy, LFS 7.2
Posts: 4,658

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
On my lfs system which doesn't connect to netwok autmatically I use:
Quote:
wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B
Link becomes ready.
dhclient wlan0
My SSID & Key are saved in wpa_supplicant.conf though, if yours isn't try:
Quote:
wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B
wpa_cli add_network (output of this command will determine network # you will replace the 4 in next commands with this #)
wpa_cli set_network 4 ssid '"Your SSID"'
wpa_cli set_network 4 scan_ssid 1
wpa_cli set_network 4 key_mgmt WPA-PSK
wpa_cli set_network 4 psk '"1234567890"'
wpa_cli enable_network 4
This is what you'll see as you do it.
Quote:
wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant.conf -B
# wpa_cli add_network
4 <--- note the network ID!
# wpa_cli set_network 4 ssid '"Your SSID"'
OK
# wpa_cli set_network 4 scan_ssid 1
OK
# wpa_cli set_network 4 key_mgmt WPA-PSK
OK
# wpa_cli set_network 4 psk '"1234567890"' <--- note the single quotes around
OK
# wpa_cli enable_network 4
OK

Last edited by EDDY1; 12-10-2012 at 12:09 PM.
 
Old 12-13-2012, 06:23 AM   #20
smnemeth
LQ Newbie
 
Registered: Dec 2012
Posts: 4

Rep: Reputation: Disabled
I punted on the TP-Link.

Well I decided too much time was spent trying to get the TP Link working. So I traded it in for an Asus USB-N66 Dual-Band Adapter Wireless-N900. Seems the chipset is a cousin to the TP link (rt3573sta) as building the kernel module was exactly the same but with different source download. The Asus unit is bigger, but that's OK since I'm using it primarily for a desktop unit. It comes with a powered antenna.

Another reason I bought it, is cause Asus actually claimed on the side of the box to support Linux. Good to support OEM's that will have anything to do with Linux.

It works with all bands and WPA2 encryption. The N band right now seems a little slow and it looks like I need to make some tweaks to optimize it, but it does work.

The only down side is it was more expensive. I paid $26 for the TP link while the Asus N66 cost $50.

Hope you get the TP Link working or find something else that works.

Scott

p.s. The Asus N66 worked on two separate computers, a laptop and desktop, both with Ubuntu 12.04.

Last edited by smnemeth; 12-13-2012 at 06:24 AM.
 
Old 10-10-2013, 10:24 PM   #21
ursusca
Member
 
Registered: Sep 2008
Location: Toronto, ON, Canada
Distribution: Gentoo, RHEL (Fedora, CentOS, OEL), Ubuntu, FreeBSD, Solaris 10
Posts: 170

Original Poster
Rep: Reputation: 34
Fedora 19 solved that problem for me out of the box :-) it looks that Fedora or kernell developers use an intel driver:

Code:
lspci -k | grep -A 3 -i "network"
00:19.0 Ethernet controller: Intel Corporation 82562V-2 10/100 Network Connection (rev 02)
        Subsystem: Dell Device 0238
        Kernel driver in use: e1000e
00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 02)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ralink RT3572/rt5572 driver for ucLinux harirhk Linux - Embedded & Single-board computer 2 12-11-2011 10:12 PM
USB Wifi adapter D-Link DWA-125 (Ralink 2870) friendly distro? janimalia Linux - Wireless Networking 3 01-25-2010 02:30 PM
D-Link System DWA-140 802.11n Adapter [ralink rt2870] - Not recognized dlinux Slackware 11 12-27-2009 11:19 PM
D-Link DWA-140 802.11n USB (with Ralink RT2870 chispet) driver probs andywest Linux - Hardware 2 06-12-2008 12:40 PM
D-Link DWL G510 (Ralink Chipset) doesn't work marco18 Linux - Hardware 4 01-17-2008 06:03 AM


All times are GMT -5. The time now is 10:27 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration