Troubleshooting Wireless Connectivity Issues with ndiswrapper on Ubuntu

  • Thread starter Thread starter Fredrik
  • Start date Start date
  • Tags Tags
    Ubuntu Wireless
Click For Summary
The user installed Ubuntu on an older computer and set up a USB wireless network card using ndiswrapper with a Windows XP driver. After rebooting, the wlan0 interface was missing, and the user discovered that running "sudo modprobe ndiswrapper" restored connectivity. To ensure ndiswrapper loads automatically on startup, they edited the /etc/modules file, which resolved the issue. However, they encountered a problem where the network card appeared connected but could not communicate with the router, suggesting potential driver conflicts. The user is also exploring connection issues with their router's network settings, particularly regarding hidden networks.
Fredrik
Staff Emeritus
Science Advisor
Homework Helper
Insights Author
Gold Member
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:
Computer science news 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 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.
 
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.
 
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
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:

Similar threads

  • · Replies 4 ·
Replies
4
Views
2K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 12 ·
Replies
12
Views
3K
Replies
11
Views
2K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 15 ·
Replies
15
Views
6K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 24 ·
Replies
24
Views
10K
  • · Replies 12 ·
Replies
12
Views
4K