LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bad wireless troubles, desktop machine running Ubuntu 9.04 (http://www.linuxquestions.org/questions/linux-newbie-8/bad-wireless-troubles-desktop-machine-running-ubuntu-9-04-a-747997/)

MrCode 08-16-2009 05:24 PM

Bad wireless troubles, desktop machine running Ubuntu 9.04
 
Hello, everybody. I'm having some real problems with my USB wireless adapter in Ubuntu 9.04 (kernel 2.6.28-14-generic), although I'm not surprised, after hearing about people with other problems regarding Linux wireless support.

What's happening is this: I'll go to connect to my wireless network (which is WPA2 encrypted, btw), and it'll seem like it's connecting, but it takes a while for it do do so. However, when I pull up a terminal to do some pinging to see if I've got a connection, 95% of the time it returns "Destination Host Unreachable" wherever I try to ping (even the router itself) It'll keep this up for a good while (anywhere from 10-15 minutes to an hour or more) before it'll finally connect successfully.

I really don't understand what's going on with this. I've got it set to connect using manual configs, so I know it's not DHCP, since I'm not even using it. I've got the correct DNS server IPs put in, because when it does finally get a successful connection, I can get online. I have a Terminal running in the background (on a separate virtual desktop, minimized) doing constant pings to the router to ensure that it doesn't drop the connection, and that seems to do fine.

My system info:

Dell Dimension 4600

Intel® Pentium 4 2.66GHz

1.5GB RAM

3 HDDs: 1 Maxtor internal drive (40GB), 1 Maxtor OneTouch USB external drive (160GB), and 1 Western Digital SATA internal drive (320GB)

OSes: MS Windows XP (on Maxtor internal drive) and Ubuntu 9.04 (on Western Digital SATA internal drive)

Video adapter: NVIDIA GeForce 7300GT AGP 512MB VRAM

Network adapter: NetGear WN111v1 USB adapter.

I'm using the Windows drivers with ndiswrapper for the NetGear adapter. So far, this is the only problem I have with Linux. The video drivers work great (I've got Compiz enabled and everything), and all the programs I've used so far haven't really had a hitch, except for NetworkManager so far.

I apologize if I'm being a bit too verbose; I'm just trying as best I can to clarify exactly what my problem is. Yes, I've tried the Ubuntu forums, but no one there seems to be able to help me (apparently what's going on here is some deep Linux voodoo ;)). So, if anyone can offer some decent advice, it would be much appreciated.

MrCode 08-18-2009 02:23 AM

bump...Does this mean that no one is able to help out? Or is it because I posted in the wrong forum?

foodown 08-18-2009 02:37 AM

The fact that it eventually connects and then stays connected would seem to indicate that you have done well configuring the thing.

After all, if the configuration were the problem, it would NEVER work.

I'm assuming that you have no such difficulties in Windows, or you'd've mentioned that, given your self-professed verbosity.

I apologize in that I am by no means an expert when it comes to wireless networking under Linux. However, my wife's laptop is also a Pentium 4, also using wireless, also running Linux (Slackware not Ubuntu, but the kernel (which is all that matters) is almost identical.) with the only difference being that her wireless card is PCMCIA, and not USB.

I wonder if IRQ sharing isn't playing a role in this issue? Are there any other USB devices in use on your machine?

The WN111 RangeMax is not listed in the HCL, but apparently it is at least partially supported. Do you know what module is being used as the driver? If not post the output of lsmod and we should be able to tell.

The other consideration is the classic wireless LAN crap that you have doubtlessly already considered . . . does moving the computer around help . . . move the AP, etc.

shpenat 08-18-2009 03:56 AM

Few things to try:

Check signal strength on both sides (AP and NetGear). If it is too weak getting connected may be problematic.

Check dmesg whether it is really getting your card recognized and not trying to use any kernel module instead before activating ndiswrapper

MrCode 08-18-2009 05:11 PM

@foodown:

I have 3 devices (one is composite) plugged into USB ports on the back. 1) the external HDD, 2) the network adapter, and 3) the keyboard/mouse (which are wireless, and the USB slot is taken by the reciever, thereby making it a composite device...?). They all seem to work fine under Linux except for the network adapter.

I Wiki'd IRQ, and it seems to me that if it's a problem with interrupts, then I guess ndiswrapper is to blame? Also, another thing is that there are 3 of us in this house, and 1 needs to use a VPN for his work activities. I can never seem to connect while he's on the VPN. Maybe it's something to do with connection sharing?

and @shpenat: I'm pretty sure that the router is within signal range. It's only 2 floors below me (maybe about 10-15 ft.)

MrCode 08-19-2009 05:40 PM

One other thing: I did a
Code:

lsmod | grep "ndiswrapper"
while connected and got this:
Code:

ndiswrapper          193436  0
Does that "0" mean it's not really in use? If that's the case, then shouldn't that mean the wireless wouldn't work at all? Also, if I right-click on the NetworkManager icon and go to Connection Information it shows that it's using ndiswrapper as the driver.

foodown 08-19-2009 09:15 PM

The 0 just means that no other modules are using it.


Could you please post the full output of lsmod, lsusb, and dmesg?

MrCode 08-19-2009 11:25 PM

Here's the output:

lsmod:

Code:

Module                  Size  Used by
binfmt_misc            16776  1
bridge                56212  0
stp                    10500  1 bridge
bnep                  20224  2
input_polldev          11912  0
video                  25360  0
output                11008  1 video
lp                    17156  0
snd_intel8x0          37532  3
joydev                18496  0
snd_ac97_codec        112292  1 snd_intel8x0
ac97_bus                9856  1 snd_ac97_codec
snd_pcm_oss            46336  0
snd_mixer_oss          22656  1 snd_pcm_oss
snd_pcm                83076  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_seq_dummy          10756  0
snd_seq_oss            37760  0
snd_seq_midi          14336  0
snd_rawmidi            29696  1 snd_seq_midi
snd_seq_midi_event    15104  2 snd_seq_oss,snd_seq_midi
snd_seq                56880  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              29704  2 snd_pcm,snd_seq
snd_seq_device        14988  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
iTCO_wdt              19108  0
iTCO_vendor_support    11652  1 iTCO_wdt
hid_logitech          16256  0
ff_memless            13320  1 hid_logitech
ppdev                  15620  0
snd                    62756  16 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device
psmouse                61972  0
dcdbas                15264  0
pcspkr                10496  0
nvidia              9550692  46
soundcore              15200  1 snd
snd_page_alloc        16904  2 snd_intel8x0,snd_pcm
serio_raw              13444  0
usbhid                42336  1 hid_logitech
ndiswrapper          193436  0
shpchp                40212  0
parport_pc            40100  1
parport                42220  3 lp,ppdev,parport_pc
intel_agp              34108  1
agpgart                42696  2 nvidia,intel_agp
usb_storage            99648  1
fbcon                  46112  0
tileblit              10752  1 fbcon
font                  16384  1 fbcon
bitblit                13824  1 fbcon
softcursor              9984  1 bitblit

lsusb:

Code:

Bus 001 Device 002: ID 0d49:7212 Maxtor
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 002: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg: so long not all of it could fit in terminal window: see this link. Sorry if it's too long, probably only a few lines are relevant...but I don't know which ones.

As a note, I've updated my kernel since my first post, I'm now with 2.6.28-15. Same wireless behavior, though.

MrCode 08-20-2009 05:26 PM

Sorry about the bump, but otherwise I don't think this post would be noticed...

I had the .inf and .sys files that ndiswrapper uses for the wireless adapter on my external drive, and I just tried moving them to my Linux drive (/etc to be precise) and I re-installed them, and the connection went up almost immediately after I attempted re-connecting! Now, I don't know if this is a permanent fix, but it'll do for now, at least.

Maybe this is the "IRQ sharing bug" you were talking about (seeing as how the drive I was keeping the driver files on is USB)...I don't know. But if it is, then this might be a permanent fix. I'll see how it goes tomorrow when I try to get online, and if things are still going wrong, I'll post about it.

Thanks for the advice, guys!

MrCode 08-21-2009 01:22 PM

Well, I think I've blown the VPN theory out the window, because I've got a connection even while the VPN is active. I still have a significant delay in gaining Internet access, though; I guess IRQ sharing had nothing to do with it. :( If anyone has any other theories, please post them. I personally think it has to do with ndiswrapper, but I'm not entirely sure, and I don't know how to research into the problem. (ndiswrapper is FOSS, right? Maybe looking into the source would help? Although I don't really know anything about programming for network interfaces, I do have a little C/C++ experience. If I find that the important part is in ASM, then I'll be disappointed, let's just say that.)

foodown 08-21-2009 11:20 PM

Quote:

Originally Posted by MrCode (Post 3652722)
Well, I think I've blown the VPN theory out the window, because I've got a connection even while the VPN is active. I still have a significant delay in gaining Internet access, though; I guess IRQ sharing had nothing to do with it. :(

Probably not, but I still think that moving the windows drivers off of the USB drive was a very good idea.

Quote:

Originally Posted by MrCode (Post 3652722)
If anyone has any other theories, please post them. I personally think it has to do with ndiswrapper, but I'm not entirely sure, and I don't know how to research into the problem.

I'm not sure if it's a flaw in ndiswrapper per se, but it might be advisable to play around with different versions of the windows driver, say older versions and versions for win2k, winxp, vista, etc. You might find something that "jives" better with the wrapper.

MrCode 08-22-2009 08:30 PM

Thanks for the tip. I'll see if using an older (or newer?) driver makes a difference. One thing I also noticed, though: I looked at /etc/network/interfaces, and it looks like there are only lines for lo and I think eth0, but nothing for wlan0. Maybe that's where the problem is? If so, would adding "iface wlan0 inet manual" help? Or is it something else? I don't know the syntax of this config file...

I suppose I've got some learning to do...if I don't know the syntax of the config files (except maybe xorg.conf, which looks somewhat like C or structured BASIC), then I guess I can't really look into problems like this efficiently. To be honest, I'm surprised no one has posted anything regarding "homework questions" yet, LOL. But anyways, I'll try changing driver versions first and see how that goes.

EDIT: Here are some screenshots to clarify what's going on:

When I go to connect (after waiting for 10-15 seconds)

The (false) connection always drops after a little while

Just FYI, the load indicators are, from left to right, CPU, Network, Disk. that's why the middle one is circled.

MrCode 08-23-2009 01:45 AM

Well, I tried both. I can't seem to find any newer (or older) versions of the drivers for the network card. The worst part is that even if I did, it would require me to install them on the Windows drive first; All NetGear device drivers come in a "handy" self-extracting .exe. AARGH!! You can't even use Archive Manager to extract them (it's not a WinZip self-extracting .exe or PKUNZIP or anything like that, it's a full-on Windows InstallShield thing or whatever).

I do have a D-Link DWA-130, but that's proven to be more of a hassle than the NetGear. I found Linux drivers, but I can't get them to install properly. They're distributed in source form, and so you have to compile them with make. It always crashes at the "make install" step for me. ndiswrapper drivers don't work at all.

Also, I tried editing /etc/network/interfaces, but to no avail. Now, even though I put things back to the way they were, it seems to only be able to detect my wireless network, and I can never seem to connect to it (haven't gotten anything the whole day, just more bogus connections and "Destination Host Unreachable").

Any ideas? I can post the output of the (failing) D-Link driver install if you want...

I suppose if all else fails I can reformat the Linux drive and install a different distro on it (e.g. Debian, Fedora, Slackware (that one seems to be popular among the LQ crowd)) and see if it's any "friendlier" towards maybe the D-Link adapter. I mainly chose Ubuntu for its "user-friendliness". I suppose I could learn to man-up a little and get a little bit more mature distro... Which one do you guys recommend?

MrCode 08-24-2009 10:24 PM

Please? Any distro recommendations or advice w/ the D-Linux adapter?

Here's the output of make (which now seems to be failing before I ever get to "make install"):
Code:

make -C tools
make[1]: Entering directory `/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/tools'
/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/tools/bin2h
cp -f os/linux/Makefile.6 /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/Makefile
make  -C  /lib/modules/2.6.28-15-generic/build SUBDIRS=/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.28-15-generic'
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/mlme.o
/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/mlme.c: In function ‘BssEntrySet’:
/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/mlme.c:3633: warning: unused variable ‘idx’
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/rtmp_wep.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/action.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/ba_action.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/cmm_data.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/rtmp_init.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/rtmp_tkip.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/cmm_sync.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/eeprom.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/cmm_sanity.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/cmm_info.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/cmm_wpa.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../common/dfs.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/assoc.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/aironet.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/auth.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/auth_rsp.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/sync.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/sanity.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/rtmp_data.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/connect.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../sta/wpa.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../os/linux/rt_linux.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../os/linux/rt_profile.o
  CC [M]  /lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../os/linux/rt_main_dev.o
/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../os/linux/rt_main_dev.c: In function ‘rt_ieee80211_if_setup’:
/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../os/linux/rt_main_dev.c:788: error: ‘struct net_device’ has no member named ‘nd_net’
make[2]: *** [/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux/../../os/linux/rt_main_dev.o] Error 1
make[1]: *** [_module_/lib/firmware/2008_0528_RT2870_Linux_STA_v1.3.0.0/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-15-generic'
make: *** [LINUX] Error 2

I get the feeling that this just means that the source is poorly written... does that mean I'll have to go in and edit the source myself? (please let that not be the case...I know nothing about this field of programming, let alone being able to deduce how these drivers are supposed to work on a hardware level!)

foodown 08-24-2009 11:05 PM

Quote:

Originally Posted by MrCode (Post 3656258)
I get the feeling that this just means that the source is poorly written... does that mean I'll have to go in and edit the source myself? (please let that not be the case...I know nothing about this field of programming, let alone being able to deduce how these drivers are supposed to work on a hardware level!)

Well it certainly looks like a syntax error in the source, at least just based on this output:
Code:

rt_main_dev.c:788: error: ‘struct net_device’ has no member named ‘nd_net’

I don't, however, recommend trying to rewrite it. :)

Which revision in your D-Link? (A, B, or C) I will d/l the source and see if I can build it. If so, I can post the steps that worked for me. (Assuming that the source is not completely broken.)

That, or, you can post a link to the actual source archive and I can just go from there.

Just curious, but why do you invoke "make -C tools" and not "./configure; make; make install"? Is that what it says to do in a README file or something?


All times are GMT -5. The time now is 09:07 PM.