Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

RT3070 based usb-wifi dongle - wpa_supplicant not connecting

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Post Reply
Advanced search
12 posts • Page 1 of 1
Author
Message
wedz
n00b
n00b
Posts: 4
Joined: Mon Apr 15, 2013 1:28 pm

RT3070 based usb-wifi dongle - wpa_supplicant not connecting

  • Quote

Post by wedz » Mon Apr 15, 2013 1:46 pm

Hi all,

I'm sorry to post this not actually a "Gentoo related" problem, but I have been reading through a lot of exactly same symptoms for Ralinks rt3070 based chipsets from these forums, and there seems to be a lot of knowledge around here on the subject.

I am actually running an ARM development board (based on Freescale iMX233), and I have created my rootfs with buildroot (ver. 2013.2).
Compiled kernel is based on Freescales mainline kernel with patches for 3.8.

I use cross compiling tools generated by buildroot, and compile my Ralinks official driver (http://www.mediatek.com/_en/07_download ... php?sn=501 - RT8070 /RT3070 /RT3370 /RT5370 /RT5372 USB). I think many people around here have been compiling same driver.
The driver is compiled ok, and I am able to load it into kernel, and I can bring "ra0" interface up:

Code: Select all

# ifconfig ra0 up
[ 2401.580000] (Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc] 
[ 2402.140000] RTMP_TimerListAdd: add timer obj c4ae2170!
[ 2402.150000] RTMP_TimerListAdd: add timer obj c4ae21c8!
[ 2402.150000] RTMP_TimerListAdd: add timer obj c4ae2220!
[ 2402.160000] RTMP_TimerListAdd: add timer obj c4ae2118!
[ 2402.160000] RTMP_TimerListAdd: add timer obj c4ae2010!
[ 2402.170000] RTMP_TimerListAdd: add timer obj c4ae2068!
[ 2402.170000] RTMP_TimerListAdd: add timer obj c4aacba4!
[ 2402.180000] RTMP_TimerListAdd: add timer obj c4a9c260!
[ 2402.180000] RTMP_TimerListAdd: add timer obj c4a9c2c0!
[ 2402.190000] RTMP_TimerListAdd: add timer obj c4aaccc0!
[ 2402.190000] RTMP_TimerListAdd: add timer obj c4aacaf4!
[ 2402.200000] RTMP_TimerListAdd: add timer obj c4aacc64!
[ 2402.210000] -->RTUSBVenderReset
[ 2402.220000] <--RTUSBVenderReset
[ 2403.240000] CfgSetCountryRegion():CountryRegion in eeprom was programmed
[ 2403.250000] CfgSetCountryRegion():CountryRegion in eeprom was programmed
[ 2403.260000] Key1Str is Invalid key length(0) or Type(0)
[ 2403.260000] Key2Str is Invalid key length(0) or Type(0)
[ 2403.270000] Key3Str is Invalid key length(0) or Type(0)
[ 2403.280000] Key4Str is Invalid key length(0) or Type(0)
[ 2403.280000] 1. Phy Mode = 5
[ 2403.290000] 2. Phy Mode = 5
[ 2403.290000] NVM is Efuse and its size =2d[2d0-2fc] 
[ 2403.430000] phy mode> Error! The chip does not support 5G band 5!
[ 2403.440000] (Efuse for 3062/3562/3572) Size=0x2d [2d0-2fc] 
[ 2403.500000] 3. Phy Mode = 9
[ 2403.510000] AntCfgInit: primary/secondary ant 0/1
MCS Set = ff 00 00 00 01
[ 2403.700000] <==== rt28xx_init, Status=0
[ 2403.700000] 0x1300 = 00064300
# ifconfig 
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ra0       Link encap:Ethernet  HWaddr 10:6F:3F:EC:C9:9F  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:209798 (204.8 KiB)  TX bytes:41862 (40.8 KiB)
Wifi scan works, I can see neighboring APs:

Code: Select all

# iwlist ra0 scan
[ 2442.870000] ===>rt_ioctl_giwscan. 9(9) BSS returned, data->length = 1515
ra0       Scan completed :
          Cell 01 - Address: 7C:E9:D3:A8:73:7F
                    Protocol:802.11b/g/n
                    ESSID:"7CE9D3AED861"
                    Mode:Managed
                    Frequency:2.412 GHz (Channel 1)
-- snip --
I have created a very minimal wpa_supplicant.conf to /etc:
For testing purposes I have set my 2.4GHz encryption to WPA-TKIP, and password is "testataan"

Code: Select all

network={
        ssid="O_o"
	scan_ssid=1
	key_mgmt=WPA-PSK
	proto=WPA
	psk="testataan"
}
The RT2870STA.dat file, that instructs the driver is located in /etc/Wireless/RT2870STA/RT2870STA.dat
It can be found in full here: http://paste.ubuntu.com/5710369/

Now, when I try to connect to my network, I use command:

Code: Select all

# wpa_supplicant -Dwext -i ra0 -c /etc/wpa_supplicant.conf -K -d
That always ends up with these 2 messages:

Code: Select all

ra0: Association request to the driver failed
ra0: Authentication with 54:04:a6:8f:b3:4a timed out.
I also uploaded full debug log (messages that come with -d -K parameters): http://paste.ubuntu.com/5710366/

What I would like to ask is what could be wrong here ? Why all WPA connections always fail ? Is my wpa_supplicant.conf file ok ? Is there some simple reason why "driver association" fails ?
Am I giving the password and encryption details correctly ? (I also did try wpa_passphrase, and it generated a hex string, but that didn't help).
I am not so experienced in this embedded world (and this is my first own linux project as well), so please don't hesitate to suggest anything!
Thank you!
Top
chithanh
Retired Dev
Retired Dev
User avatar
Posts: 2158
Joined: Sat Aug 05, 2006 10:16 pm
Location: Berlin, Germany

  • Quote

Post by chithanh » Mon Apr 15, 2013 3:33 pm

In my experience the ralink driver is very crappy. Install it only if you cannot use the in-kernel rt2800 driver for some reason.
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Mon Apr 15, 2013 3:42 pm

wedz ...

Here isn't really the place to get general linux/embedded support, as the banner states "gentoo linux forums". I'll request admin move this to "Unsuported Software".

Anyhow, if it is a rt3070 then there is an in kernel driver, CONFIG_RT2800USB.

"This adds support for rt27xx/rt28xx/rt30xx wireless chipset family. Supported chips: RT2770, RT2870 & RT3070, RT3071 & RT3072"

So I'd suggest you use this rather than the one from ralink, the reason being that this will use CFG80211 and not WEXT, which seems to be root cause of problem your having above (note, iwlist, which uses WEXT works). Also, wpa_supplicant can be built with various build time switches, so you should check to see if either NL80211 and/or WEXT are enabled.

best ... khay
Top
chithanh
Retired Dev
Retired Dev
User avatar
Posts: 2158
Joined: Sat Aug 05, 2006 10:16 pm
Location: Berlin, Germany

  • Quote

Post by chithanh » Mon Apr 15, 2013 3:43 pm

the ralink driver only supports wireless extensions, and not cfg80211
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Mon Apr 15, 2013 3:45 pm

chithanh wrote:the ralink driver only supports wireless extensions, and not cfg80211
chithanh ... oh, I stand corrected.

best ... khay
Top
John R. Graham
Administrator
Administrator
User avatar
Posts: 10898
Joined: Tue Mar 08, 2005 3:39 pm
Location: Somewhere over Winder, Georgia, USA

  • Quote

Post by John R. Graham » Mon Apr 15, 2013 3:47 pm

Moved from Networking & Security to Unsupported Software. As noted by khayyam, not about Gentoo so it fits better here.

- John
I can confirm that I have received between 0 and 499 National Security Letters.
Top
wedz
n00b
n00b
Posts: 4
Joined: Mon Apr 15, 2013 1:28 pm

  • Quote

Post by wedz » Tue Apr 16, 2013 12:34 am

Hi,

First of all, thank you for all your suggestions guys. And once more, sorry for being so selfish and using this forum for non-gentoo related questions.

khayyam, I will heed your and chithanh's suggestion, and try using the driver in the kernel tonight.
But can you explain me how you noticed that WEXT is at fault in my logs? I would like to be able to understand how all this works, since I will probably need to support many type of configurations, and I expect I will see other issues with different encryption algorithms for example..
Also, what is the difference with CFG80211 and WEXT ? I may be totally off target here, but it was my understanding that WEXT is like an general interface, that drivers can support, so that kernel components (such as wpa_supplicant ?) can control vendor specific drivers.. ?

What is the correct way to configure rt2800usb driver? I mean things like encryption and passwords? I'm confused now with the ralink driver, since it seems to have that RT2860STA.dat file, that has some information about encryption, but I seem to configure all the necessary information already to wo wpa_supplicant.conf - maybe this is my downfall that I'm having 2 config files, and the driver is getting crazy ?
Top
chithanh
Retired Dev
Retired Dev
User avatar
Posts: 2158
Joined: Sat Aug 05, 2006 10:16 pm
Location: Berlin, Germany

  • Quote

Post by chithanh » Tue Apr 16, 2013 12:54 am

"wext" is the legacy wireless extensions, which are used by some old drivers in the kernel (e.g. ipw2200) and many external drivers.

cfg80211 is the new configuration interface, which is used by all modern drivers in the kernel. In contrast to wext it supports functions like regulatory domain support. wpa_supplicant is called with -Dnl80211 parameter to use this.
Top
wedz
n00b
n00b
Posts: 4
Joined: Mon Apr 15, 2013 1:28 pm

  • Quote

Post by wedz » Tue Apr 16, 2013 1:34 am

chithanh, thank you for your explanation.

Do you have any advice regarding configuration of wpa_supplicant (or WEP/no encryption for that matter)?

Is there some guide how WLAN configuration should be done properly, so that I could get my head around it ? I need to figure out how to implement my own configuration system for users in the field. And I need to create some simple external interface for end users to setup their network configuration, without console access.
My current plan is to use a simple application on a smartphone, that will send the information to the board, and board will need to configure itself according to the instructions from the user..
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Tue Apr 16, 2013 8:31 am

wedz wrote:But can you explain me how you noticed that WEXT is at fault in my logs? I would like to be able to understand how all this works, since I will probably need to support many type of configurations, and I expect I will see other issues with different encryption algorithms for example.
wedz ... it wasn't so much that that I noticed WEXT at fault (and to which I should note chithanh corrected my assumption that the rt3070 driver uses cfg80211/nl80211) it was that iwlist (from wireless-tools which uses the old WEXT) worked whereas wpa_supplicant didn't. This suggesed to me that either the kernel driver didn't support cfg80211 or that wpa_supplicant was built without support for WEXT (which was the gist of the second pointer I provided). Having now been corrected its probably the latter which is the issue, as I said wpa_supplicant has many build time options, two of which are CONFIG_DRIVER_WEXT and CONFIG_DRIVER_NL80211. If I were to hazard a guess its probably the case that your build doesn't have CONFIG_DRIVER_WEXT=y but that is just the most obvious assumption as it may be the ralink provided driver or the *.dat.
wedz wrote:Also, what is the difference with CFG80211 and WEXT? I may be totally off target here, but it was my understanding that WEXT is like an general interface, that drivers can support, so that kernel components (such as wpa_supplicant ?) can control vendor specific drivers.. ?
chithanh pretty much answered this but I'll add to that some links which might help: mac80211 and the various documentation on mac80211, and a brief rundown on wirless extentions
wedz wrote:What is the correct way to configure rt2800usb driver? I mean things like encryption and passwords? I'm confused now with the ralink driver, since it seems to have that RT2860STA.dat file, that has some information about encryption, but I seem to configure all the necessary information already to wo wpa_supplicant.conf - maybe this is my downfall that I'm having 2 config files, and the driver is getting crazy ?
I'm not sure what options are available for the driver, but this is not really how they are "configured" this aspect (the authentication, encryption, etc) is done in userland via applications like wpa_supplicant, wireless-tools, iw, hostapd.

best ... khay
Top
wedz
n00b
n00b
Posts: 4
Joined: Mon Apr 15, 2013 1:28 pm

  • Quote

Post by wedz » Wed Apr 17, 2013 1:35 pm

Thanks guys for your help, I will try to study up, and get my wlan working 8)
Top
sikol
n00b
n00b
Posts: 1
Joined: Tue Jun 04, 2013 8:13 am

Re: RT3070 based usb-wifi dongle - wpa_supplicant not connec

  • Quote

Post by sikol » Tue Jun 04, 2013 8:21 am

wedz wrote:

Code: Select all

network={
        ssid="O_o"
	scan_ssid=1
	key_mgmt=WPA-PSK
	proto=WPA
	psk="testataan"
}
hey wedz, i have work a lot at RT3070, and it worked fine. You can modify the RT2870STA.dat to let it work, or you can fix the bug of you wpa_supplicant.conf here. use wpa_passphrase "your_ssid" "your_psk" and replacement its output "psk=*****" with your psk="testataan".
Top
Post Reply

12 posts • Page 1 of 1

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic