A simple hack to get around a wireless connection that drops every few minutes

If you ever searched for any of the below

My Dell inspiron keeps dropping wireless connection
Intel(R) Pro/wireless 2200BG network adapter drops wireless connection  my wireless connection drops often

read on…..

One of laptops and 4 year old Dell Inspiron 600 has a problem, the wireless connection drops every 30 to 40 minutes. Only way to get the connection back is to disable-and-enable the network connection. Soon this became quite a nuisance having to do all that navigation to network connections, select the connection, disable and then wait for it be disabled …..then enable! It felt like it took for ever to do this. Tried to install latest and greatest drivers, no luck! Tried reinstalling Windows XP and still no luck! I realized that I hate the disable-enable thing not the computer so wanted to find a way to bounce the network connection with very little effort, like a single click!

Hmm…single click doesn’t sound that bad right? I am convinced but there is one problem, I am no windows genius, actually I am windows dummy. Found the windows equivalent of ifconfig, the ipconfig. Wrote a batch script to do ipconifg/release and then ipconfig/renew. It did not work, the ipconfig/release goes fine but the ipconfig/renew fails consistently. Further googling revealed a fancy little Microsoft tool, DevCon, a command-line utility that acts as an alternative to Device Manager. Downloaded it from http://support.microsoft.com/kb/311272 and here is what I did:

  1. Copy the devcon.exe file to my c:\windows\system32 folder
  2. Open control panel -> Network Connections -> Right Click on the wireless network connection -> Properties -> Click on the “Configure” under the General tab -> Select the “General tab” on the top. Here you can see Device type, Manufacturer and location. Location is really what tells us what bus the device is connected to.
    Mine shows: PCI bus 2, device 3, function 0
    That tells me the device is attached to PCI Bus 2

    Wireless Adapter Configuration Info

    Wireless Adapter Configuration Info

  3. Now lets find the device_id of our device (my wireless adapter in this case). Open the command prompt (Start -> run -> open: cmd). At the command prompt, type the following command:>devcon find pci\*The output looks like the below

    Devices on my PCI Bus

    Devices on my PCI Bus

    A quick look into the output shows me the instance ID of my wireless adapter

    PCI\VEN_8086&DEV_4220&SUBSYS_27218086&REV_05\4&39A852   02&0&18F0: Intel(R) PRO/Wireless 2200BG Network Connection

    That long string is the instance ID, the device ID part is highlighted part only. Similarly on your machine look for the value that reads some thing like “DEV_XXX” or some thing similar embedded between the “PCI\VEN_XXXX” and “&SUBSYS.” Adapt this logic when dealing with non PCI devices. Step 2 shows what kind of bus you are dealing with.

  4. To try the restart, type the following command at your command prompt:> devcon restart *DEV_4220*The output should look like something below. If not, you haven’t done one of the above steps right.

    PCI Device Restart With Devcon

    PCI Device Restart With Devcon

  5. Now that our restart is gone fine, here is a little batch script:
    @echo off
    echo Restarting your Wireless adapter
    devcon restart *DEV_4220*
    echo Done restarting your wireless adapter
    echo it should be back with an ip in few secs
    I used a notepad to write the above lines and saved it as “wb.bat” (short form of wirelessbounce.bat)
  6. You can save that file on your desktop to double-click every time you need to bounce your wireless adapter or make a shortcut and put it in your quick launch area (area right next to your start menu). In my case, I badly needed the single click restart/bounce. So I prefer the quick launch (the black arrow point to the shortcut on my cmputer)

    Quick Launch Shortcut

    Quick Launch Shortcut

The whole idea of this article is to use this cool little hack to get around the malfunctioning hardware (or Windows or the drivers or what ever), you can get creative and use it in many more occasions. Just be careful, it is powerful tool!

Leave a Reply

Dansette