Wireless connectivity problem with Broadcom cards

ianace
  13 years ago
  5

I connect my laptop (Lenovo Ideapad U330) to an access point day-in and day-out - I'm wireless, but there is this one problem which had been bugging me before. I always get dropped from my connection whenever the network get choked because some users abuse our bandwidth with their P2P applications. This happens everynight when all are busy doing their downloads so in the morning when I expect to have a connection - I was dropped. I'm prompted with this window asking for my WPA2 wireless authentication yet everytime I input the correct password, the same window appears and tries asking for the same password.

You see, this shouldn't be the case since I had configured seahorse with my login password and had it manage my wireless authentication. I had my nm-applet set to auto-connect but still I get dropped. The only solution for me to be re-connected is to restart my system as logging out of my account doesn't solve the problem either. I hate restarting my laptop, this is not a Microsoft Windows operating system.

After doing some trial-and-error methods for a solution, I came up with this script executed by cron every 5 minutes. If it does not have a successful ping on google.com, it will kill NetworkManager first then restarts nm-applet and I get re-connected back to the network and to the Internet.

For other Mint/Ubuntu users experiencing the same problem as I was before, here is my simple workaround without the need of restarting your system:

1. Open your Terminal window and create a sub-directory named "Script" on your ~ (Home) folder.

    mkdir ~/Script


2. Using the same Terminal window, create a file named testnet.sh, Lets have it saved in "Script" folder we created earlier:

    gedit ~/Script/testnet.sh


3. A text editor will open and all you have to do is copy and paste the quoted texts below and Save the newly created file.


    #!/bin/bash
    if eval "ping -c 1 www.google.com"; then
    exit

    else

    killall NetworkManager
    restart network-manager

    fi
    exit



4. After saving the file, close the window and we will use the same opened Terminal window to make the file (testnet.sh) executable using the command below:

    chmod +x ~/Script/testnet.sh


5. Now, we have an executable script file. We will now add this script to cron and have it executed every 10 minutes (my choice - your's might be different). Using the same Terminal window, input the command below:

    sudo crontab -e


- Input your password and a Terminal text-editor (Nano) will open for you to input the line of text below:


    */5 * * * * /home/your_user_name/Script/testnet.sh


- After inputting the line of text above, press Ctrl+X and press 'Y' (That's capital 'y') and press Enter key.


With those easy to follow steps above, you would't have to worry on re-connecting to your wireless connection whenever you get dropped.
Now I can sleep peacefully at night without me thinking "will I be connected when I wake up in the morning?".

If it happens that you get dropped from your connection earlier before cron reaches its configured time of execution, you can manually execute it using the command below:

    sudo ~Script/testnet.sh


EDIT: Now, I'm using LMDE so I made a minor change on the script to work:

    #!/bin/bash

    if eval "ping -c 1 www.google.com"; then
    exit

    else

    killall NetworkManager
    /etc/init.d/network-manager restart

    fi
        exit



Note: I copied this from my blog and thought it might be helpful if I post it here on official tutorial page.

Comments
ianace 12 years ago

You might need to manually compile the driver for your wireless card. Do you know the brand and model?


alexaborigine 12 years ago

my problem is i can only get mint wired, too bad i love it better than ubuntu, but i did get wireless on ubuntu; same computer ; same servcice; different results; why oh why are you always picking on me!anyone with a tip for me?