LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   ndiswrapper can't initialize my wifi usb device (https://www.linuxquestions.org/questions/linux-wireless-networking-41/ndiswrapper-cant-initialize-my-wifi-usb-device-577441/)

vicenterb 08-15-2007 11:32 PM

ndiswrapper can't initialize my wifi usb device
 
Hi. I have this problem: I have an X-Micro Wifi USB dongle. After searching and googling long time, I concluded that the only way to make it work on Linux was the ndiswrapper way.

I installed ndiswrapper, installed the Windows driver, and everything works fine: Wireless interface wlan0 is there, I can configure it using iwconfig, I can see the wireless net, i can connect, i can surf the web, etc.

The problem comes when I reboot my box. Then the wireless interface doesn't show up. dmesg shows:

vicente@VICENTE-P4:~$ dmesg | grep ndisw
[ 24.256000] ndiswrapper version 1.38 loaded (preempt=no,smp=yes)
[ 24.789208] ndiswrapper: driver net5523 (,03/10/2005,1.2.0.25) loaded
[ 39.820889] ndiswrapper (NdisWriteErrorLogEntry:231): log: C0001389, count: 4, return_address: f8d36d1b
[ 39.820897] ndiswrapper (NdisWriteErrorLogEntry:234): code: 0xf7f207c8
[ 39.820901] ndiswrapper (NdisWriteErrorLogEntry:234): code: 0x28
[ 39.820905] ndiswrapper (NdisWriteErrorLogEntry:234): code: 0xf8b94000
[ 39.820909] ndiswrapper (NdisWriteErrorLogEntry:234): code: 0xf8b94000
[ 39.821068] ndiswrapper (miniport_init:275): couldn't initialize device: C0000001
[ 39.821080] ndiswrapper (pnp_start_device:426): Windows driver couldn't initialize the device (C0000001)
[ 39.821113] ndiswrapper (miniport_halt:339): device f7f20400 is not initialized - not halting
[ 39.821128] ndiswrapper: device eth%d removed
[ 39.821153] ndiswrapper: probe of 3-6.4.2:1.0 failed with error -22
[ 39.821173] usbcore: registered new interface driver ndiswrapper


So, it says ndiswrapper can't initialize my device using the windows driver. Even if i switch to Windows, I can't use the dongle. I have to unplug it, and plug it again. The n it works on Windows. After that, i switch to Linux again and it works perfectly again, dmesg showing:

vicente@VICENTE-P4:~$ dmesg | grep ndisw
[ 24.082381] ndiswrapper version 1.38 loaded (preempt=no,smp=yes)
[ 24.432764] ndiswrapper: driver net5523 (,03/10/2005,1.2.0.25) loaded
[ 25.175485] usbcore: registered new interface driver ndiswrapper


My dongle has two leds: Power & Link. I also noticed that when i reboot from Linux, the power Led starts to blink, so it seems like ndiswrapper leaves the device on an unstable state or something like that.

My configuration is:

Distro: Ubuntu Feisty (7.04)
Kernel: 2.6.20
ndiswrapper: 1.38
Wifi USB Card: X-Micro (http://www.x-micro.com/main-product-108usbadapter.html)
Chipset: Atheros AR5523
Driver: From Manufacturer CD (Windows XP)

This version of ndiswrapper was installed using apt-get. I tried installing the newer version from source (1.47), but the problem remains.

Please help me to solve this, i only use linux on my work, and want to do the same at home, but this problem is holding me from saying good bye to Virus XP .

lambchops468 08-19-2007 01:36 PM

Guess what...I have the Trendnet TEW-444UB which uses the same Atheros AR5523 chipset.

This chipset requires that you install two drivers in ndiswrapper because it cannot hold its firmware when unplugged (which I think is a stupid design).The first driver loads the firmware and the second operates the device

Hopefully, the instructions for setting up my USB adapter are the same as yours...

edit upcoming for instructions which i have to retrieve from another computer.

****begin edit****
To help you in future troubleshooting, this is how the USB adapter works: First, after being plugged in, the command 'lsusb' shows it has an id of "157e:3007". The adapter does not have the proper firmware loaded, and therefore will not operate properly with the driver net5523. First, the driver athfmwdl must load to initialize and load the firmware, which changes the USB id to "157e:3006",which the driver net5523 will operate on.

First, I recommend uninstalling all of the drivers related to the device in ndiswrapper with the ndiswrapper command.

1. In linux, unplug and replug the device to clear the firmware.
2.
Code:

ndiswrapper -i athfmwdl.inf
(check the website if you don't have this driver.)
3.
Code:

modprobe ndiswrapper
(Note any changes in the lights of the dongle)
4.
Code:

modprobe -r ndiswrapper
5.
Code:

ndiswrapper -i net5523.inf
6.
Code:

modprobe ndiswrapper
at this point your device should be working...the lights normal as in XP.

For me, running SUSE 10.2, when i reboot/cold start, the device will start properly.

vicenterb 08-19-2007 06:08 PM

Hi!

Thanks for your help. I installed the other driver as you said, but the leds of my dongle are still off. Actually, I don't get an error anymore when I reboot the machine, but only the new driver is loaded.

ndiswrapper -l shows both drivers installed, but only the newer show the "device present" phrase.

Is there anything else that you did? Some hint that can point me in the right direction?

Thanks again

lambchops468 08-20-2007 11:33 AM

that's about all I had to do...

anyway, only one driver should show device present because ndiswrapper relies on the USB ID # (which may not be like mine), which changes when the first driver is done loading (which is actually good because ndiswrapper then knows to use the second driver without user intervention).

which driver is showing hardware present?

also, please post your .inf files so that i can compare them to mine

suman4674 04-06-2008 07:43 PM

Trendnet TEW-444UB/A USB Wireless problem on Ubuntu
 
I am using following commands to install the Trendnet TEW-444UB/A USB Wireless .I am not getting any error.I can see the wireless Connection in Network settings and i have configured my ESSID correctly.Still i am not able to connect to internet.Any help will be appreciated

I removed the Device to reset the firmware and ran the below batch
lsusb
sudo rm -R /etc/ndiswrapper/*
cd Driver/
sudo ndiswrapper -i a*.inf
sudo modprobe ndiswrapper
sudo modprobe -r ndiswrapper
sudo ndiswrapper -i n*.inf
sudo modprobe ndiswrapper
lsusb
iwconfig
/*****the output on terminal ****/
~$ sudo ndiswrapper -l
athfmwdl : driver installed
net5523 : driver installed
device (157E:3006) present

~$ iwconfig
lo no wireless extensions.

eth0 no wireless extensions.

wlan0 IEEE 802.11g ESSID:"Kumar"
Mode:Managed Frequency:2.437 GHz Access Point: Not-Associated
Bit Rate:54 Mb/s
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0


All times are GMT -5. The time now is 09:48 AM.