# Wireless DHCP desperation

## jakubc

Hello,

i have spent the last 2 days setting up a wireless connection from my computer to a router 2 rooms away... I have to say, that I am clueless, as nothing seems to be working according to any of the posts I have read... ok my status:

/etc/conf.d/net:

```

modules=( "iwconfig" )

config_eth0=( "dhcp" )

```

/etc/conf.d/wireless:

```

iface_ra0="192.168.2.100 netmask 255.255.255.0"

essid_ra0="MY_ESSID"

key_MY_ESSID="XXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX"

channel_ra0="11"

```

this setup woks fine, all I have to do after boot is:

```

route add default gw "192.168.2.1"

```

and voila I can ping outside my net.

I got this working configuration after 2 days of setup... I know it is patchy, but it works...

What I want to do is get all of the setup from the dhcp server in my router(192.168.2.1).  However when my /etc/conf.d/wireless contains:

```

iface_ra0="dhcp"

essid_ra0="MY_ESSID"

key_MY_ESSID="XXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX"

channel_ra0="11"

```

startup(cold boot)  looks like this:

```

 Bringing up ra0 

 *       ra0 dhcp 

 *          Running dhcpcd ...                                            [ !! ]

```

when I look at my router log it has:

```

SIGUSR1

```

logs... 

Also when testing if net.ra0 ever goes up, and I try to bring it down it halts the system, also when net.ra0 fails to go up, but gives me the DHCP [!!] message all other /etc/init.d/net.ra0 start  attempts give me the 

```

cannot configure // or something like that

```

message...

I hope I explained everything clearly...

Oh and a BIG thank you goes to UberLord for the Wireless the Gentoo way thread.  It got me to a working connection:-))

p.s. I want to configure my card thru the DHCP server on the router, if that wasn't clear:-)

Thank you.

----------

## UberLord

So - in summary. It works with a static IP just fine and now you want to use DHCP?

If the default dhcpcd module is failing, try another one like udhcpc (in the udchp package).

Or, it may just be the dhcp server being at fault ....

----------

## jakubc

Yes, that's it.

Although when I connect to the same router via eth0 the DHCP server assigns everything just fine... oh and the router runs udhcp...

will try and report.

Thanks for now.

----------

## jakubc

Ok, 

so I tried it with the following settings:

etc/conf.d/net: 

```

modules=( "iwconfig" )

modules=( "udhcpc" ) 

config_eth0=( "dhcp" ) 

```

```

/etc/conf.d/wireless: 

iface_ra0="dhcp" 

essid_ra0="MY_ESSID" 

key_MY_ESSID="XXX-XXXX-XXXX-XXXX-XXXX-XXXX-XX" 

channel_ra0="11" 

```

I edited the udhcpc config file to match my router, but still no luck:

```

Bringing up ra0 

 *       ra0 dhcp 

 *          Running udhcpc ...                                            [ !! ]

```

Also the problem with linux hanging has gotten to be even worse.  When I try to restart the connection after making changes to /etc/conf.d/wireless the system either slows down majorly, or it just hangs...

I know that I have a working configuration, but I don't like not knowing why it doesn't work (this is btw. one of the reasons I said goodbye to Windows...^^)

So any more ideas? I would really apreciate them:-)

Thank you.

[edit] I just looked at my router's active DHCP client table... and my address is there, even though the DHCP client in the router did't assign me anything... is this ok or weird? (remember i really am a n00b ^^)

----------

## jakubc

Ok, I thought that this setup was going to last, as it does what I want it to do at startup:

/etc/conf.d/wireless:

```

iface_ra0="192.168.2.100 netmask 255.255.255.0"

essid_ra0="MY_ESSID"

channel_ra0="11"

key_MY_ESSID="XXXX-XXXX-XXXX-XXXX-XXXX-XX"

gateway="ra0/192.168.2.1"

```

/etc/conf.d/net

```

modules=( "iwconfig" ) 

modules=( "udhcpc" ) 

config_eth0=( "dhcp" )

```

This setup works fine after startup.  The problem is, that it works for a limited time only (as little as 10minutes and as much as 7hours (so far)).  Ifconfig reports ra0 as working, but I cannot ping anywhere (not even the router).  When I do:

```

/etc/init.d/net.ra0 restart

```

the whole system crashes.  None of the ctrl-alt-* combinations work, the mouse doesn't move, music stops playing... after hot restart everything is back to normal...

If you know (or think you know) what is going on please help me... even an idea will be very good, because I am clueless:-((

Thank you.

----------

## UberLord

Probably the ra wireless driver causing havoc in the kernel.

Try checking your logs for kernel panics

----------

## jakubc

Thank you for your answer!

and which logs might those be?  the logs are in /var/log/ no? And also what do I look for?

I am a n00b so sorry for the extra work:-(

Again thank you!

----------

## UberLord

The logs are normally kept somewhere in /var/log - what exact files depends on your logger and it's config

If you use syslog-ng it defaults to /var/log/messages which will be a very big file.

What to look for? Any errors really. To make life easier grep the file for the date of the error

```
grep "^Apr 18" /var/log/messages
```

----------

## jakubc

Thanks again for the qick answer...

things have gone from bad to worse here... if during reboot the net.ra0 device is brought up (which is not a rule) then it lasts for maybe 10 minutes befoce dropping.  This drop either results in th

e error I had before (ping not working etc.) of just plain hangs the system... I am using metalog/logger and going through the /var/log/everything/* logs I don't see anyting reporting an error... all it says in connection to the wireless connection is:

```

Apr 19 00:12:58 [kernel] rt2500 1.1.0 BETA2 2005/02/21 http://rt2x00.serialmonkey.com

```

also after having installed syslog-ng I tried to bring up my addresses via udhcpc, and that had an error message (wight on the screen during bootup) about some lines in the script being wrong (with 

connection to udhcpc)... next reboot with same settings just gave me the 

```

starting udhcpc                  [!!]

```

message....

This is getting very frustrating, as I have to work... and need net access to do so...

I am open to any more sugestions... I mean ANY  :Smile: 

Thank you!

----------

## erik258

I have a few questions for you...

what kind of wireless adaptor are you using?  The name seems to suggest that it's a RaLink but I am not sure on that.  Do a 'lspci' or poke around in /proc a bit.  

and what drivers are you using?  If the drivers are marked unstable, or are still in heavy development, you may just have to make do...  show us the output of 'lsmod' or something!

More info from the logs might help a lot.  I suggest using dmesg for that, and posting any lines having to do with your network connection. 

I hacked together a working connection with a Ralink card that has been pretty good to me and I have been bringing it up at coffeeshops etc with a quick 'dhcpcd ra0'.  That has crashed on me a few times, but usually -- especially when there actually is a wireless network - it goes up.  I am using it now.  I don't know about long term setup and i never set it up with /etc scripts but it seems to do ok this way... I can give you a little more info if you want  but you should probably post this stuff, it'll help more people than just me.

----------

## jakubc

ok so here it is... I am writing this on another computer, as I managed to bork my setup even more by using the RaConfig2500 that came with the rt2500 module...

my adapter is:

```

Edimax EW-7128g

```

lspci:

```

0000:00:05.0 Network controller: RaLink Ralink RT2500 802.11 Cardbus Reference Card (rev 01)

```

so it has found it...

I am using the driver (module):

```

rt2500-1.1.0_beta2

```

.

The state of things right now is, when I do:

```

ifconfig ra0 up

```

my system crashes.  Also when I comment out the line modules=("!iwconfig") in /etc/conf.d/net the system crashes the moment I try to bring the ra0 up.  This all happened the moment I ran RaConfig2500 ... I have not been able to access it since.

the only thing dmesg says about the network are the following (not verbatim)

```

found eth0

bringing up rt 2500

dhcp failure, protocol not supported

```

this is now (RaConfig2500).  Before it said the same, except for the dhcp failure (I assigned my addresses manually).

Also before anyone asks I did configure the /etc/Wireless/RT2500STA/RT2500STA.dat according to http://gentoo-wiki.com/HARDWARE_rt2500 .

lsmod produces the rt2500 module... so it is loaded (I couldn't see it in iwconfig otherwise...)

oh and I am using:

```

baselayout-1.11-r7

```

any of the udhcpc ra0, dhcpcd ra0 commands produces nothing...

also now after startup the iwconfig command produces the interface (ra0), but it doesn't have any of the things I put into the /etc/Wireless/RT2500STA/RT2500STA.dat .

And just as a side note the card works perfectly in WinXp... 

Hope this info helps... 

Again a big thank you!

----------

## CLsystems

Hello everyone,

i'm experiencing exactly the same problem at the moment, but am using the ipw2200 driver for onboard wireless adaptor of the centrino chipset. therfore i think it's not a driver / board specific problem, but this is the only bit of usefull information i can add so far. If it is helpfull to obtain any other inforamtion I'm happy to provide it...

cheers, daniel

----------

## erik258

I really don't understand the wireless thing yet.  But as far as I can see, the only difference between your case and mine is that, whereas you, like a good newbee, looked up how to configure your computer to use the wifi card like any network adaptor, I simply emerged the driver, modprobe'd it, and ran 'dhcpcd eth0' .  I would like to say, though, that I highly doubt it's an issue of having followed some directions I ignored.   At least, I hope not!  

I doubt whether either of you have hardware problems, it's just that the linux wireless thing isn't 100% there yet.  

Have you enabled all necessary drivers in kernel?  For example, pcmcia or something?  Since you can see your card, probably.  Are you in range of a wireless Access Point or Router or whatever?  I noticed with my RT2500, sometimes bringing it up, or trying to establish dhcp over the thing used to crash my computer with a messy kernel panic.  But nowadays, I only bring it up when I am fairly certain there's a connection around me and I have no probmems with it.  As I said, all I do is 'dhcpcd ra0'.  I run that before the card is up.  

I know this sounds strange, but all i can think of is whether some part of your configuration ( the part I skipped) perhaps made your card less stable.  If you ask me, you should get rid of all your  configuration if possible, comment out all the ra0 lines or whatever, and try to use my technique.  I know it's "wrong"., but it does seem to work.  

Oh yeah, I never got the nice X-based configuration utility working.  It wouldn't start, i don't think it could find qt or whatever it used for it's gui.  But you don't need it.  Use iwconfig instead, i think between iwconfig and iwpriv (which i've never needed) you can do everything you can do with the RT2500Config utility.  

As for you, CLsystems, I doubt your problem is exactly the same as jakubc's problem, but remember that unstable packages and drivers really are unstable, if they worked properly I'm sure their maintainers would move them to stable.  But that's not to say it won't work, mine works ok.  if you see your card in iwconfig, try ifconfig -a.  If you see your card there too, try dhcpcd ra0 (your's probably won't be ra0, but it'll be the name of the adaptor in iwconfig.)  If that doesn't make sense to you, post the output of the following commands...

iwconfig

ifconfig -a

If either of those fail, show the failure too.  If they freeze, say so.  I just might be able to help you out a bit.  Make sure to keep checking the driver sources and the other forums too , they certainly know more than i do.  

As a final reminder, i would like to say that if you're getting messy kernel panics, or whatever, make sure you're in range of a hub.  And if you are, try messing with iwconfig a bit before juming right in with ifconfig.  Change the mode, maybe set up a fake essid, or whatever.  And try staticallly assigning yourself an IP address.  I noticed that the few times my computer crashed on a known-good wifi network, playing with these settings a bit seemed to help.  

It is possible that the card might be more stable in some computers than in others, perhaps due to hightly device dependent code in the driver modules or something.  Keep Trying!

PS oh yeah, dhcpcd ra0 can take a while, maybe even 30 seconds or more, and it doesn't give you any output, but if it ever makes the lights on your card blink... well, at least that's what it does for me before it gets done.

----------

## jakubc

Hello,

 *Quote:*   

>  the linux wireless thing isn't 100% there yet. 

  erik258 from my perspective that is an understatement if I ever saw one^^ 

Anyway back to business... I have more things to report.... hope it shines a bit more light on the problem...

Ok so first of all today when I started Gentoo (after using XP for a while) I got the a message, that the system is using dhcp for finding the addresses for ra0 and then nothing (hang)... ok so I pressed reset and loading the second time (nothing changed in the config) it booted no problem (I hated this behaviour with windows now I have it in linux (but it's better 'cause I know what's causing it  :Smile:  )) ok so booted up and did:

```

iwconfig ra0 channel 11

iwconfig ra0 enc MY_KEY

ifconfig ra0 MY_IP broadcast MY_BROADCAST netmask MY_NETMASK up

```

the card found the right ESSID and I was able to ping within my network... to try out the stability I  started NFS and started copying a file over to the computer with the problem (1.4GB)... I was monitoring the connection and noticed, that as time went the signal was getting weaker (or the speed rather from 54 -> 11).... ok weird... but the weirdest thing happedned after 411MB the transfer just stopped! when I did 

```
iwconfig
```

 I saw that the card lost it's ESSID (everything else was as usual when looking thru 

```
iwconfig, ifconfig, route
```

).  Ok so I though well if it dropped the ESSID ill just tell it what it the ESSID is and we're back in business... right? wrong  :Sad:  

```
iwconfig ra0 essid MY_ESSID
```

 produced a hang...

after reboot I did the same thing bringing up the interface... mounted NFS and tried the same thing... it didn't transmit anything this time, lost the ESSID and started doing strange things... things got extremly slow... 

```
ifconfig
```

 took about 2 minutes (so did 

```
iwconfig
```

), I even did 

```
iwconfig ra0 essid MY_ESSID
```

 which suprisingly didn't hang thigs, but also didn't have any effect (the ESSID didn't change...) 

after next reboot I went into my desktop and started my mail manager... brought up the interface, typed in the gateway to use and downloaded my mails... after about 2 minutes my computer hangs yet again...

I have looked through all of the logs that I could in /var/log/ and got nothing saying anything wrong about the network (not counting dhcp saying that it doesn't support "this protocol family")...

one more thing happened (which may not be connected) when I came to my other computer after the 3 reboots on the one with the problems, it was restarted... it had been running for 2 days without a problem, and got restarted as I was doodling around with NFS on the other one... coincidence? valuable information?

oki, that's all from me for now.  Hope I shed more light on my problem, and I also hope that some of you will have some tips (a big thanks to all who replied so far!).

[edit] just though of something... my domainname is the same as the ESSID... that can't be causing this problem right?

----------

## CLsystems

Thanks a lot for your help eric, i played around with this a bit but most of the time couldn't really understand why and when it'll successfully create a connection and when it'll fail, but then i figured out something that might be of interest:

Hey jacub,

even though i still experience the same problem with an unreliable network connection i solved my problem with the dhcpcd: i found out, that becaus in my etc/init.d/wireless i had set the following option

```
 mode_eth0="auto"
```

this sometimes caused the wireless card to establish an ad-hoc connection instead of a managed. so i simply changed this setting to "managed" and at least the dhcpcd isn't hanging any more...

i hope this might be of use for you...

cheers, daniel

----------

## jakubc

Hi,

well I'm back... and hopefully I have a temporary fix... ok so over the weekend (most people in my country go to their cottages during the weekend, and as it was a beautifull weekend here almost everyone left (I'm writing my thesis, so I sayed home  :Sad:  )).... ok so I attempt to fire everything up the normal way to try and fool around with the connection... but to my great surprise the connection did't die in a minute or 2, but kept on holding on!  Ok well I download my e-mail (10MB), do an emerge --sync, and on and on and on... coool...

this was saturday, sunday the same... until nightfall that is... when people returned home and switched on their wireless routers the connection lost my essid and bang the system hung... so the problem is probably in the fact, that the driver (rt25001.1.0_beta2) has problems working in an environment with more AP's and keeps switching to a stronger signal (I am at a window, and my AP is 2 walls and a closet away, so I don't have the strongest signal here...)....

so this morning (3 hours ago) I changed the channel  on my router from 11 (default here) to 3.... and the connection is going good... so far. I hope that after a couple of more days of testing I will be able to say that my computer "don't hang no more".  Here are the settings I used to bring the connection up (how would I make a script of this btw.? I have no idea... an address would be a step in the right direction  :Smile:  )

```

iwconfig ra0 essid MY_ESSID

iwconfig ra0 channel 3

iwconfig ra0 enc MY_KEY

ifconfig ra0 MY_IP broadcast MY_BROADCAT netmask MY_NETMASK up

route add default gw MY_ROUTER'S_IP

```

Oki that's all... if it really was the point, could someone please explain to me how such a small thing can hang the whole system? I mean otherwise I find no problems with Gentoo (i.e. Linux), this just seems a little drastic.  Oh and just a thought I think the normal script was hanging my computer, because after the card lost the essid it tried to bring it up, and doing this hung the computer (one sure way to hang it is do do an "iwconfig ra0 essid MY_ESSID" after it has lost the ESSID...).

Thank you all for your help so far!

----------

## erik258

Hey, that's pretty helpful diagnosis.  I don't have 'administrative' access to any of the APs I frequent but I bet tweaking the settings, primarily changing

anything on AUTO to someting else, preferably what it's supposed to be, might help a lot.  I am glad you're connection is working.

----------

## jakubc

Hello,

I'm back, and I have more info (I live in the faint hope that this thread will help someone in the future, and that I will finish this problem sucessfully:-) ).  

Ok so my escapade with changing the channel was pretty much a miss.  The connections tended to be up about as long as connections without the channel different from my neighbours.  The thing that did change the whole hanging thing is the Kernel (2.6)option "Stack Size".  I had it set to 4Kb (I found out because an emerge of wdiswrapper crashed), so I set it to 8Kb, recompiled and tested it.

With the 8Kb option enabled (somewhere I also read that this change in the Kernel  even fixed the problem completely) the connection is yet again acting strange, but in a better way.

1. I still can't get dhcpcd or udhcpc running 

2. everything starts normally at startup (manual configuration of IP, Broadcast, NetMask, GateWay)

3. if the connection doesn't crash within lets say about 15 minutes everything works like a charm (I just transfered over 5Gb through my home network and the connection reset once without hanging (by reset I mean that the "ifconfig" RX bytes counter reset (I don't know if this means that the whole connection reset or not)))

I also looked at the buglist for the rt2500 driver:

http://sourceforge.net/tracker/?group_id=107832&atid=648844

and found that the bugs are submited, but noone is working on them yet (the instability and crashing).  Also at:

http://rt2x00.serialmonkey.com/wiki/index.php/Main_Page

I found mention of the fact, that the driver does NOT support SMP, and guess what? I have a P4 with SMP enabled in the kernel.... so I hope the good people at serialmonkey come with some bugfixes:-)

Once again, if you have ANY ideas please don't hesitate and post them.  I would also be pretty interested if any people with a P4 (SMP capable setup and SMP activated Kernel) actually got this wireless chip working with the rt2500 driver...

todo:

1. will try to compile the latest CVS from serialmonkey

2. will try ndiswrapper

3. report on findings in this thread  :Smile: 

----------

## erik258

I remeber seeing it noted in a number of places that the current versions of the rt2500 driver and SMP kernels don't mix.  I guess neither one of us can be too optimistic about new development, since evidently there's no work going into new bugfixes.  And that is too bad.

Here's what I've been noticing so far (also in hopes that we or someone else can figure this stuff out) :

- driver never crashes when i do anything with iwconfig or iwlist.  only ifconfig and dhcpcd                  

       commands seem to crash it.

- "iwlist scan" will only pick something up if the interface is up.   This can be accomplished by       

     using 'ifconfig ra0 up' or 'ifconfig ra0 192.168.xx.xx' ..

- sometimes setting the ip address as above crashes the kernel, while sometimes it works

    without actually establishing a link, and sometimes, it even establishes a link.  This probably

    has mostly to do with what networks you're connecting to and whether or not you 

    happen to choose an open ip address or something similar.  

- 'dhcpcd ra0' will often crash the kernel, especially if there is no network available or if the 

   nothing's been done with the interface yet w/ ifconfig.  

I have had the most success doing such things as (what i did today)

#ifconfig ra0 up

#iwlist ra0 scan

  (note that there is in fact a network)

#dhcpcd ra0

sometimes i replace that first line with ifconfig ra0 xxx.xxx.xxx.xxx instead.  I don't

know why sometimes it works and sometimes it doesn't.  

my problems are as follows. ..

 - sometimes link is lost and trying to bring it back up crashes the kernel or simply doesn't

    work.  This seems to be especially problematic in high-traffic areas, and _especially_ 

    when there's more than one network about.  I don't know why this is, i think it might

    be exactly what you were describing before, about other wireless APs attracting your 

    nic away from the 'correct' one.  I wonder, could a couple of settings in iwconfig

    disable such ap-autoselection ? or if not, could at least the AP or mode or something

    be locked?  and if so, would it help?

 - sometimes the bringing the link up at all crashes the kernel.  This includes ifconfig up/ip

    commands and dhcpcd.  

and additionally, sometimes, like today (in fact always when i'm using this particular AP) the link never goes down, it doesn't seem to degrade, it just keeps on working for as long as i want.  It crashed the first time i brought it up with ifconfig ra0 x.x.x.x, but the second time i tried ifconfig ra0 up, and it worked fine (it even found a link without dhcp).  I think there may well be a few different problems here.  I'm guessing that 1) there's a bug because of which if the interface is brought up and some required piece of information is missing and cannot be collected by the computer, the driver crashes and brings the whole kernel with it.  maybe even it's a problem with the driver needing services to obtain network data to start the services it needs to do so!  (hope that makes sense)  that would be something of a race condition i guess, very bad in kernel code because you often don't get nice error output.  and 2) the problem you hypothesized in which the signal is broken by 'competing' aps.  

I would like to reiterate that this is the first experience with wireless i've had and when i look at the manpages for iwconfig i am usually pretty perplexed as to what any of the stuff is supposed to mean.  But i wonder, if between the two of us, we could experiment with iwconfig and see whether we can't at least make this driver work continuously for us once we get it going...

PS I tried ndiswrapper myself but i could never get it working with this card.  There were a few different cards with the same manufacturer id (my card is the reference rard designed i assume by ralink), and i tried those drivers, but to no avail.  I also tried the drivers that came with the card, but i always got the same output...

```

hwc54g.exe      hardware NOT present

rt2500-linux-sta-1.4.1.0.tar.gz hardware NOT present

rt2500-linux-sta-1.4.5.0.zip    hardware NOT present

rt2500v3-1.0.1.0_for_win2003.zip        hardware NOT present

rt2500v3.0.1.0_for_win2003.zip  hardware NOT present

wc54g.zip       hardware NOT present

wl54driver2.2.6.0.zip   hardware NOT present

```

Now, i find it odd that these files are not .inf files or whatever.  I experimented around with ndiswrapper for a while before i gave up and installed a 2.6 kernel and now that it works i have no particular ambition to take steps backwards and try to get another solution going.  but if i had some reason to think it might work i would be a lot more likely to try it out.  At any rate, just letting you know how the ndiswrapper thing went for me.

----------

## erik258

here's some particularily interesting stuff from the manpage of iwconfig .with which i don't often have a chance to experiment...

```

       sens   Set  the  sensitivity threshold. This is the lowest signal level

              for which the hardware attempt packet reception, signals  weaker

              than  this  are  ignored.  This is used to avoid receiving back-

              ground noise, so you should set  it  according  to  the  average

              noise  level.  Positive  values  are assumed to be the raw value

              used by the  hardware  or  a  percentage,  negative  values  are

              assumed to be dBm.

              With  some  hardware,  this  parameter  also  controls the defer

              threshold (lowest signal level for which the  hardware  consider

              the channel busy) [b]and the handover threshold (signal level where

              the hardware start looking for a new access point).[/b]

              Example :

                   iwconfig eth0 sens -80

```

could this be used to stop looking for access point?  

```

      ap     F[b]orce the card to register to the  Access  Point  given  by  the

              address,  if  it is possible. When the quality of the connection

              goes too low, the driver may revert back to automatic mode  (the

              card selects the best Access Point in range).[/b]

              You  may also use off to re-enable automatic mode without chang-

              ing the current Access Point, or you may  use  any  or  auto  to

              force  the  card  to  reassociate with the currently best Access

              Point.

              Example :

                   iwconfig eth0 ap 00:60:1D:01:23:45

                   iwconfig eth0 ap any

                   iwconfig eth0 ap off

```

I thought maybe if we could force the access point and then set the sensitivity threshold super low,

long as the signal wasn't actually really weak (in which case your card would just sit there failing to communicate) you'd not change your AP.    You should give that a try.  Are you pretty sure that you're connecting to different access points when your signal degrades?  

[/code]

----------

## jakubc

Hi,

I was postponing my next progress report, because I am behind on my thesis, and need to work on that... unfortunately I cannot work on my computer's wireless connection in parallel, because of the kernel panics...

The definite (one of the definite anyway) clue as to what was going on was an error message I got while just turning the comuter and not starting X.  The gist of the message was that the module rt2500 crashed because of SMP.  The message was saddly not recorded by the logger, so I don't know it exactly.  I went on to install a non SMP, recompiled the rt2500 for this kernel.  I am pleased to say that the connection now works like a charm with or without dhcpcd/udhcpc.  The thing is that I am very agravated, that I had to turn off SMP (even my CPU doesn't like it, it's average temp has gone up by about 4 degrees  :Sad:  ).

From reading posts and from different HOW-TOs I get the impression, that ndiswrapper has problems with SMP also, but that they are not as deffinite i.e. if just might work (although with my luck I wonder why even bother^^).

The loss of the AP (if it didn't result in a complete crash) was pretty random, and iwconfig showed me that the connection either had no AP, or it showed one of the about 4 AP's I have around here...

The trick with the signal strength, and forcing the AP seems like a good way to rule out the signal loss option.

Right now I have almost given up on SMP with the rt2500, so I will try to get ndiswrapper going.  The problem with the way you were trying it is most probably the fact, that you didn't unzip the files before giving them to ndiswrapper to translate... might be worth a try.  My card came with a cd with the .INF files there...

I will try both of these options over the weekend, and will report back:-)

(btw. what is so very difficult about writing stuff to work with SMP? is this just a problem with drivers (more basic system interaction) or is it also the problem of normal software? )

----------

## erik258

I think SMP is a largely problematic thing because it ends up being quite difficult to let two processors do whatever they want. I'm sure theres a source somewhere out there that knows what it's talking about unlike me, but since it's Symmetric MultiProcessing, each processor can do anything at any time.  You can guess how problematic this would be, since both processors are also running the kernel (or else, as i understand, itwould be asymmetric).  So you can no longer count on saying "this'll definitely be done before the next line of code or whatever'll be done."  so you need to implement more locks and stuff to protect the correct order of execution.  

I think you're right about the ndiswrapper stuff, because on another computer i seem to have got it working to an extent with an Atheros reference board.  But i have a strange problem with it; even though the module lists the hardware as present and modoprobe goes without a hitch, the actual device wlan0 doesn't ever show up, regardless of whether I alias wlan0 ndiswrapper as i have been told.  At any rate, if you can get ndiswrapper to work with the card, especially if it makes your computer more happy, i would love to hear about it.  And if you do get it working, it sure would be nice to see some nice bits of information on the subject of setting it up.  

Good luck on your thesis and your gentoo hacking, Dan.

----------

