Author Topic: Encore Electronics USB Wifi Dongle Woes.(SOLVED, thanks)  (Read 2499 times)

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Encore Electronics USB Wifi Dongle Woes.(SOLVED, thanks)
« on: July 08, 2011, 12:15:36 AM »
My HP NX9005 laptop with LXDE 2011.06 happily restored to health has for many years sported an anonymous USB Wifi dongle to connect wirelessly. A lot of effort was expended on locating drivers for it and getting it to work with KDE 2007. Water under the bridge. It has generally got up and gone following a new install ever since if installed from PCC>Configure>New Connection and the drivers invoked in the correct order with Ndiswrapper.
Alas, with 2011.06, things have got more difficult.
It cannot be installed fully from PCC>> any more. The process would raise a storm of error messages in the past but it would work. Now, no error messages, save that no device is present which it has always said, and no connection. Doing modprobe -l (driver) for both the drivers involved gets 'driver already installed', and then doing modprobe ndiswrapper lights it up. If I ignore it for a period as in typing this letter, it drops the connection and can no longer see my router. The Power led stays lit but the Line led goes out. Doing modprobe ndiswrapper doesn't wake it. I don't know what else to try.

What I would like to know is how to make it start automagically. How to do the terminal thing of su (root) modprobe without opening up and typing it, or how to get Ndiswrapper to play nicely for me.
I would also like to fix the drop-out. Preventing it would be ideal, getting it back manually would do.
I suspect that this install is lacking something either in set-up or application as it was for some years solid and reliable.

Thanks.

The dongle is an Encore Electronics ENUWI-SG 802.11G and drivers are net5523.inf and athfmwdl.inf Chipset is Atheros AR5523.

« Last Edit: July 11, 2011, 02:09:24 AM by BJF »
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline JNibski

  • Full Member
  • ***
  • Posts: 154
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #1 on: July 08, 2011, 11:13:55 PM »
........there were some updates today.......... You NEED the proper firmware....
  OPEN synaptic > reload > check : MADWIFI and MADWIFI-source...> apply...etc
Reboot and see if things AUTODETECT, otherwise go to PCC > network and internet> There you could REMOVE connections {Like your integrated nics -if necessary} - and set up your new "WIRELESS" WIFI internet connection....should show as : wlan0.......etc.

http://madwifi-project.org/   Shows a newer copulation {of drivers} than the ones you used....

They {the atheros chips} use basically the same driver...{for now}...as you can see here :

 http://www.wireless-driver.com/Atheros-Wirelss-Module-Model-and-Chipset/

For location of your 'DONGLE' - open a terminal in root ....type :  lsusb

You can also run the LXDE live CD - add the new synaptic madwifi stuff, and test thru that .....

I did a similar thing earlier today : HERE.   ;)

JN.

« Last Edit: July 09, 2011, 12:51:44 AM by JNibski »
"Don't stare at an OJ can just because it says 'concentrate'..."

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #2 on: July 09, 2011, 12:06:35 AM »
JNibski: Greetings! Lest we get off on the wrong foot, I will apologise for doubting you first because you obviously are, from the look of your avatar anyway, far smarter than me. I'm sorry for doubting you. There, done.

The question I have is around everything that I have read, and I certainly haven't read everything, that tells me MADWIFI doesn't work with USB. And that USB works with Ndiswrapper. And that anyone that has had anything to do with one of these blasted AR5523-chipped dongles has had some success with net5523 and athfmwdl and nothing else. But new is good. If MADWIFI can extend its benevolence to include the old and obscure of USB thingies and solve my connection I'm willing to have a go. I'll go and look at your links for now anyway. For your part, can you poke some more words down the wire to me in support the Mad/USB hypothesis? Thank you.
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline JNibski

  • Full Member
  • ***
  • Posts: 154
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #3 on: July 09, 2011, 12:50:45 AM »
Hi Bjf,,,,   reading is good. ;)  - the AR5523 uses ath5k which is splained in the madwifi link i posted.

I have a D-link USB dongle with the exact chipset -I it "UNEARTHED" today with the idea of testing for NEAL and the bacon......I happen to be out of town at the moment at a wifi hotspot with my laptop.
I don't have the device with me , i think its a WUA-2340 but will get you more positive info tomorrow....
I have the chipset info in my notebook here, that i was looking up as you first posted...
I hope to get it to WORK for a client who is handicapped and lives downstairs from the router...

There has been advancements {with wi-fi} and the LINUX kernel since you had pclos 2007-9 connected ... ;)

Read the links - it might be helpful. Earlier today i plugged  a few "USB" dongles into a tower running the LIVE LXDE CD.......it found them....and i'm still doing testing.
{from my notes} ...one was a LINKSYS wusb54g ver 4 [ralink RT2500usb] which uses ndiswrapper-rt2500 and ndiswrapper-lsbcmnds6

This was a pci card : Airlink Atheros superG  : AWLH4130 [AR5001x+]  uses the ndiswrapper-net5211 from synaptic.

.......you might also enable ndiswrapper-net5211 (from synaptic) for your dongle if the prior info fails again for you...

You can also READ THIS for more complete wifi troubleshooting methods....

PCLOS has gone to great strides to get wireless connectivity achieved.  8)

JN.
« Last Edit: July 09, 2011, 12:59:04 AM by JNibski »
"Don't stare at an OJ can just because it says 'concentrate'..."

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #4 on: July 09, 2011, 01:06:09 AM »

How to do the terminal thing:

There is a script called "rc.local" and its located at "/etc". Anything in this script will executed with root's privileges just before the GUI starts. This script is the perfect place to add your two commands you want to execute on system boot.

If all you do after a system boot is to run those two commands as root to get the card to work right, then add those two lines in the script, reboot and see if they will work

About dropping the connection on inactivity. You can stop that from happening by sending a packet to your router after a certain period of time, lets try every half a minute.When the system is up and you are connected to your network, open the terminal and type this command and leave the system alobe for a while and see if the command will manage to hold the connection up.

while [ 1 ] ; do ping -c 1 XYZ ; sleep 30 ;  done

where XYZ is the ip address of your router
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #5 on: July 09, 2011, 04:46:46 AM »
JNibski:  :D It's late here and we're getting hammered by some unseasonal weather even for a New Zealand winter. I'm going to suspend operations for tonight and awake refreshed after hopefully sleeping through the "Severe storm-force" winds (that's 130kph) and torrential showers, and give it a try.

Muungwana: So I open /etc/rc.local as root and insert:

Quote
(Code) modprobe ndiswrapper

..on the next vacant line, then leave an empty line, and save?

And next boot my old Terminal>su root>modprobe ndiswrapper>exit>exit command will be done automagically by /rc.local and light up my dongle, as it were. Correct?

Presumably by XYZ you mean my Gateway Address as it appears by mouse-hover on the Connection in the Taskbar? In my case it's listed as 192.168.2.1

Same conditions apply, see you in the morning too  ;)
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #6 on: July 09, 2011, 09:06:38 AM »

correct on both

the line to insert is

/sbin/modprobe ndiswrapper

use a full path to the executable
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #7 on: July 09, 2011, 04:16:17 PM »
Muungwana: Did both those deeds. The modprobe works a treat although the boot seemed to faff about longer than usual and stopped at the log-in page instead of my usual auto log. I have only logged once, this may change with repeats.
Secondly, I have kept it up for over an hour now! (That's rood  ;D) The ping seems to be all the attention that the connection needs to stay interested. How do I embed that command to make it part of life?
And thirdly, what happens to all the above if the box hibernates. Does rc.local get read on wake-up too? Will the ping survive?

JNibski: Haven't forgotten you. I'd like to give the MADness a go in a spare moment. Watch this space.

Thanks guys.
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #8 on: July 09, 2011, 05:01:37 PM »
all commands in "/etc/rc.local" are executed once when the system boots up. The ping command will go into an infinite loop and should be able to survive hibernation. Do you have to run that modprobe command when the system gets out of hibernation?

change that modprobe command to this

/sbin/modprobe ndiswrapper 2>/dev/null 1>&2  &

also add this line to auto start the ping thing at boot time

while [ 1 ] ; do ping -c 1 192.168.2.1 2>/dev/null 1>&2 ; sleep 30 ;  done   &

copy and paste them to make sure you dont mistype them.

commands in rc.local are executed sequentially and if a command in there hangs, the entire boot up process will hang too and if a command will take time to return then the entire boot up process will wait for it, i think you noticed this behavior. Commands in there are run as daemons and hence it is an error for them to attempt to write to the terminal. Those additions will make run the command on a background and will not hold up the boot up process and standard outout, error redirect will also protect it from crashing out due to unexpected modprobe command output.


« Last Edit: July 09, 2011, 05:05:18 PM by muungwana »
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #9 on: July 09, 2011, 06:53:49 PM »
Muungwana: Not sure, didn't try hibernation with the dongle in action. What I know for sure is that once the thing went to sleep/got bored, modprobe couldn't get its attention. Rebooting and 'probing' was the only option. I'll get some "life" out of the way and then be a good boy and do my homework.

A bit of history: The perfectly happy updated 2010.06 with a slowing and increasingly unhappy Wifi (slow to come up, and woe betide me if I accidentally booted up without the dongle present. Reinstall drama!) got borked by fiddling. New install now of 2011.06 which is different..... in so many ways.
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #10 on: July 09, 2011, 07:15:45 PM »

modprobe commands loads a kernel module into the kernel.

You having to modprobing for the card to work means the "ndiswrapper" module is not auto loaded at boot time. Adding the command in "rc.local" to auto load the driver works and you can keep this set up but a more standard way to force a module to be loaded at boot time is to add the module name in "/etc/modprobe.preload" file.

As i said earlier, modprobe loads a kernel object into the kernel. If things stop working after you have run the command to load the module, run the same command with an "-r" to unload it and then load it up again and see if it will make a difference.

You can do the above by running these two commands

/sbin/modprobe -r ndiswrapper

/sbin/modprobe ndiswrapper
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline JNibski

  • Full Member
  • ***
  • Posts: 154
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #11 on: July 09, 2011, 10:28:44 PM »
..........I'm sorry to poop the party, but i have to ASK bjf -WHY is using the USB wifi connector (dongle) sooo important?   Your LAPTOP has a WIFI PCMCIA card slot, and BRANDS with certain chipsets work automatically with no problems...(like the [AR5001x+]) and there are several others...

Here is your laptop schematic.

.....and some examples of wireless (pcmcia) cardbus adapters (which work perfect) for Linux:
(Dlink-G650)...Netgear MA401...
They are very reasonably priced today, and to alleviate all the headaches, i would highly recommend getting one of those for your laptop.  

The Problem being the USB structure is very different on a pcmia card vrs a USB dongle with the same chip.

Anyway thanks muungwana for helping...i thought the 'ath9k' in the new kernel would do the trick for BJF... :-[ ...The MADWIFI has the driver for AR5523 but i'm thinking because its USB - it might not work. :-[

I found this - which might help , but is old. ...and i don't think PCLOS likes "su".....It looks so easy.
I had also read that the windows drivers for the unit had some problems...
I hope you guys are successful....but IF not - its good to know there are alternatives.... :-\

JN.



« Last Edit: July 09, 2011, 11:28:57 PM by JNibski »
"Don't stare at an OJ can just because it says 'concentrate'..."

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #12 on: July 09, 2011, 11:58:51 PM »
JNibski: The USB dongle came, free, with the free laptop, and it became a game with Joble to get it to go with 2007 KDE. I knew even less back then and choosing a replacement that might work from what I had on offer down here was a bit daunting. It's gone ever since, but has been of late quite cranky. This I can now put down to the amount of updating versus the number of brand new installs. Lately the new stuff, maybe LXDE in particular, has moved away from embracing stuff from the way-back-stack. And it could simply be that the ingredients in the new install don't react to the requirements of my dongle installation. Looks like that can be "coloured-in" afterwards if one knows how. I tried to get a PCMCIA dial-up modem to work years ago on this machine, and drew a blank back then when the slot couldn't be found by the OS. I still don't know if the slot is faulty. I was told (I think) that the first owner's son got something stuck in it at aged 3 years. So it's USB by default now, probably. However if the slot can be proven then yes, an alternative.

Muungwana: Good news! The rc.local file has been amended and the Wifi starts, sticks, and will survive a hibernation. Another of Rudge's Woo-hoo's is in order here. This means pretty much our business is done. The only doubt I have is around what might happen if I boot up without the dongle in place. The athfmwdl.inf driver is firmware which resets if the thing is unplugged. Logic decrees that if it isn't detected on a reboot, reinstalling to Ndiswrapper via PCC>> and another reboot would get it back. Nothing we have done will be changed and require a rewrite if a dongle-less boot takes place?
Thank you both for all your help. Muungwana, I'm off to study your coding and get my head around what we actually did.

Thanks guys  :-*  :-* in a non-suggestive, non-confrontational, non-gender-targeted way of course! It is a public Forum, after all!
   
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: Encore Electronics USB Wifi Dongle Woes.
« Reply #13 on: July 10, 2011, 12:17:07 AM »
I am glad things work to your satisfaction.

You can try to start the computer with the dongle not attached to see what will happen but i suspect nothing will happen.

The "ndiswrapper" module will be loaded but wont be affective since the kernel wont call it to handle anything. It will just sit in kernel memory space taking up space waiting to be called.

The ping command will send its pings but they will all fail but nothing noticeable will show. All pass and fail ping output are sent to linux equivalent of a black hole, a "/dev/null" device.

When you plug in the dongle after the system is up, the usb sub system will notice it and will inform the kernel and "ndiswrapper" will come up to claim it and will take control of it and the dongle should start to work. This is how it it should happen atleast but there is no way of knowing without testing it. You should test this when you have time. Its always better to know than to wonder.

If you start the computer without the dongle and you plug it in later on and it doesnt work, run the modprobe command above with the "-r" option to unload the module and then without the option to load it and see if the card will come to life
« Last Edit: July 10, 2011, 12:23:28 AM by muungwana »
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline BJF

  • Hero Member
  • *****
  • Posts: 591
Re: Encore Electronics USB Wifi Dongle Woes.(SOLVED, thanks)
« Reply #14 on: July 11, 2011, 02:22:14 AM »
A footnote to this as I mark it SOLVED. The dongle's current performance now rivals that of my Darling's C300 HP laptop with onboard Wifi for range, and is stable and forgiving. Now we can both stray to her "Woman Cave" out in the garden with our electonica and I don't need to plug into the Cat5 I ran out there in order to surf. All is well. Amazing what a Muungwana-full of smartness can do to your laptop with a couple of lines of code, isn't it.
J.G. Gone but never forgotten.


Monsters are real. Ghosts are real too. They live inside us, and sometimes they win.  -Stephen King.

To activate container, saturate contents with cider or single malt.