ndiswrapper won't work after boot

Help
2010-08-16
2012-10-06
  • omgwtfbyobbq
    omgwtfbyobbq
    2010-08-16

    If I plug in the WPN111 wireless usb adapter after boot everything works well
    and I get verification the device is working via dmesg.

    wlan0: ethernet device 00:22:3f:9d:a8:8c using NDIS driver: netwpn11, version:
    0x10005, NDIS version: 0x501, vendor: 'NDIS Network Adapter', 1385:5F01.F.conf
    wlan0: encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP
    with WPA, WPA2, WPA2PSK

    If I leave the device in the USB port during a reboot I get these error
    messages and the device won't work until I reload ndiswrapper after it's been
    removed then plug it back in again.

    ndiswrapper (NdisWriteErrorLogEntry:190): log: C0001391, count: 4,
    return_address: f86d3e8c
    ndiswrapper (NdisWriteErrorLogEntry:193): code: 0xf687fe00
    ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x1
    ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x0
    ndiswrapper (NdisWriteErrorLogEntry:193): code: 0x0
    ndiswrapper (mp_init:219): couldn't initialize device: C0000001
    ndiswrapper (pnp_start_device:435): Windows driver couldn't initialize the
    device (C0000001)
    ndiswrapper (mp_halt:262): device f69fa440 is not initialized - not halting
    ndiswrapper: device eth%d removed
    ndiswrapper: probe of 1-6:1.0 failed with error -22

    I'm using the most recent (1.5.0.2102) netgear drivers from their site. Does
    anyone have any insight regarding this problem?

     
  • omgwtfbyobbq
    omgwtfbyobbq
    2010-08-17

    I just noticed something very interesting. If I shutdown and boot into windows
    (server 2003), I'll have the same problem w/ the device that is only solved by
    removing and then reinstalling, but from that point forward the device will
    function properly if I restart and boot back into Windows. It appears that
    windows is doing something or not doing something that linux isn't or is in
    order to have the card start fine w/o removing it and all that.

     
  • omgwtfbyobbq
    omgwtfbyobbq
    2010-08-17

    Windows appears to be deactivating the device somehow so that it won't get the
    same error on boot. During shutdown an led on the device will stop blinking
    (unlike when rebooting from linux and windows somehow turns it back on so
    it'll work properly. What's really weird is that if I reboot into linux
    whatever windows turns off bogs down udev and results in the entire system
    freezing up.

     
  • The error code EVENT_NDIS_UNSUPPORTED_CONFIGURATION (0xC0001391) suggests that
    there is something wrong with the driver configuration. This can happen for
    example, if you have used the wrong inf-file for the installation or if the
    windows setup program sets some registry entries, that are not set in the
    ndiswrapper configuration. You can find and check the configuration in the
    *.conf file unter /etc/ndiswrapper/<<your driver="" id="">>/

    You can compare these values to the values in the windows registry and try to
    use the same values with ndiswrapper. More information about this can be found
    here:

    http://technet.microsoft.com/en-
    us/library/cc727663%28WS.10%29.aspx

     
  • omgwtfbyobbq
    omgwtfbyobbq
    2010-08-18

    There doesn't appear to be much of consequence in the advanced tab, just a
    region setting, however in the right most tab (can't remember the name
    offhand) there was a section for power with D0 and D3 states, and one of the
    items in the list was for waking from a D3 state. My guess is windows uses
    this to shut off the usb device during reboot, and turns it on again after,
    which is why it always functions properly between reboots for windows but not
    linux. Is there any way I can access this through ndiswrapper or iwpriv?

     
  • omgwtfbyobbq
    omgwtfbyobbq
    2010-08-18

    Looks like there is a sleep state mentioned in the ndiswrapper device config
    file. Is there any way I can trigger this from the command line?

     
  • Hi,

    the Tab with the D0 and D3 states is the wrong tab. You could also compile
    ndiswrapper with

    make DEBUG=5
    

    and look in the linux log file for the registry entries that the driver tries
    to read. You should be able to find the same entries in your WinXP registry.

    A sample conf file looks like this (from my avm usb stick) - but this is
    highly driver specific:

    sys_files|fwlanusb.sys 
    NdisVersion|0x50001
    Environment|1
    class_guid|4d36e972-e325-11ce-bfc1-08002be10318
    driver_version|AVM GmbH,12/28/2006,2.0.6.1647
    BusType|15
    SlotNumber|01
    NetCfgInstanceId|{28022A01-1234-5678-ABCDE-123813291A00}
    
    DisableSsidPending|1
    dot11BasicRateMask|1
    dot11DesiredBSSType|1
    dot11DesiredChannel|1
    dot11FragmentationThreshold|4096
    dot11NetworkType|3
    dot11PowerMode|1
    dot11RTSThreshold|4096
    dot11SupportedRateMask|8
    DriverDesc|NDIS Network Adapter
    Mode4x|1
    Service|FWLANUSB
    

    The same entries are contained in my WinXP registry, too

    There's no commandline tool to tell the driver that the configuration has
    changed. So you have to unload ndiswrapper, change the settings in the config
    file and then reload it.

    Nevertheless: Good luck with your adapter