If you are trying to get a device working with ndiswrapper, please help ndiswrapper project wiki by contributing your findings. See HowToContribute

Netgear WNA3100

From NDISWrapper
Jump to: navigation, search

NetGear, Inc. WNA3100(v1) Wireless-N 300

Info

See http://ubuntuforums.org/showthread.php?p=11199585 for more info

Reported to work with custom compilation.

Add the following to ntoskernal_io.c

wstdcall NTSTATUS WIN_FUNC(IoUnregisterPlugPlayNotification,1) 
(void *tag)
{
      TRACE2("%p", tag);
      TODO(); /* Probably Not, legacy function abandoned in Windows 7 */
      IOEXIT(return STATUS_SUCCESS); /* Linux doesn't use it either */
}

There is no need any more for custom compilation, it is already done in the current version(1.57) of ndiswrapper.

If you install cd that comes with the adapter on Windows 64 bit machine, files of the driver is installed to C:\Program Files (x86)\NETGEAR\driver\WIN764 and its name is bcmwlhigh6.

If you install it on 32 bit, you will already get correct driver, bcmwlhigh5. However, you use it under ndiswrapper on 64 bit Ubuntu, you will get a lot of uninitialized variables.

felmas@fachoper:~$ ndiswrapper -i path/to/driver/directory/bcmwlhigh6.inf
installing driver..
felmas@fachoper:~$ dmesg -c
Jan 15 17:07:49 fachoper kernel: [  195.470752] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisQueueIoWorkItem'
Jan 15 17:07:49 fachoper kernel: [  195.470765] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeIoWorkItem'
Jan 15 17:07:49 fachoper kernel: [  195.470777] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMSetMiniportAttributes'
Jan 15 17:07:49 fachoper kernel: [  195.470794] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMResetComplete'
Jan 15 17:07:49 fachoper kernel: [  195.470805] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMAllocatePort'
Jan 15 17:07:49 fachoper kernel: [  195.470817] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateIoWorkItem'
Jan 15 17:07:49 fachoper kernel: [  195.470828] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMSendNetBufferListsComplete'
Jan 15 17:07:49 fachoper kernel: [  195.470840] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMDeregisterMiniportDriver'
Jan 15 17:07:49 fachoper kernel: [  195.470851] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateNetBufferListPool'
Jan 15 17:07:49 fachoper kernel: [  195.470868] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMNetPnPEvent'
Jan 15 17:07:49 fachoper kernel: [  195.470885] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMRegisterMiniportDriver'
Jan 15 17:07:49 fachoper kernel: [  195.470896] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMFreePort'
Jan 15 17:07:49 fachoper kernel: [  195.470907] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMIndicateReceiveNetBufferLists'
Jan 15 17:07:49 fachoper kernel: [  195.470919] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMPauseComplete'
Jan 15 17:07:49 fachoper kernel: [  195.470930] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMOidRequestComplete'
Jan 15 17:07:49 fachoper kernel: [  195.470941] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeNetBufferListPool'
Jan 15 17:07:49 fachoper kernel: [  195.470952] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisCancelTimerObject'
Jan 15 17:07:49 fachoper kernel: [  195.470964] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisOpenConfigurationEx'
Jan 15 17:07:49 fachoper kernel: [  195.470975] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisSetTimerObject'
Jan 15 17:07:49 fachoper kernel: [  195.470986] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeTimerObject'
Jan 15 17:07:49 fachoper kernel: [  195.471001] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateTimerObject'
Jan 15 17:07:49 fachoper kernel: [  195.471012] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMIndicateStatusEx'
Jan 15 17:07:49 fachoper kernel: [  195.471023] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeNetBufferList'
Jan 15 17:07:49 fachoper kernel: [  195.471046] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisMGetBusData'
Jan 15 17:07:49 fachoper kernel: [  195.471057] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisGetSystemUpTimeEx'
Jan 15 17:07:49 fachoper kernel: [  195.471068] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateNetBufferAndNetBufferList'
Jan 15 17:07:49 fachoper kernel: [  195.471080] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateMdl'
Jan 15 17:07:49 fachoper kernel: [  195.471101] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisAllocateMemoryWithTagPriority'
Jan 15 17:07:49 fachoper kernel: [  195.471130] ndiswrapper (import:232): unknown symbol: NDIS.SYS:'NdisFreeMdl'
Jan 15 17:07:49 fachoper kernel: [  195.471140] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionBind'
Jan 15 17:07:49 fachoper kernel: [  195.471149] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionBindClass'
Jan 15 17:07:49 fachoper kernel: [  195.471159] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionUnbindClass'
Jan 15 17:07:49 fachoper kernel: [  195.471169] ndiswrapper (import:232): unknown symbol: WDFLDR.SYS:'WdfVersionUnbind'
Jan 15 17:07:49 fachoper kernel: [  195.471173] ndiswrapper (load_sys_files:199): couldn't prepare driver 'bcmwlhigh6'
Jan 15 17:07:49 fachoper kernel: [  195.471628] ndiswrapper (load_wrap_driver:102): couldn't load driver bcmwlhigh6; check system log for messages from 'loadndisdriver'    

bcmwlhigh5 works under ndiswrapper. However driver may not be loaded by default or matching with device may be wrong. If this is the case, when you list installed drivers, you will see an output similar to this:

felmas@fachoper:~$ ndiswrapper -l
bcmwlhigh5: driver installed

You won't see this line after above output:

device (0846:9020) present

To fix it, you should run:

felmas@fachoper:~$ ndiswrapper -a 0846:9020 bcmwlhigh5

Moreover, driver can require some configuration.

felmas@fachoper:~$ dmesg -c
Jan 15 17:12:28 fachoper kernel: [67654.005971] ndiswrapper (iw_set_freq:437): setting configuration failed (00010003)

In my case, I checked correct values in another machine that is already connected.

felmas@veteran:~$ iwconfig
lo    no wireless extensions.

eth0  no wireless extensions.

wlan0 IEEE 802.11abg ESSID:"your ID"
      Mode:Managed Frequency:2.412 GHz Access Point: "some MAC"
      Bit Rate="some rate" Tx-Power=15 dBm
      Retry logn limit:"some trial number" RTS thr:off Fragment thr:off
      Power Management:off

When I checked the values of WNA3100, I saw its Tx-Power is around 42 dBm and other parameters are correctly set.

felmas@fachoper:~$ iwconfig wlan tx 15

Then, it worked.

felmas@fachoper:~$ dmesg -c
Jan 15 17:24:23 fachoper kernel: [   77.641447] ndiswrapper version 1.57 loaded (smp=yes, preempt=no)
Jan 15 17:24:23 fachoper kernel: [   77.914056] ndiswrapper: driver bcmwlhigh5 (Netgear,05/05/2009, 5.10.79.30) loaded
Jan 15 17:24:24 fachoper kernel: [   78.181751] usbcore: registered new interface driver ndiswrapper

Another important parameter is power management, being off is better because when you start a high load traffic, you can get disconnected due to power issues.

After get it worked:

felmas@fachoper:~$ ndiswrapper -v
utils version: '1.9', utils version needed by module: '1.9'
module details:
filename:       /lib/modules/2.6.32-33-generic/kernel/ubuntu/ndiswrapper/ndiswrapper.ko
version:        1.55
vermagic:       2.6.32-33-generic SMP mod_unload modversions
felmas@fachoper:~$ ndiswrapper -l
bcmwlhigh5 : driver installed
	device (0846:9020) present
felmas@fachoper:~$ nm-tool

NetworkManager Tool

State: connected

- Device: eth0 -----------------------------------------------------------------
  Type:              Wired
  Driver:            e1000e
  State:             unavailable
  Default:           no
  HW Address:        "some MAC"

  Capabilities:
    Carrier Detect:  yes
  Wired Properties
    Carrier:         off

- Device: wlan0  ["some SSID"] ---------------------------------------------------
  Type:              802.11 WiFi
  Driver:            ndiswrapper
  State:             connected
  Default:           yes
  HW Address:        "some MAC"

  Capabilities:
    Speed:           54 Mb/s

  Wireless Properties
    WEP Encryption:  yes
    WPA Encryption:  yes
    WPA2 Encryption: yes

  Wireless Access Points (* = current AP)
    *"some SSID":      "Its configuration"

  IPv4 Settings:
    Address:         "some IP"
    Prefix:          "some prefix" ("its dotted version")
    Gateway:         "some IP"

    DNS:             "some IP"