WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Wireless loses association  (Read 1843 times)

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Wireless loses association
« on: November 11, 2011, 04:37:45 PM »
I apologize for all of the questions, eventually I will hit a level to where I shouldn't have to ask so many questions.

I am running TC 4.0.2 on an Asus EEE EB1012P with an Atheros wilress card, and I have found that I keep losing association with my AP's.  I installed wireless-3.0.3-tinycore and wireless-tools and configured my wireless using iwconfig essid "xxxx" mode managed key xxxxxx
I am using WEP and I am not broadcasting my SSID.

I haven't figured out what the timeout is for this yet, but I drop a couple of times an hour.  I still have an IP assigned to WLAN0 I just lose association with my AP.  When ever I lose association dmesg logs a:
cfg80211: Calling CRDA to update world regulatory domain

To reconnect I just have to rerun the iwconfig and it reasscociates me without issue.
From reading online I tried using iw reg US to see if that woudl solve it but it didn't work.
Right now I am attempting to write a cron job that just runs the iwconfig every 5 minutes to see if that solves the problem.

Any other suggestions?

Offline KHarvey

  • Full Member
  • ***
  • Posts: 102
Re: Wireless loses association
« Reply #1 on: November 15, 2011, 04:33:54 PM »
So I never found a solution to this.  I tried a handful of wireless configs but nothing seemed to work.  In the end I built a work around to get past this.  I have a shell script that I wrote that runs during startup (/opt/bootlocal.sh) that checks to see if it has deassociated and then reassociates.  It effectively runs every 5 seconds.

If anyone else needs it here it is:
Code: [Select]
#!/bin/sh
while [ 1 ]
  do
    strNotAssociated=`iwconfig wlan0 | grep Not-Associated`

    intNotAssociated=`expr length "$strNotAssociated"`

    if [ "$intNotAssociated" -gt "5" ]
      then
        echo "Not Connected"
sudo iwconfig wlan0 essid "xxxxxx" mode managed key xxxxxx
    fi

    unset strNotAssociated
    unset intNotAssociated

    sleep 5
  done

I'm sure there is a better way to handle the if statement, but it has been a long time since I have written a shell script.