Dynex DX-WGNBC WiFi Cardbus PCMCIA  - How To


Forum: Networking
Topic: Dynex DX-WGNBC WiFi Cardbus PCMCIA  - How To
started by: john.martzouco

Posted by john.martzouco on Dec. 08 2007,20:42
This card works out of the box with the ath modules.  I'm not sure it's possible to use the ath modules with WPA.  Also, the ath modules taint the kernel (not sure what this means).

The following describes how to set it things up to use WPA with ndiswrapper.  WEP installation information can be found < here >.

First, unload the ath modules in this order:

Code Sample
rmmod ath_pci
rmmod ath_rate_sample
rmmod ath_hal


Next, install ndiswrapper (only needs to be done once):

Code Sample
ndiswrapper -i net5211.inf


Probe ndiswrapper:

Code Sample
modprobe ndiswrapper


Check status (not necessary for functionality, but for your piece of mind):

Code Sample
iwconfig
dmesg


Build your WPA config file, using this < trimmed down configuration file (ellipses replaced by your settings) >. I named my config file wpa_supplicant_short.conf:

Code Sample
network={
 ssid="..."
 psk="..."
}


Start WPA:

Code Sample
wpa_supplicant -B dd -c wpa_supplicant_short.conf -i wlan0 -D ndiswrapper


Run the GUI netcardconfig from the DSL Control Panel once and assign static IP.  Gateway and DNS servers get set automatically.  Click Apply and have the "Save configuration in the system" option ticked, the utility will create /opt/wlan0.sh for you.

Now, your connection your network should be active.

To persist this and have it fire up every time you boot, add the following to /opt/bootlocal.sh as follows.  Make a copy of the wlan0.sh if you want to maintain it manually:

Code Sample
# dynex cardbus wpa
rmmod ath_pci
rmmod ath_rate_sample
rmmod ath_hal
modprobe ndiswrapper
# driver loads up slowly on my hardware, so giving it time to finish
sleep 5
wpa_supplicant -B dd -c /home/dsl/config/wifi/wpa_supplicant_short.conf -i wlan0 -D ndiswrapper
/home/dsl/config/wifi/wlan0.sh &


Now searching for a boot code to disable the ath_ modules from loading up.

Posted by curaga on Dec. 09 2007,12:30
taint = using non-free (binary-only) modules
Posted by john.martzouco on Dec. 09 2007,12:32
Thank you Curaga.
Posted by john.martzouco on Dec. 15 2007,20:12
The steps that I've noted above work well in 4.1RC3.

I'm having trouble with the wpa_supplicant and wlan0.sh calls from bootlocal.sh in v4.1.  I've tried many variations, but have found that I can only successfully execute wpa_supplicant with a sudo call from outside bootlocal.sh.

I've created a script file and a desktop symlink to launch it (sudo wpa_supplicant...) but would rather have it execute automatically at startup.

What I've tried, and whether it worked or not:

1) call wpa_supplicant from bootlocal.sh - NO
2) call sudo wpa_supplicant from bootlocal.sh - NO
3) call wpa_supplicant without sudo and not root - NO
4) call sudo wpa_supplicant in aterm - YES
5) call sudo wpa_supplicant from script file - YES

Any help would be appreciated.

Thank you

Posted by ^thehatsrule^ on Dec. 15 2007,20:27
Maybe $PATH is different at that stage, try specifying the full path? (i.e. /usr/sbin/wpa_supplicant )
Note that you shouldn't require any use of sudo in bootlocal.sh as it is normally executed as root.
As for not loading the modules at start, it probably depends on how you are running DSL.

Posted by john.martzouco on Dec. 15 2007,20:52
Thanks hats,

That didn't work either.

Edit: this is what I get at bootup:
Code Sample
ioctl[SIOCSIWMODE]: No such device
Could not configure driver to use managed mode
ioctl[SIOCGIFFLAGS]: No such device
Could not set interface 'wlan0' UP
ioctl[SIOCGIFINDEX]: No such device
Failed to disable WPA in the driver.
ioctl[SIOCGIFFLAGS]: No such device
rmdir[ctrl_interface]: Bad address

Posted by ^thehatsrule^ on Dec. 15 2007,21:28
If it's still initializing at that point you might need to put in some sleep/wait commands
Posted by curaga on Dec. 15 2007,21:30
Ahh, the usual slow drivers. Add some waiting right before it, about 5 secs should be fine for starters.
Posted by john.martzouco on Dec. 15 2007,22:45
I'd like to try the sleep/wait.  I've searched all over and can't figure out what command and syntax to put in bootlocal.sh for this... may I impose on you to give me an example please?

Thanks.

Posted by sheldonisaac on Dec. 16 2007,02:51
[QUOTE][I'd like to try the sleep/wait.  I've searched all over and can't figure out what command and syntax to put in bootlocal.sh for this... may I impose on you to give me an example please?

Thanks.[QUOTE]

sleep n

where n is number of seconds

eg

CODE]sleep 5[/CODE]

< http://www.computerhope.com/unix/usleep.htm >

Posted by john.martzouco on Dec. 16 2007,14:07
Thanks Sheldon, that worked perfectly.

Hats, Curaga... thank you!  I'm trimming down the 20 second sleep I put in there to find best value.  The network initializes properly now.

I put the sleep 20 statement right after the modprobe ndiswrapper.

Posted by newby on Mar. 05 2008,00:25
Quote (curaga @ Dec. 09 2007,07:30)
taint = using non-free (binary-only) modules

Actually, there are seven taint flags:

P: A module with a Proprietary license has been loaded, i.e. a module that is not licensed under the GNU General Public License (GPL) or a compatible license. This may indicate that source code for this module is not available to the Linux kernel developers or to Novell's developers.

G: The opposite of 'P': the kernel has been tainted (for a reason indicated by a different flag), but all modules loaded into it were licensed under the GPL or a license compatible with the GPL.

F: A module was loaded using the Force option "-f" of insmod or modprobe,  which caused a sanity check of the versioning information from the module (if present) to be skipped.

R: A module which was in use or was not designed to be removed has been forcefully Removed from the running kernelusing the force option "-f" of rmmod.

S: The Linux kernel is running with Symmetric MultiProcessor support (SMP), but the CPUs in the system are not designed or certified for SMP use.

M: A Machine Check Exception (MCE) has been raised while the kernel was running. MCEs are triggered by the hardware to indicate a hardware related problem, for example the CPU's temperature exceeding a treshold or a memory bank signaling an uncorrectable error.

B: A process has been found in a Bad page state, indicating a corruption of the virtual memory subsystem, possibly caused by malfunctioning RAM or cache memory.

Proprietary binaries are only one of them.

Posted by ^thehatsrule^ on Mar. 05 2008,01:14
He was asking for these modules - and it was because they were proprietary.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.