# wireless problem

## eigenman

Hi,

I have an atheros based wireless ethernet on my home computer, and I'm having a bit of problem with it. I've set up the system to use static IP, with a fixed router, as using the following commands:

        modprobe ath_pci

        wlanconfig ath0 create wlandev wifi0 wlanmode sta

        iwconfig ath0 essid MusicHouse rate 2M

        ifconfig ath0 up 192.168.1.50

        route add default gw 192.168.1.1

So far so good, and when I run this the internet works out fine. The problem is that after a while, I just lose the internet connection, and I can't figure out why. I can lose the connection faster if I run "iwscan list" few times.

Before, I used to stop the internet service, and restart it to make things work, but I just learned that running that command "iwconfig ath0 essid MusicHouse" brings back the internet.  I am at complete loss on what I can do to fix this.

Cheers,

Eigenman

PS I used to have it set up to use dhcp, but that was much more flakey. This way, the problem seems to be a bit more isolated.

----------

## nadi

hei

You are not alone. I have also an atheros wireless card in my laptop and connection is broken from time to time. It is not consistent: sometimes it can take hours and soetimes just minutes. I am bringing back the network with an /etc/conf.d/local.start script I have made. More than that: I cannot initiate my wireless connection with /etc/init.d/net.ath0 restart when using kernel 2.6.15-r1 or similar. However, when rebooting with kernel 2.6.12, the connection is up at boot.  I wonder if the problem is with a bug in the madwifi-driver. 

Nadi

----------

## eigenman

Does this problem exist only on atheros chipsets? A quick search on the madwifi mailing list didn't show me anything interesting. For the record, this is what my iwconfig -v shows:

iwconfig  Wireless-Tools version 28

          Compatible with Wireless Extension v11 to v20.

Kernel    Currently compiled with Wireless Extension v19.

ath0      Recommend Wireless Extension v13 or later,

          Currently compiled with Wireless Extension v19.

I'm not sure if it is useful or not, but just in case.

Eigenman

----------

## Daniel Tourde - Caelae.se

Same problems here:

gcc 4.1, glibc 2.4, kernel 2.6.16-r2, x86

madwifi: 0.1502-20060414

wpa_supplicant 0.5.2

=> Does not connect on my router at boot

gcc 3.4.5, glibc 2.3.5, kernel 2.6.15-r4, amd64

madwifi: 0.1502-20060414

wpa_supplicant 0.5.2

=> connect to the router at boot.

Strange to say the least...

Daniel

----------

## rjrooke

wpa_supplicant has started crashing (??not running when I lose connection) - I believe since upgrade to 5.2 - running atheros chips and amd64 here...

----------

## Monkeh

I have similiar issues, except the Atheros part in my case is my AP.

----------

## jarealist

I'm experiencing the same problem and I wonder if this could be the problem. Though i don't 

know how to fix it.

When I run "iwlist ath0 scan" I'm getting two (2) cells listed with my router address.  The

first one without an ESSID and the second one with the correct ESSID.  

iwlist ath0 scan

ath0      Scan completed :

          Cell 01 - Address: 00:09:5B:AD:83:E0

                    ESSID:""

                    Mode:Master

                    Frequency:2.412 GHz (Channel 1)

                    Quality=52/94  Signal level=-43 dBm  Noise level=-95 dBm

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:bcn_int=100

          Cell 02 - Address: 00:09:5B:AD:83:E0

                    ESSID:"***********"

                    Mode:Master

                    Frequency:2.412 GHz (Channel 1)

                    Quality=55/94  Signal level=-40 dBm  Noise level=-95 dBm

                    Encryption key:on

                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s

                              9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s

                              48 Mb/s; 54 Mb/s

                    Extra:bcn_int=100

Edit #1-

SOLVED: This was caused by my Netgear router Authentication Type setting.  It was on "Open System".  Changinging it to "Automatic" got rid of 

the duplicate cell without the ESSID.

----------

## Daniel Tourde - Caelae.se

In my case it was a problem with bash. Shortly:

bash-3.1 -> troubles

bash-3.0 -> fine...

Daniel

----------

## uxbod

similar problems under x86_64 https://forums.gentoo.org/viewtopic-t-454296.html?sid=86283a867b040c626664cb6c72065e9a

----------

## eigenman

Well, at least this problem is not isolated to my computer.   :Confused: 

Should I make a bug report to someone about this?

Does anyone have a workaround for this problem? I was thinking of having a crontab that resets the network connection every minute, but that seems like a terrible idea. Is there an easy way of figuring out if my connection is working in the script, so if it is not, it will reset the connection?

Cheers,

Eigenman

----------

## Elv13

almost same here, atheros chips, netgear router

wireless work fine, but i am not able et set essid, it always conect to the worst avalible...

tried iwconfig ath0 essid "" and mac adress but it still conecting on some linksys or d-link instead of my spot

----------

## langthang

 *eigenman wrote:*   

>  I was thinking of having a crontab that resets the network connection every minute, but that seems like a terrible idea.
> 
> Eigenman

 

why not just just gentoo network scripts? I don't know about the stable baselayout but the unstable one (1.12.0_pre17*) WFM (netgear W311T with D-link 624 router using wpa_supplicant-0.5.2.) And yes, the card reconnect to the router a lot. Some time within minute.

----------

## eigenman

 *Quote:*   

> why not just just gentoo network scripts? I don't know about the stable baselayout but the unstable one (1.12.0_pre17*) WFM (netgear W311T with D-link 624 router using wpa_supplicant-0.5.2.) And yes, the card reconnect to the router a lot. Some time within minute.

 

I couldn't figure out the network script to be honest. When I followed the howto online, the script seemed intent on connecting to our neighbours router, and I couldn't figure out why. (I know, I really should have spent more time trying to fix that, rather than reinventing the wheel, and realizing that my wheel has too many sides...) I also had huge problems with dhcpcd, as well as other dhcp clients, which is why I have static IP right now.

Eigenman

PS The crontab seems to be working find right now. Ironically, when I had it running iwconfig everyminute, that broke the connection. Now I have it run iwconfig only when pinging our router fails.

----------

## Elv13

when you will find why it always try to conect to the same network and not the configurated one, tell us how

i will make a  littel investigaion on kernel patch sinc 2.6.14, one seem to cause the problem becose me too it was working before

----------

