# wlan0: no device with ndiswrapper

## DocHaven

I have been messing around with gentoo for a few weeks now, and have so far loved it. My only problem (thusfar) is the lack of wireless for my laptop. I decided to try using ndiswrapper, and it has seems to have installed correctly. The only problem is that wlan0 doesn't appear in iwconfig:

```
# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

```

ndiswrapper seemed to install the windows drivers that I found:

```
# ndiswrapper -l

netathr : driver installed

        device (168C:002B) present

```

the device shows up in:

```
# lspci

00:00.0 Host bridge: ATI Technologies Inc RS690 Host Bridge

00:01.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (Internal gfx)

00:05.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 1)

00:06.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 2)

00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA

00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0)

00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1)

00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3)

00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI)

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 14)

00:14.1 IDE interface: ATI Technologies Inc SB600 IDE

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

01:05.0 VGA compatible controller: ATI Technologies Inc RS690M [Radeon X1200 Series]

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

04:00.0 Network controller: Atheros Communications Inc. Device 002b (rev 01)

```

I am pretty new to wireless devices and drivers and would just like to get this working if possible. If there is an easier way to get (what I believe to be) an Atheros AR5B95 working, then I would die to know how.   :Smile: 

Thanks, Doc Haven

----------

## d2_racing

Hi, first with an Atheros, you don't need ndiswrapper  :Razz: 

In fact, you need to enable the module ath5k or ath9k inside the kernel.

When you do that, just recompile your kernel and reboot.

Then post this :

```

# dmesg | grep -i ath

# ifconfig -a

# iwconfig

```

After that, I will help you to configure your wireless setting.

----------

## d2_racing

And for the record, can you run this plz :

```

# update-pciids

# lspci -v

```

----------

## DocHaven

Honestly, I would have never guessed that all I needed was a kernel module... I am a desktop user, but just bought a laptop for school. I never had to deal with wireless.

ok, so:

```

# dmesg | grep -i ath

[    0.045995] CPU0: AMD Athlon(tm) Processor L110 stepping 02

[    4.301208] ath9k 0000:04:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18

[    4.301222] ath9k 0000:04:00.0: setting latency timer to 64

[    4.929632] phy0: Selected rate control algorithm 'ath9k_rate_control'

[    4.931138] Registered led device: ath9k-phy0::radio

[    4.931164] Registered led device: ath9k-phy0::assoc

[    4.931190] Registered led device: ath9k-phy0::tx

[    4.931215] Registered led device: ath9k-phy0::rx

[    4.931248] phy0: Atheros AR9285 MAC/BB Rev:2 AR5133 RF Rev:e0: mem=0xf8140000, irq=18

```

```

# ifconfig -a

eth0      Link encap:Ethernet  HWaddr 00:23:8B:D7:5B:EF

          inet addr:192.168.1.112  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr: fe80::223:8bff:fed7:5bef/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:217 errors:0 dropped:0 overruns:0 frame:0

          TX packets:335 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:60585 (59.1 Kb)  TX bytes:38192 (37.2 Kb)

          Interrupt:26

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:16 errors:0 dropped:0 overruns:0 frame:0

          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:1008 (1008.0 b)  TX bytes:1008 (1008.0 b)

sit0      Link encap:IPv6-in-IPv4

          NOARP  MTU:1480  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

wlan0     Link encap:Ethernet  HWaddr 00:24:2C:9A:82:87

          UP BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

wmaster0  Link encap:UNSPEC  HWaddr 00-24-2C-9A-82-87-38-40-00-00-00-00-00-00-00-00

          UP RUNNING  MTU:0  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

```

# iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

sit0      no wireless extensions.

wmaster0  no wireless extensions.

wlan0     IEEE 802.11bgn  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: Not-Associated

          Tx-Power=20 dBm

          Retry min limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          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

```

```

 # update-pciids

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

100  163k  100  163k    0     0  29918      0  0:00:05  0:00:05 --:--:--  494k

Done.

```

```

# lspci -v

00:00.0 Host bridge: ATI Technologies Inc RS690 Host Bridge

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 64

00:01.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (Internal gfx) (prog-if 00 [Normal decode])

        Flags: bus master, 66MHz, medium devsel, latency 64

        Bus: primary=00, secondary=01, subordinate=01, sec-latency=64

        I/O behind bridge: 00009000-00009fff

        Memory behind bridge: f0000000-f01fffff

        Prefetchable memory behind bridge: 00000000d0000000-00000000dfffffff

        Capabilities: [44] HyperTransport: MSI Mapping Enable+ Fixed+

        Capabilities: [b0] Subsystem: ATI Technologies Inc RS690 PCI to PCI Bridge (Internal gfx)

00:05.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 1) (prog-if 00 [Normal decode])

        Flags: bus master, fast devsel, latency 0

        Bus: primary=00, secondary=03, subordinate=03, sec-latency=0

        I/O behind bridge: 0000a000-0000afff

        Memory behind bridge: 88000000-880fffff

        Prefetchable memory behind bridge: 00000000cfd00000-00000000cfdfffff

        Capabilities: [50] Power Management version 3

        Capabilities: [58] Express Root Port (Slot+), MSI 00

        Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Count=1/1 Enable+

        Capabilities: [b0] Subsystem: Acer Incorporated [ALI] Device 028c

        Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+

        Capabilities: [100] Virtual Channel <?>

        Kernel driver in use: pcieport-driver

00:06.0 PCI bridge: ATI Technologies Inc RS690 PCI to PCI Bridge (PCI Express Port 2) (prog-if 00 [Normal decode])

        Flags: bus master, fast devsel, latency 0

        Bus: primary=00, secondary=04, subordinate=04, sec-latency=0

        Memory behind bridge: f0200000-f02fffff

        Capabilities: [50] Power Management version 3

        Capabilities: [58] Express Root Port (Slot+), MSI 00

        Capabilities: [80] Message Signalled Interrupts: Mask- 64bit- Count=1/1 Enable+

        Capabilities: [b0] Subsystem: Acer Incorporated [ALI] Device 028c

        Capabilities: [b8] HyperTransport: MSI Mapping Enable+ Fixed+

        Capabilities: [100] Virtual Channel <?>

        Kernel driver in use: pcieport-driver

00:12.0 SATA controller: ATI Technologies Inc SB600 Non-Raid-5 SATA (prog-if 01 [AHCI 1.0])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 22

        I/O ports at 8440 [size=8]

        I/O ports at 8434 [size=4]

        I/O ports at 8438 [size=8]

        I/O ports at 8430 [size=4]

        I/O ports at 8400 [size=16]

        Memory at f0507000 (32-bit, non-prefetchable) [size=1K]

        Capabilities: [60] Power Management version 2

        Kernel driver in use: ahci

00:13.0 USB Controller: ATI Technologies Inc SB600 USB (OHCI0) (prog-if 10 [OHCI])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 16

        Memory at f0504000 (32-bit, non-prefetchable) [size=4K]

        Kernel driver in use: ohci_hcd

00:13.1 USB Controller: ATI Technologies Inc SB600 USB (OHCI1) (prog-if 10 [OHCI])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

        Memory at f0505000 (32-bit, non-prefetchable) [size=4K]

        Kernel driver in use: ohci_hcd

00:13.3 USB Controller: ATI Technologies Inc SB600 USB (OHCI3) (prog-if 10 [OHCI])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 17

        Memory at f0506000 (32-bit, non-prefetchable) [size=4K]

        Kernel driver in use: ohci_hcd

00:13.5 USB Controller: ATI Technologies Inc SB600 USB Controller (EHCI) (prog-if 20 [EHCI])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 19

        Memory at f0507400 (32-bit, non-prefetchable) [size=256]

        Capabilities: [c0] Power Management version 2

        Capabilities: [e4] Debug port: BAR=1 offset=00e0

        Kernel driver in use: ehci_hcd

00:14.0 SMBus: ATI Technologies Inc SBx00 SMBus Controller (rev 14)

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: 66MHz, medium devsel

        I/O ports at 8410 [size=16]

        Capabilities: [b0] HyperTransport: MSI Mapping Enable- Fixed+

00:14.1 IDE interface: ATI Technologies Inc SB600 IDE (prog-if 8a [Master SecP PriP])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 255

        I/O ports at 01f0 [size=8]

        I/O ports at 03f4 [size=1]

        I/O ports at 0170 [size=8]

        I/O ports at 0374 [size=1]

        I/O ports at 8420 [size=16]

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, slow devsel, latency 64, IRQ 16

        Memory at f0500000 (64-bit, non-prefetchable) [size=16K]

        Capabilities: [50] Power Management version 2

        Kernel driver in use: HDA Intel

00:14.3 ISA bridge: ATI Technologies Inc SB600 PCI to LPC Bridge

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, 66MHz, medium devsel, latency 0

00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge (prog-if 01 [Subtractive decode])

        Flags: bus master, 66MHz, medium devsel, latency 64

        Bus: primary=00, secondary=09, subordinate=09, sec-latency=64

00:18.0 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] HyperTransport Technology Configuration

        Flags: fast devsel

        Capabilities: [80] HyperTransport: Host or Secondary Interface

00:18.1 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Address Map

        Flags: fast devsel

00:18.2 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] DRAM Controller

        Flags: fast devsel

00:18.3 Host bridge: Advanced Micro Devices [AMD] K8 [Athlon64/Opteron] Miscellaneous Control

        Flags: fast devsel

        Capabilities: [f0] Secure device <?>

01:05.0 VGA compatible controller: ATI Technologies Inc RS690M [Radeon X1200 Series] (prog-if 00 [VGA controller])

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, fast devsel, latency 64, IRQ 18

        Memory at d0000000 (64-bit, prefetchable) [size=256M]

        Memory at f0100000 (64-bit, non-prefetchable) [size=64K]

        I/O ports at 9000 [size=256]

        Memory at f0000000 (32-bit, non-prefetchable) [size=1M]

        Capabilities: [50] Power Management version 2

        Capabilities: [80] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable-

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

        Subsystem: Acer Incorporated [ALI] Device 028c

        Flags: bus master, fast devsel, latency 0, IRQ 26

        I/O ports at a000 [size=256]

        Memory at cfdef000 (64-bit, prefetchable) [size=4K]

        Memory at cfdf0000 (64-bit, prefetchable) [size=64K]

        [virtual] Expansion ROM at cfd00000 [disabled] [size=64K]

        Capabilities: [40] Power Management version 3

        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable+

        Capabilities: [70] Express Endpoint, MSI 01

        Capabilities: [ac] MSI-X: Enable- Mask- TabSize=2

        Capabilities: [cc] Vital Product Data <?>

        Capabilities: [100] Advanced Error Reporting

                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-

                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-

                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSVoil-

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr-

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-

        Capabilities: [140] Virtual Channel <?>

        Capabilities: [160] Device Serial Number 00-00-00-00-00-00-00-00

        Kernel driver in use: r8169

04:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

        Subsystem: Foxconn International, Inc. Device e016

        Flags: bus master, fast devsel, latency 0, IRQ 18

        Memory at f0200000 (64-bit, non-prefetchable) [size=64K]

        Capabilities: [40] Power Management version 3

        Capabilities: [50] Message Signalled Interrupts: Mask- 64bit- Count=1/1 Enable-

        Capabilities: [60] Express Legacy Endpoint, MSI 00

        Capabilities: [100] Advanced Error Reporting

                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-

                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSVoil-

                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSVoil-

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-

        Capabilities: [140] Virtual Channel <?>

        Capabilities: [160] Device Serial Number 12-14-24-ff-ff-17-15-00

        Capabilities: [170] Power Budgeting <?>

        Kernel driver in use: ath9k

        Kernel modules: ath9k

```

----------

## DocHaven

Well, it seems that that was the ticket. I just tried using wicd to connect to a network, ending successfully. I would still like to know how to connect through a terminal if at all possible.   :Smile: 

Thanks d2_racing for pointing me to the kernel modules, you have no idea how long I would be looking for them.   :Very Happy: 

Doc Haven

----------

## d2_racing

Hi, to use the manual way is this :

```

# cd /etc/init.d

# ln -sfn net.lo net.wlan0

# ls -la

# emerge -av wpa_supplicant

```

After that, you need to configure your /etc/conf.d/net and add this :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" )

```

Finally, you need to configure your wireless setting here inside /etc/wpa_supplicant/wpa_supplicant.conf :

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

ap_scan=0

#update_config=1

network={

   ssid="your_network"

   psk="your_password"

   proto=WPA2

   key_mgmt=WPA-PSK

   pairwise=CCMP

   group=CCMP

   priority=5

}

```

And if you want to enable your wireless connection, you only need to run this :

```

# /etc/init.d/net.wlan0 start

# /etc/init.d/net.wlan0 stop

```

----------

