NDISWRAPPER / MODPROBE not auto-configuring Wireless WUSB300N Network Adapter at boot
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
NDISWRAPPER / MODPROBE not auto-configuring Wireless WUSB300N Network Adapter at boot
I am having difficulties getting my Linksys WUSB300N to load at boot, configure, and connect. I am setting this up on my Frontend machine for Mythdora (will NOT have a keyboard attached).
Currently, the RC.Local and WPA_Supplicant.conf files HAVE BEEN configured (see below), but wont seem to work as the driver will NOT load at boot. I have it setup in /etc/modprobe.conf but get nothing. I have to manually load the driver using #modprobe ndiswrapper at each boot. Then, open Wireless Assistant and connect to network. It works for the time being but need this to auto-configure/connect at boot.
/etc/modprobe.conf (configured)
TOP LINE --> alias wlan0 ndiswrapper
WPA_SUPPLICANT.CONF file:
# allow frontend (e.g., wpa_cli) to be used by all users in 'wheel' group
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
#
# home network; allow all valid ciphers
network={
ssid="mythtvbed1"
scan_ssid=1
key_mgmt=WPA-PSK
psk="Lt5JnOW8&h#JzIq>c{3!5(D'uR;x(G#Au2ux-/BOK/~`4Sl+f-mHT/b"2PL?F!B"
}
RC.LOCAL
#!/bin/bash
# This is a rc.local file that will allow your wireless card to
# startup correctly given the right driver and information below.
# Rename this to rc.local and replace or copy and paste to /etc/rc.d/rc.local
# Don't forget to edit your /etc/wpa_supplicant/wpa_supplicant.conf file to
# match your info here.
# Edit here to configure your wireless card
ESSID="mythtvbed1" ## Enter your SSID
CHANNEL="6" ## This usually is channel 6
IP="192.168.1.103" ## IP address of your wireless card
INTERFACE="wlan0" ## This maybe ath0 or wlan0
MODE="Managed" ## Leave this as is
GATEWAY="192.168.1.1" ## Enter your Gateway IP here
#########################################################################
if [ "$INTERFACE" = "wlan0" ];
then
/sbin/modprobe wlan
/sbin/modprobe ath_hal
/sbin/modprobe ath_pci
else
/sbin/modprobe ipw2100
/sbin/modprobe ipw2200
fi
# Set up the WiFi card
echo "Configuring ${INTERFACE}:"
/sbin/ifconfig ${INTERFACE} down
/sbin/ifconfig ${INTERFACE} ${IP} netmask 255.255.255.0 up
/sbin/iwconfig ${INTERFACE} mode ${MODE}
/sbin/iwconfig ${INTERFACE} channel ${CHANNEL} rate Auto
/sbin/iwconfig ${INTERFACE} essid ${ESSID}
/sbin/route add default gw ${GATEWAY} ${INTERFACE}
/sbin/ifup ${INTERFACE} up
sleep 1
# Edit wpa_supplicant.conf to match the info you gave here.
/usr/sbin/wpa_supplicant -Bw -c /etc/wpa_supplicant.conf -Dmadwifi -i${INTERFACE}
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
I don't understand what you have going on. You mention setting the interface wlan0 to use ndiswrapper but your wpa_supplicant is using madwifi option on its interface. You are loading atheros modules plus some others which I am guessing is a wired nic. With defining alias in modprobe to ndiswrapper it will use ndiswrapper and the wpa_supplicant needs to use -Dwext generic interface ID if ndiswrapper is anywhere being current. There use to another but for very old ndiswrapper modules.
First thing is define the network interfaces in this machine and how each are required to work.
Post output of the command /sbin/lspci -v
/sbin/lsmod
/sbin/lsusb -v
Is NetworkManager service running?
If so I would turn it off since you are defining the interfaces from what I can tell.
Thanks for the FAST reply. I should mention I am a newbie... Will try and best explain the setup and answer your questions. The network device I am using is a WIRELESS Draft-N Adapter (WUSB300N); connects via USB. Motherboard: VIA EPIA M1000. As for Network Manager; not too sure how to check if it is running / turn off... Running Fedora 6 (I believe) with KDE. I installed WPA_Supplicant as suggested in the RC.LOCAL file I found after install of MythDora.
I am posting the outputs. Please let me know if you will need anything else... Thanks VERY much!
[root@localhost mythtv]# /sbin/lspci -v
00:00.0 Host bridge: VIA Technologies, Inc. VT8623 [Apollo CLE266]
Subsystem: VIA Technologies, Inc. Unknown device aa01
Flags: bus master, 66MHz, medium devsel, latency 8
Memory at d0000000 (32-bit, prefetchable) [size=128M]
Capabilities: [a0] AGP version 2.0
Capabilities: [c0] Power Management version 2
00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
(prog-if 00 [Normal decode])
Flags: bus master, 66MHz, medium devsel, latency 0
Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
Memory behind bridge: dc000000-ddffffff
Prefetchable memory behind bridge: d8000000-dbffffff
Capabilities: [80] Power Management version 2
00:0d.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host
Controller (rev 80) (prog-if 10 [OHCI])
Subsystem: VIA Technologies, Inc. IEEE 1394 Host Controller
Flags: bus master, medium devsel, latency 32, IRQ 5
Memory at de000000 (32-bit, non-prefetchable) [size=2K]
I/O ports at d000 [size=128]
Capabilities: [50] Power Management version 2
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 80) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller
Flags: bus master, medium devsel, latency 32, IRQ 11
I/O ports at d400 [size=32]
Capabilities: [80] Power Management version 2
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 80) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller
Flags: bus master, medium devsel, latency 32, IRQ 5
I/O ports at d800 [size=32]
Capabilities: [80] Power Management version 2
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 80) (prog-if 00 [UHCI])
Subsystem: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller
Flags: bus master, medium devsel, latency 32, IRQ 10
I/O ports at dc00 [size=32]
Capabilities: [80] Power Management version 2
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82) (prog-if
20 [EHCI])
Subsystem: VIA Technologies, Inc. USB 2.0
Flags: bus master, medium devsel, latency 32, IRQ 3
Memory at de001000 (32-bit, non-prefetchable) [size=256]
Capabilities: [80] Power Management version 2
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
Subsystem: VIA Technologies, Inc. Unknown device aa01
Flags: bus master, stepping, medium devsel, latency 0
Capabilities: [c0] Power Management version 2
00:11.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
(prog-if 8a [Master SecP PriP])
Subsystem: VIA Technologies, Inc. Unknown device aa01
Flags: bus master, medium devsel, latency 32, IRQ 11
[virtual] Memory at 000001f0 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 000003f0 (type 3, non-prefetchable) [size=1]
[virtual] Memory at 00000170 (32-bit, non-prefetchable) [size=8]
[virtual] Memory at 00000370 (type 3, non-prefetchable) [size=1]
I/O ports at e000 [size=16]
Capabilities: [c0] Power Management version 2
00:11.5 Multimedia audio controller: VIA Technologies, Inc.
VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
Subsystem: VIA Technologies, Inc. Unknown device aa01
Flags: medium devsel, IRQ 10
I/O ports at e400 [size=256]
Capabilities: [c0] Power Management version 2
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II]
(rev 74)
Subsystem: VIA Technologies, Inc. VT6102 [Rhine II] Embeded
Ethernet Controller on VT8235
Flags: bus master, medium devsel, latency 32, IRQ 11
I/O ports at e800 [size=256]
Memory at de002000 (32-bit, non-prefetchable) [size=256]
Capabilities: [40] Power Management version 2
01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8623 [Apollo
CLE266] integrated CastleRock graphics (rev 03) (prog-if 00 [VGA])
Subsystem: VIA Technologies, Inc. VT8623 [Apollo CLE266]
integrated CastleRock graphics
Flags: bus master, medium devsel, latency 32, IRQ 11
Memory at d8000000 (32-bit, prefetchable) [size=64M]
Memory at dc000000 (32-bit, non-prefetchable) [size=16M]
[virtual] Expansion ROM at dd000000 [disabled] [size=64K]
Capabilities: [60] Power Management version 2
Capabilities: [70] AGP version 2.0
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
I would do the following for total automatic startup of networking.
As root run the two following commands.
/sbin/service NetworkManager stop
/sbin/chkconfig --level 345 NetworkManager off
Now I am guessing there is a wired ethernet interface but not sure if you have it configured or not. Post info from this command ' /sbin/ifconfig -a '. Now if the wired nic is eth0 then as root edit the file /etc/sysconfig/network-scripts/ifcfg-eth0 and edit the line to say ONBOOT=no
Next there should be a file /etc/sysconfig/network-scripts/ifcfg-wlan0
You need to edit it to look like this. This is based on info you provided.
Edit /etc/rc.local to look like this. You are loading things you don't need and more than likely don't have installed. Also I define the normal location of wpa_supplicant.conf file on Standard Fedora install. Confirm your wpa_supplicant.conf is there and you have configured for your wpa setup. If you have not then I can help if you provide the following items exact as they are. If upper case, lower case, or mixed case it has to match exactly to work.
For wpa setup I need to know the type, wpa, wpa2, unless you are doing wep plus the type of wpa modes like tkip eap an so forth. Plus your passphrase key. Unless you generated it yourself with the command /usr/sbin/wpa_passphrase.
/etc/rc.local
Code:
#!/bin/bash
# To start up wpa_supplicant encryption.
/usr/sbin/wpa_supplicant -Bw -c /etc/wpa_supplicant/wpa_supplicant.conf -Dwext -i wlan0
And last I do assume you have loaded the 64bit inf windows driver into ndiswrapper. I would say you have since you can finally start the connection.
The "mythbox" has a wired ethernet connection. Am keeping the port open until I can get wireless client working. From what I am reading, edit the eth0 config file to ONBOOT=no and that will turn it off at boot.
I have the DIR-655 DLink Wireless Router (Draft N). I would like to use WPA2 as both router and NIC card support. WPA-Enterprise(WPA, WPA2, both), Cipher Type(TKIP, AES, both). To set the password, I just use an online WPA2 generator... Here is an example: 1$IGqXuyvE$P4YG3eVDqfwdj9jRIBNxJ1 emulator to check settings for yourself if you like: http://support.dlink.com/Emulators/dir655/login.html
# dmesg
ndiswrapper: no version for "struct_module" found: kernel tainted.
ndiswrapper version 1.41 loaded (smp=yes)
usb 4-1: reset high speed USB device using ehci_hcd and address 2
ndiswrapper: driver netmw245 (Linksys, A Division of Cisco Systems,
Inc.,12/07/2006,1.0.5.1) loaded
wlan0: ethernet device 00:1c:10:e8:ec:5f using NDIS driver: netmw245,
version: 0x1000308, NDIS version: 0x500, vendor: '', 13B1:0029.F.conf
wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK;
AES/CCMP with WPA, WPA2, WPA2PSK
usbcore: registered new interface driver ndiswrapper
wlan0: no IPv6 routers present
ADDRCONF(NETDEV_UP): wlan0: link is not ready
ADDRCONF(NETDEV_UP): wlan0: link is not ready
I installed wpa_supplicant using the YUM command:
#yum install wpa_supplicant
Location: /etc/wa_supplicant/wpa_supplicant.conf
Network Manger is either not running or has not been installed:# /sbin/service NetworkManager stop
NetworkManager: unrecognized service
# /sbin/chkconfig --level 345 NetworkManager off
bash: /sbin/chconfig: So such file or directory
There is an ifcfg-eth0 but no wlan0 file...
Found ifcfg-lo in the directory
Contains:
DEVICE=lo
IPADDR=127.0.0.1
NETMASK=255.0.0.0
NETWORK=127.0.0.0
# If you're having problems with gated making 127.0.0.0/8 a martian,
# you can change this to something else (255.255.255.255, for example)
BROADCAST=127.255.255.255
ONBOOT=yes
NAME=loopback
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
What it amounts to is you can only have one network interface up at a time with a defined gateway. lo does not matter.
So create and save the ifcfg-wlan0 file like I mentioned.
I have not seen current wpa_supplicant.conf file which I forgot to ask for. Post that so I know what you have. You need to use the wpa tool I mentioned to generate the key for the wpa_supplicant file.
Then in that file you define what you are going to use. Sounds like you want wpa2 which is where you define proto=RSN for wpa2. The easy setup is choose only one which most default store bought routers can only do one mode at a time as well as the cipher type.
For now I would leave your ifcfg-eth0 as is since that seems to be working but you need to rem out the /usr/bin/wpa_supplicant command from the /etc/rc.local and also set ONBOOT=no in your new ifcfg-wlan0
To test system once the ifcfg-wlan0 is set, the wpa_supplicant.conf is configured then you can issue these commands as root to bring the nics up and down.
Now it should start negogitating a connection. It will scroll several lines but should after 5 secs roughly say connection established. You will need to leave this window open for now but if it works then setup /etc.rc.local to run the wpa_supplicant command. To see nic info run command ' /sbin/ifconfig -a ' and also ' /sbin/iwconfig wlan0 '
If not working then to bring the eth0 backup run these commands as root.
pkill wpa_supplicant
/sbin/ifdown wlan0
/sbin/ifup eth0
If having issues then post the contents of the files I ask.
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/sysconfig/network-scripts/ifcfg-wlan0
/etc/wpa_supplicant/wpa_supplicant.conf
/etc/rc.local
/etc/modprobe.conf
It is still broke. Getting a Failure at boot; locptack interface (or somethin): does not seem to be present... Checked to see if the device was installed as Link light was not lighting: not installed...
Had to run modprobe ndiswrapper for driver to install.
Here is the output from the commands you requested I run:
[root@localhost temp]# /sbin/ifup wlan0
does not seem to be present, delaying initialization.
[root@localhost temp]# /usr/sbin/wpa_passphrase
usage: wpa_passphrase <ssid> [passphrase]
If passphrase is left out, it will be read from stdin
[root@localhost temp]# /usr/sbin/wpa_supplicant -Bw -c
/etc/wpa_supplicant.conf -Dwext -i wlan0
[root@localhost temp]# /sbin/ifdown eth0
[root@localhost temp]# /sbin/ifup eth0
Determining IP information for eth0... done.
I setup the Router to:
Security Mode: WPA-Personal
WPA Mode: WPA2
Cipher Type: AES
Group Key: 3600 sec (default)
Pre-Shared Key: Lt5JnOW8&h#JzIq>c{3!5(D'uR;x(G#Au2ux-/BOK/~`4Sl+f-mHT/b"2PL?F!B
eth0:
# VIA Technologies, Inc. VT6102 [Rhine-II]
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=00:40:63:C9:16:16
ONBOOT=no
# To start up wpa_supplicant encryption.
/usr/sbin/wpa_supplicant -Bw -c /etc/wpa_supplicant/wpa_supplicant.conf
-Dwext $
wpa_supplicant
# allow frontend (e.g., wpa_cli) to be used by all users in 'wheel'
group
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
#
# home network; allow all valid ciphers
network={
ssid="DLink"
scan_ssid=1
key_mgmt=WPA-PSK
I see you seemed to have changed your routers ESSID based on last post so command is set to work. Replace the contents inside the quotes with your clear key.
Next edit wpa_supplicant.conf to set encryption mode settings based on you using wpa2 and cipher AES
Code:
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
# update_config=1
network={
ssid="DLink"
#psk="orginal clear text key before generated here if you wish"
psk="Lt5JnOW8&h#JzIq>c{3!5(D'uR;x(G#Au2ux-/BOK/~`4Sl+f-mHT/b"2PL?F!B"
proto=RSN
}
# WPA for WPA
# RSN for WPA2
Once the changes are made run the following commands as root. Post output of each command.
[code]
/sbin/ifdown eth0
/sbin/ifdown wlan0
/sbin/modprobe ndiswrapper
/sbin/ifup wlan0
/usr/sbin/wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Now you need to open another terminal session and run these commands and post output. Wait to see if wpa_supplicant connects.
/sbin/iwconfig
/sbin/ifconfig wlan0
/sbin/iwlist wlan0 scan
But I don't think all those characters are valid in at least linux wpa like ! and ` and also you have a quote near the end which is going to throw the creation off the of the key. The key is going to be incorrect because of the " indicated near the end of the key but the trailing characters crashes the command.
Now if I use the key you posted minus the !`and extra " it generates fine. So the key on the router needs to be without !`and the ". [code]
/usr/sbin/wpa_passphrase DLink "Lt5JnOW8&h#JzIq>c{35(D'uR;x(G#Au2ux-/BOK/~4Sl+f-mHT/b2PL?FB"
NOTE the key on the router must be Lt5JnOW8&h#JzIq>c{35(D'uR;x(G#Au2ux-/BOK/~4Sl+f-mHT/b2PL?FB to use the above example based on some of your info. Again if the ESSID is incorrect it all must be redone to correct from beginning to end.
I perfer to just use numbers, upper, and lower case letters. Forget about those special characters. WEP, WPA, and WPA2 is easy to crack no matter what one uses for these store bought routers.
Now in some of the last post you first had the essid as mythtvbed1 then DLink and in the last post your wpa-supplicant has Dlink. Everything needs to be exact in character upper and lower case.
If the router is DLink then every place needs to be set as DLink as in ifcfg-wlan0, wpa_supplicant.conf and also in the generation of the psk key.
Distribution: Distribution: RHEL 5 with Pieces of this and that.
Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700
Rep:
Read post #10 in case you miss it. Then come to post #11.
Now lets start clean.
Edit both ifcfg-eth0 and ifcfg-wlan0 and put both as ONBOOT=no
Edit rc.local and rem out the wpa_supplicant command with a # in front of it.
Generate a psk key from the routers key plus correct ESSID in correct case.
Place what it generated in the wpa_supplicant.conf file.
Add the line proto=RSN for wpa2 mode like I show.
Save and exit
Reboot machine
It starts up with no networking coming up except for lo interface which does not matter.
Once the system is back up run the following commands as root. Post output of each command.
[code]
/sbin/ifdown eth0
/sbin/ifdown wlan0
/sbin/modprobe ndiswrapper
/sbin/ifup wlan0
/usr/sbin/wpa_supplicant -dd -Dwext -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
Now you need to open another terminal session and run these commands and post output. Wait to see if wpa_supplicant connects.
/sbin/iwconfig
/sbin/ifconfig wlan0
/sbin/iwlist wlan0 scan
Thanks for the walkthrough Brian... Gosh, I feel a little idiotic with the password generator mixup... Anyways, things are looking better after making the changes; was REAL nice to see the link light lit after initializing it.
Anyways just wanted to fill you in on this, probably no needed... I tried to boot will correct settings (wlan-0 ON) and got error on boot:
FAILED: Bringing up loopback: does not seem to be present, delaying initialization.
Turned everything off as per your request; no failure at boot, but did think this was interesting...
[root@localhost mythtv]# /sbin/ifdown eth0
[root@localhost mythtv]# /sbin/ifdown wlan0
[root@localhost mythtv]# /sbin/modprobe ndiswrapper [root@localhost mythtv]# /sbin/ifup wlan0
does not seem to be present, delaying initialization.[root@localhost mythtv]# /usr/sbinn/wpa_supplicant -dd -Dwext
-iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
wpa_supplicant v0.4.9
Copyright (c) 2003-2006, Jouni Mal...
The Wireless card came online and link light flickers. The router is showing the "Wireless Client". MAC Address is listed but no IP Address: 0.0.0.0. So of course, there is no internet nor can I WinSCP into the box. Had to enable the eth0 to pass the following output information...
[root@localhost mythtv]# /sbin/iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11g ESSID:"DLink"
Mode:Managed Frequency:2.412 GHz Access Point:
00:1C:F0:69:B4:22
Bit Rate=130 Mb/s Sensitivity=-200 dBm
RTS thr=2346 B Fragment thr=2346 B
Encryption key:1850-C69A-F80D-BF30-20D9-3EB3-B63B-9CFA
Security mode:restricted
Power Managementff
Link Quality:95/100 Signal level:-35 dBm Noise
level:-96 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
I updated the Router and assigned the IP Address (192.168.1.103) via hardware address. Now the Wireless Adapter SHOWS the correct IP address (Wireless Status on Router), but still no internet or WinSCP connection.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.