Troubleshooting Wireless Connectivity Issues with ndiswrapper on Ubuntu

  • Thread starter Thread starter Fredrik
  • Start date Start date
  • Tags Tags
    Ubuntu Wireless
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
6 replies · 6K views
Messages
10,876
Reaction score
423
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:
on Phys.org
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   Reactions: 1 person
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.
 
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.
 
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   Reactions: 1 person
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: