Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wireless network setup: RaLink 3090 with WPA2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Sun Jul 19, 2009 3:16 pm    Post subject: wireless network setup: RaLink 3090 with WPA2 Reply with quote

Hi All

I've tried a couple of things to get my ralink card working and tried to connect to my router through WPA2

1) I installed the driver for my Ralink (downloaded the 2009_0612_RT3090_Linux_STA_V2.1.0.0_DPO driver source) seems to work :)
2) ifconfig -a
Code:
eth0      Link encap:Ethernet  HWaddr 00:01:c0:05:c2:25 
          inet addr:192.168.1.19  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::201:c0ff:fe05:c225/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:41202 errors:0 dropped:0 overruns:0 frame:0
          TX packets:27059 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:45859686 (43.7 MiB)  TX bytes:2933665 (2.7 MiB)
          Interrupt:16 Base address:0x2000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  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 00:00:00:00:00:00 
          BROADCAST 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:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:17

/etc/conf.d/net
Code:

modules="wpa_supplicant"
wpa_supplicant_ra0="-Dwext"
config_ra0="dhcp"
config_eth0="dhcp"
dhcp_eth0="nontp"

/etc/wpa_supplicant/wpa_supplicant.conf
Code:
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0
#wpa_supplicant_ra0="-Drt3090sta"
ap_scan=1

network={
   ssid="myrouter"
   #key_mgmt-WPA-PSK
   pairwise=CCMP
   group=CCMP
   proto=RSN
   psk=9c8b27977aac392afe3fffee0dd513e3b174fdb6466f99d4c7662e1b2e85e184
}

I've no idea what to put in wpa_supplicant.conf, so I can connect with my router which uses 'WPA2'
For example, if I do
Code:
# /etc/init.d/net.ra0 start
 * Caching service dependencies ...                                                                                                                                                                                                                                          [ ok ]
 * Starting ra0
SIOCSIFFLAGS: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
 *   Starting wpa_supplicant on ra0 ...
SIOCSIFFLAGS: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
Could not set interface 'ra0' UP                                                                                                                                                                                                                                             [ ok ]
 *   Starting wpa_cli on ra0 ...                                                                                                                                                                                                                                             [ ok ]
 *     Backgrounding ...

Doesn't look right, but it does something :)
Code:

$> wpa_cli
wpa_cli
wpa_cli v0.6.4
Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it
under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the
BSD license. See README and COPYING for more details.


Selected interface 'ra0'

Interactive mode

> <2>CTRL-EVENT-SCAN-RESULTS
<2>CTRL-EVENT-SCAN-RESULTS
<2>CTRL-EVENT-SCAN-RESULTS



Any help would be appreciated, because I've now clue whats going on here!?
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Sun Jul 19, 2009 5:49 pm    Post subject: Reply with quote

Try this (changes in blue)

/etc/conf.d/net:

Quote:
modules_ra0="wpa_supplicant"
#wpa_supplicant_ra0="-Dwext"
config_ra0="dhcp"
dhcpd_ra0="-t 10"
#config_eth0="dhcp"
#dhcp_eth0="nontp"


/etc/wpa_supplicant/wpa_supplicant.conf:

Quote:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
#wpa_supplicant_ra0="-Drt3090sta"
#ap_scan=1

network={
ssid="myrouter"
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
#proto=RSN
psk=9c8b27977aac392afe3fffee0dd513e3b174fdb6466f99d4c7662e1b2e85e184
}


break the /etc/init.d/net.eth0 -> /etc/init.d/net.lo link
Code:
rm /etc/init.d/net.eth0

check/make the /etc/init.d/net.ra0 -> /etc/init.d/net.lo link
Code:
ls -l /etc/init.d/ | grep -i ra0

If net.ra0 -> net.lo does not show up:
Code:
cd /etc/init.d
ln -s net.lo net.ra0

let hal and udev start the nic:

Code:
rc-update del net.eth0
rc-update del net.ra0
Back to top
View user's profile Send private message
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Mon Jul 20, 2009 7:52 am    Post subject: Reply with quote

thnx a lot!! I guess the configuration files are now correct, but I still get the SIOCSIFFLAGS messages
Code:
/etc/init.d/net.ra0 start
 * One of the files in /etc/{conf.d,init.d} or /etc/rc.conf
 * has a modification time in the future!
 * Caching service dependencies ...                                                                                                                                                                                                                                          [ ok ]
 * Starting ra0
SIOCSIFFLAGS: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
 *   Starting wpa_supplicant on ra0 ...
SIOCSIFFLAGS: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
Could not set interface 'ra0' UP                                                                                                                                                                                                                                             [ ok ]
 *   Starting wpa_cli on ra0 ...                                                                                                                                                                                                                                             [ ok ]
 *     Backgrounding ...
Is this something which might be caused by a miss configured kernel ?
BTW I didn't remove net.eth0 because I work remote on this machine
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon Jul 20, 2009 1:49 pm    Post subject: Reply with quote

* has a modification time in the future! --> your clock was/is misset

Before compiling the rt3090 driver did you?
Quote:
In <your path>/2009_0612_RT3090_Linux_STA_V2.1.0.0_DPOos/linux/config.mk

** Build for being controlled by NetworkManager or wpa_supplicant wext functions
Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.


Last edited by DONAHUE on Mon Jul 20, 2009 2:08 pm; edited 1 time in total
Back to top
View user's profile Send private message
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Mon Jul 20, 2009 2:08 pm    Post subject: Reply with quote

I missed the firmware :)
So, now its all working. I can do
Code:
$> iwlist ra0 scan

However it doesn't connect with my router!
If I do net.ra0 start I see the following in my messages
Code:
ul 20 17:04:14 tux RX DESC e7fa2000  size = 2048
Jul 20 17:04:14 tux <-- RTMPAllocTxRxRingMemory, Status=0
Jul 20 17:04:14 tux Key1Str is Invalid key length(0) or Type(0)
Jul 20 17:04:14 tux Key2Str is Invalid key length(0) or Type(0)
Jul 20 17:04:14 tux Key3Str is Invalid key length(0) or Type(0)
Jul 20 17:04:14 tux Key4Str is Invalid key length(0) or Type(0)
Jul 20 17:04:14 tux AntDiversity=0
Jul 20 17:04:14 tux 1. Phy Mode = 9
Jul 20 17:04:14 tux 2. Phy Mode = 9
Jul 20 17:04:14 tux NVM is Efuse and its size =2d[2d0-2fc]
Jul 20 17:04:14 tux 3. Phy Mode = 9
Jul 20 17:04:14 tux RTMPSetPhyMode: channel is out of range, use first channel=1
Jul 20 17:04:14 tux MCS Set = ff 00 00 00 01
Jul 20 17:04:14 tux <==== rt28xx_init, Status=0
Jul 20 17:04:14 tux 0x1300 = 00064300
Jul 20 17:04:14 tux AUX_CTRL = 0x                            1d42
Jul 20 17:04:14 tux Read AUX_CTRL = 0x1d42
Jul 20 17:04:14 tux Write AUX_CTRL = 0x1d42
Jul 20 17:04:14 tux OSC_CTRL = 0x3ff11
Jul 20 17:04:14 tux ====> rt30xx Read PowerLevelMode =  0x3.
Jul 20 17:04:14 tux ====> rt30xx F Write 0x83 Command = 0x3.
Jul 20 17:04:20 tux ===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 478
Jul 20 17:04:20 tux ==>rt_ioctl_siwfreq::SIOCSIWFREQ[cmd=0x8b04] (Channel=1)
Jul 20 17:04:24 tux ra0: no IPv6 routers present
Jul 20 17:04:35 tux ===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 478
Jul 20 17:04:35 tux ==>rt_ioctl_siwfreq::SIOCSIWFREQ[cmd=0x8b04] (Channel=1)
I get the impression something is wrong with the key!?

UPDATE: the key was generated as follows
Code:

$> wpa_passphrase myrouter "djwkdiddj ekajsjehins"
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon Jul 20, 2009 2:11 pm    Post subject: Reply with quote

I use an 8 character key which requires quotes, PSK="abcdefgh"
The router has the same key as the NIC?
Before compiling the rt3090 driver did you?
Quote:
In <your path>/2009_0612_RT3090_Linux_STA_V2.1.0.0_DPOos/linux/config.mk

** Build for being controlled by NetworkManager or wpa_supplicant wext functions
Please set 'HAS_WPA_SUPPLICANT=y' and 'HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y'.
Back to top
View user's profile Send private message
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Mon Jul 20, 2009 2:54 pm    Post subject: Reply with quote

wow, thats it :)

The strange thing is that I still see the Key1Str problem:
Code:
Jul 20 17:49:45 tux RX DESC f6383000  size = 2048
Jul 20 17:49:45 tux <-- RTMPAllocTxRxRingMemory, Status=0
Jul 20 17:49:45 tux Key1Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux Key2Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux Key3Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux Key4Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux AntDiversity=0
Jul 20 17:49:45 tux 1. Phy Mode = 9
Jul 20 17:49:45 tux 2. Phy Mode = 9
Jul 20 17:49:45 tux NVM is Efuse and its size =2d[2d0-2fc]
Jul 20 17:49:45 tux 3. Phy Mode = 9
Jul 20 17:49:45 tux RTMPSetPhyMode: channel is out of range, use first channel=1
Jul 20 17:49:45 tux MCS Set = ff 00 00 00 01
Jul 20 17:49:46 tux <==== rt28xx_init, Status=0
Jul 20 17:49:46 tux 0x1300 = 00064300
Jul 20 17:49:46 tux AUX_CTRL = 0x                            1d42
Jul 20 17:49:46 tux Read AUX_CTRL = 0x1d42
Jul 20 17:49:46 tux Write AUX_CTRL = 0x1d42
Jul 20 17:49:46 tux OSC_CTRL = 0x3ff11
Jul 20 17:49:46 tux ====> rt30xx Read PowerLevelMode =  0x3.
Jul 20 17:49:46 tux ====> rt30xx F Write 0x83 Command = 0x3.
Jul 20 17:49:51 tux ===>rt_ioctl_giwscan. 3(3) BSS returned, data->length = 478
Jul 20 17:49:51 tux ==>rt_ioctl_siwfreq::SIOCSIWFREQ[cmd=0x8b04] (Channel=1)
Jul 20 17:49:51 tux wpa_cli: interface ra0 CONNECTED
Jul 20 17:49:52 tux dhcpcd[13407]: ra0: dhcpcd 4.0.13 starting
Jul 20 17:49:52 tux dhcpcd[13407]: ra0: broadcasting for a lease
Jul 20 17:49:53 tux dhcpcd[13407]: ra0: offered 192.168.1.22 from 192.168.1.1
Jul 20 17:49:53 tux dhcpcd[13407]: ra0: acknowledged 192.168.1.22 from 192.168.1.1
Jul 20 17:49:53 tux dhcpcd[13407]: ra0: checking 192.168.1.22 is available on attached networks
Jul 20 17:49:53 tux dhcpcd[13407]: ra0: ignoring message; no Server ID
Jul 20 17:49:56 tux ra0: no IPv6 routers present
Jul 20 17:49:58 tux dhcpcd[13407]: ra0: leased 192.168.1.22 for 604800 seconds
so I guess it has to do with something else!!

Thnx you so much!!
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon Jul 20, 2009 2:59 pm    Post subject: Reply with quote

Quote:
Jul 20 17:49:45 tux Key1Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux Key2Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux Key3Str is Invalid key length(0) or Type(0)
Jul 20 17:49:45 tux Key4Str is Invalid key length(0) or Type(0)

related to WEP, i believe, so not meaningful for your situation.

excellent catch on the firmware, my 2860 compiles/installs put the firmware on integrally, I would have been a longtime guessing on that.
Back to top
View user's profile Send private message
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Mon Jul 20, 2009 3:12 pm    Post subject: Reply with quote

the firmware problem is really odd. Also the location (/etc/Wireless) is strange. For those interested, the fix is:

Code:
$> cd /etc/Wireless
$> ln -s ln -s RT3090STA RT2860STA


One more thing, when I remove net.eth0 and net.ra0 from rc-update I don't think anything will start!

So, what shoud udev do ?

UPDATE: I donwloaded the driver from http://www.ralinktech.com/ralink/Home/Support/Linux.html


Last edited by jeanluca on Tue Jul 21, 2009 12:09 pm; edited 2 times in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7651
Location: Goose Creek SC

PostPosted: Mon Jul 20, 2009 4:08 pm    Post subject: Reply with quote

if they don't start, leave them in.
If they don't start, I probably have made some kernel choices that you haven't or vice versa.
I have dbus and hal in USE=" in /etc/make.conf
Back to top
View user's profile Send private message
jeanluca
Apprentice
Apprentice


Joined: 08 Jan 2005
Posts: 179

PostPosted: Tue Jul 21, 2009 6:50 am    Post subject: Reply with quote

If I add hal and dbus and rebuild some packages I get the following message during boot
Code:
waiting for uevents to be processed

which seems to take forever (it never continues), so I think I'll keep net.ra0! and remove hal and dbus!

thnx a lot
LuCa
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum