Troubleshooting Wireless Connectivity Issues with ndiswrapper on Ubuntu

In summary: This is a difficult question. There are a lot of different things that could go wrong. You might be able to try one of the following:- Disable the other network on the router- Change the wireless network settings on the computer to use the "foo" network- Change the wireless network settings on the computer to use the network that the router is advertisingI decided to use an older computer that's been collecting dust for a few years to learn some Linux, so I wiped the drive and installed Ubuntu. I recently bought a new wireless network card with a USB connection, and I decided to use it with this computer. I found some instructions online and followed them.Short version:1.
  • #1
Fredrik
Staff Emeritus
Science Advisor
Gold Member
10,877
422
I decided to use an older computer that's been collecting dust for a few years to learn some Linux, so I wiped the drive and installed Ubuntu. I recently bought a new wireless network card with a USB connection, and I decided to use it with this computer. I found some instructions online and followed them. Short version:

1. Install ndiswrapper.
2. Tell ndiswrapper to use the Windows XP driver for the network interface card.
3. Tell the Linux kernel to use ndiswrapper.

This worked out great, but when I rebooted I no longer had a wlan0 interface. The only solution I've found is to physically disconnect the network card and then plug it back into the USB port. Is there anything I can do to not have to do that every time I start up the computer? Maybe I can tell Ubuntu to "forget" the hardware attached to that USB port and then rediscover it?

I'm writing this on my laptop. I will go to the other computer and add a few more details from there.


Edit: OK, this is weird. I was sure that I tried this yesterday and it didn't work, but now I'm starting to doubt that. When I had started up the computer and logged in, lsmod | grep ndis gave me no hits, so ndiswrapper wasn't installed in the kernel. So I ran sudo modprobe ndiswrapper, and the network started working immediately. I must have tried that several times yesterday. Maybe I'm just going crazy.

OK, let's assume for the moment that all I have to do is to make sure that the linux kernel uses ndiswrapper even after reboots. How do I do that? Do I have to run sudo modprobe ndiswrapper (and somehow provide my password) from a script, or is there a better way?
 
Last edited:
Computer science news on Phys.org
  • #2
Edit /etc/modules and add ndiswrapper on a newline at the end of the list of modules. Whenever the computer boots it should then load ndiswrapper by default.
 
  • Like
Likes 1 person
  • #3
Thanks. I just tried it, and it works like a charm. The message that said that I was connected to the network showed up before I even logged in.

Unfortunately there's another problem. A few hours ago I noticed that wlan0 seemed to think that it was still connected to the network, but the router disagreed (and no communication was possible). Maybe the driver or the card isn't working as well as I thought. I guess I'll see if this problem comes back.
 
  • #4
Try
Code:
lshw -C Network

That will display the configuration of your network interface. One of the lines should start with "configuration:" on that line look for the "driver=" and "module=". If there's a driver and module listed that's not ndiswrapper then another driver might be trying to control the card.

If there is another driver trying to claim the card then you need to blacklist it. Open /etc/modprobe.d/blacklist and add a new line to the bottom of the file like:

Code:
blacklist modname

where modname is the name of the driver.

Then restart your computer and see if that's fixed it.
 
  • #5
Great tips. I'm learning some useful stuff here. There's nothing funny in the output now (except that the card is running 802.11g, even though it's supposed to support 802.11n), but everything is working fine at the moment. I'll check again if things stop working.
 
  • #6
EDIT: I didn't read your last post carefully enough. If the card is in 802.11g then this method probably won't work since the highest speed it'll support is 54Mb/s

Try using
Code:
iwlist wlan 0 bitrate
to show the supported rates for your adapter. If the current rate is less than the supported use
Code:
iwconfig wlan0 XM auto
where X is the new speed in megabits. auto means the card will use the highest possible rate up to X (this means the rate can lower if your signal quality decreases) Then reboot your computer.
 
  • Like
Likes 1 person
  • #7
http://support.linksys.com/en-eu/support/adapters/AE1200 is supposed to support speeds up to 300 Mbit/s. These are the relevant parts of the output of some of the commands you mentioned: (several lines omitted from each output)
Code:
sudo lshw -C Network

       configuration: broadcast=yes driver=ndiswrapper+bcmwlhigh5 driverversion=1.59+Cisco Consumer Products LLC ip=192.168.1.196 link=yes multicast=yes wireless=IEEE 802.11giwlist wlan0 bitrate

wlan0     4 available bit-rates :
	  6 Mb/s
	  9 Mb/s
	  12 Mb/s
	  18 Mb/s
          Current Bit Rate:78 Mb/s [B]<--- LOL[/B]
It's not super important that we settle the g/n issue right now. On the other hand, if it's super easy for you, I don't mind being told the solution, or just what's going on here. (The card appears to be working in 802.11g mode, which only supports 54 Mbits/s, and is still set to 78 Mbits/s...I don't get that at all).

I have two networks configured on the router. The "foo" network is advertised and supports 802.11 n,g and b. The "bar" network is not advertised and supports only 802.11n. I will try to figure out how to connect to "bar" instead of "foo".

Edit: It was easy to figure out how to connect to it. I just had to click on the network symbol at the top and choose "connect to hidden wi-fi network". But it failed. Then I checked the router configuration. It turned out that the network wasn't hidden. I remembered that wrong. It's marked as "visible", just as the "foo" network. So it should show up in the list of networks, but it doesn't. No time to think about that now. I have to go to bed.
 
Last edited:

1. What is Ubuntu?

Ubuntu is a popular open-source operating system based on the Linux kernel. It is known for its user-friendly interface and customizable features, making it a popular choice for both personal and professional use.

2. How do I connect to a wireless network on Ubuntu?

To connect to a wireless network on Ubuntu, you can use the built-in network manager or the command line interface. Simply click on the network icon in the top right corner of your screen, select the desired network, and enter the password if prompted. Alternatively, you can use the "nmcli" command to manage wireless connections via the terminal.

3. What is ndiswrapper?

Ndiswrapper is a tool that allows you to use Windows wireless drivers on Linux systems. This can be useful if your wireless card does not have a native Linux driver available.

4. How do I install ndiswrapper on Ubuntu?

To install ndiswrapper on Ubuntu, you can use the "apt-get" command in the terminal. Simply type "sudo apt-get install ndiswrapper" and enter your password when prompted. You can then use the "ndiswrapper" command to manage your wireless drivers.

5. Can I use ndiswrapper for all wireless cards on Ubuntu?

No, ndiswrapper may not work for all wireless cards on Ubuntu. It is best to check the compatibility list on the ndiswrapper website to see if your specific wireless card is supported.

Similar threads

  • Computing and Technology
Replies
1
Views
1K
Replies
2
Views
2K
  • Computing and Technology
Replies
12
Views
2K
Replies
11
Views
1K
  • Computing and Technology
Replies
15
Views
4K
  • Computing and Technology
Replies
24
Views
7K
  • Computing and Technology
Replies
6
Views
3K
  • Computing and Technology
2
Replies
43
Views
3K
  • Computing and Technology
Replies
12
Views
3K
  • Computing and Technology
Replies
3
Views
5K
Back
Top