Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rt61 failes because of net script problem
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
Urd
n00b
n00b


Joined: 13 Nov 2004
Posts: 48
Location: Vienna, Austria

PostPosted: Mon Oct 01, 2007 3:47 pm    Post subject: rt61 failes because of net script problem Reply with quote

Hi!

I'm currently setting up gentoo on my Notebook which is equipped with a rt61 WLAN card

Code:

lspci | grep RaLink
00:0b.0 Network controller: RaLink RT2561/RT61 rev B 802.11g


I'm using net-wireless/ralink-rt61 driver for it, because the other two drivers (rt61 and rt2x00) don't compile with my kernel.
I had the problem, that the card didn't work (not even if I configured it manually), dhcpcd just put out a time out error.

After some research I found out, that it seams to be very important in what order yo provide the driver with it's information.

The following (manual method) works for me:

Code:

# modprobe rt61
# ifconfig ra0 up
# iwconfig ra0 essid "network essid"
# iwpriv ra0 set AuthMethod=WPAPSK
# iwpriv ra0 set WPAPSK=secret_phrase
# iwpriv ra0 set EncrypType=TKIP
# dhcpcd ra0
# ifconfig ra0
ra0       Link encap:Ethernet  HWaddr 00:13:D3:75:1C:26 
          inet addr:192.168.0.10  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::213:d3ff:fe75:1c26/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:287 errors:0 dropped:0 overruns:0 frame:0
          TX packets:330 errors:0 dropped:0 overruns:0 carrier:0
          collisions:1 txqueuelen:1000
          RX bytes:30515 (29.7 Kb)  TX bytes:1197 (1.1 Kb)
          Interrupt:18



With that method I almost immediately get the IP for the WLAN card. I haven't checked any other ordersyet, but it seams like that "EncrypType" has to be after "AuthMode" and "WPAPSK".

But now back to the net script. When I run
Code:

/etc/init.d/net.ra0 --verbose start


I get the following output:
Code:

 * Starting ra0
 *   Loading networking modules for ra0
 *     modules: apipa arping ccwgroup macchanger macnet rename iwconfig essidnet iptunnel ifconfig system dhcpcd ip6to4
 *       iwconfig provides wireless
 *       ifconfig provides interface
 *       dhcpcd provides dhcp
 *   Configuring ra0 for MAC address 00:13:D3:75:1C:26 ...                                                             [ ok ]
 *   Wireless extensions not found for ra0
 *   Bringing up ra0
 *     dhcp
 *       Running dhcpcd ...
Error, ra0: timed out                                                                                                  [ ok ]
 *       ra0 received address 169.254.123.222/16


Notice the "Wireless extensions not found for ra0"? Very strange I thought to myself. I went on and checked the /lib/rcscripts/net/iwconfig.sh script. I found out that it checks /proc/net/wireless for the presence of the card. But fr some reason my card isn't showing up there, even though it works when I configure it manually. Seems to be a bug in the rt61 module.
Maybe the /lib/rcscripts/net/iwconfig.sh script could be changed to check those "buggy" rt61 module in another way. I found out that iwconfig without any parameters would work good.

Here is an example:
Code:

# modprobe rt61
# iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

sit0      no wireless extensions.

ra0       no wireless extensions.

# ifconfig ra0 up
# iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

sit0      no wireless extensions.

ra0       RT61 Wireless  ESSID:""  Nickname:""
          Mode:Auto  Frequency:2.412 GHz  Bit Rate=54 Mb/s   
          RTS thr:off   Fragment thr:off
          Encryption key:off


See? After bringing the interface up the "No wireless extensions" message disappears for ra0. Maybe the net script could use that in addition to the current check (@Roy? ;-)).

Unil that is fixed however I'll have to go without WLAN.

-Martin
_________________
"Linux is like a Wigwam, no Gates, no Windows and an Apache inside!"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Mon Oct 01, 2007 5:19 pm    Post subject: Reply with quote

Urd,

Dirty Hack ...
Add the following to your /etc/conf.d/local.start
Code:
ifconfig ra0 up
/etc/init.d/net.ra0 restart
You may want start, rather than restart.
All this does is to allow the network to fail during its normal startup then do it again right at the very end of the boot process.

Like I said, its a dirty hack.

You may want to try allowing some settling time with the commands
Code:
sleep_scan_ra0="10"
associate_timeout_ra0="5"
in your net file tool.
Its not an issue when you bring the interface up by hand. The times are in seconds and are probably excessive.

You may want to file a bug at bugs.gentoo.org too.

What kernel do you have and what version of rt2x00 were you trying?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Urd
n00b
n00b


Joined: 13 Nov 2004
Posts: 48
Location: Vienna, Austria

PostPosted: Mon Oct 01, 2007 7:36 pm    Post subject: Reply with quote

I fear that wouldn't help much. The problem i, that the script refuses to configure ra0 because it cannot find it in /proc/net/wirelss. So it doesn't matter much where or when you start it.

I currently use sys-kernel/gentoo-sources-2.6.22-r8.
The rt2x00 is the one currently available in portage. net-wireless/rt2x00-9999
_________________
"Linux is like a Wigwam, no Gates, no Windows and an Apache inside!"
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54096
Location: 56N 3W

PostPosted: Mon Oct 01, 2007 8:30 pm    Post subject: Reply with quote

Urd,

If you are feeling a little adventurous, you could try baselayout-2...
Its marked as testing on x86 and amd64 and is also hardmasked until all archs have keyworded it.

It will give you a new set of scripts.

You can also try some gentle ebuild hacking. the rt2x00-9999 ebuild fails as the kernel config symbol, CONFIG_NET_RADIO has been removed in the 2.6.22 kernel, so the check fails. you can back off kernel versions unitil the ebuild works or remove the check.

There is a ready patched ebuild in my net-wireless overlay here Its not tested against your device (I have a rt73) nor your exact kernel. Play with it if you want to.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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