# [SOLVED] Wireless Networking with wpa_supplicant and madwifi

## tofor

I know this problem shows up all the time, but I have not been able to find a good tutorial that lays it out step by step from the beginning.  I actually think I might have wpa_supplicant and madwifi set up properly, but I can't get my card working.  I think I've looked at dozens of pages, without success, and spent hours on this so far, so it started to get a little frustrating.

lspci shows my card:

```

01:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 83)

```

/etc/init.d/ has net.wlan0:

```

alsasound

apache2

bootmisc

checkfs

checkroot

clock

consolefont

crypto-loop

cupsd

dbus

depscan.sh

esound

functions.sh

gpm

halt.sh

hdparm

hostname

keymaps

local

localmount

mit-krb5kadmind

mit-krb5kdc

modules

mysql

mysqlmanager

nas

net.eth0

net.eth1

net.lo

net.wlan0

netmount

```

but when I try to start wlan0, i get an error:

```

$/etc/init.d/net.wlan0

 [32;01m*[0m Starting wlan0

 [32;01m*[0m   Bringing up wlan0

 [32;01m*[0m     dhcp

 [31;01m*[0m       network interface wlan0 does not exist

 [31;01m*[0m       Please verify hardware or kernel module (driver)

```

So how come it's there if it doesn't exist?

One more thing.  If I ls -al I get some interesting output:

```

drwxr-xr-x  2 root root  2104 Apr 22 20:39 .

drwxr-xr-x 62 root root  4456 Apr 23 09:27 ..

-rwxr-xr-x  1 root root  3633 Apr 16 15:34 ._cfg0000_bootmisc

-rwxr-xr-x  1 root root  1194 Apr 16 15:34 ._cfg0000_checkfs

-rwxr-xr-x  1 root root  3183 Apr 16 15:34 ._cfg0000_checkroot

-rwxr-xr-x  1 root root  3047 Apr 16 15:34 ._cfg0000_clock

-rwxr-xr-x  1 root root  1429 Apr 16 15:34 ._cfg0000_consolefont

-rwxr-xr-x  1 root root  5987 Apr 16 15:34 ._cfg0000_halt.sh

-rwxr-xr-x  1 root root  3149 Apr 19 00:23 ._cfg0000_hdparm

-rwxr-xr-x  1 root root   433 Apr 16 15:34 ._cfg0000_hostname

-rwxr-xr-x  1 root root  1874 Apr 16 15:34 ._cfg0000_keymaps

-rwxr-xr-x  1 root root   620 Apr 16 15:34 ._cfg0000_local

-rwxr-xr-x  1 root root  1768 Apr 16 15:34 ._cfg0000_localmount

-rwxr-xr-x  1 root root  2947 Apr 16 15:34 ._cfg0000_modules

-rwxr-xr-x  1 root root 30522 Apr 16 15:34 ._cfg0000_net.lo

-rwxr-xr-x  1 root root  3046 Apr 16 15:34 ._cfg0000_netmount

-rwxr-xr-x  1 root root  1473 Apr 18 00:17 ._cfg0000_nscd

-rwxr-xr-x  1 root root   670 Apr 16 15:34 ._cfg0000_numlock

-rwxr-xr-x  1 root root   304 Apr 16 15:33 ._cfg0000_reboot.sh

-rwxr-xr-x  1 root root   276 Apr 16 15:34 ._cfg0000_rmnologin

-rwxr-xr-x  1 root root   558 Apr 16 19:56 ._cfg0000_rsyncd

-rwxr-xr-x  1 root root   385 Apr 16 15:33 ._cfg0000_shutdown.sh

-rwxr-xr-x  1 root root  2046 Apr 19 00:28 ._cfg0000_sshd

-rwxr-xr-x  1 root root   915 Apr 16 15:34 ._cfg0000_urandom

-rwxr-xr-x  1 root root  7183 Apr 20 17:02 alsasound

-rwxr-xr-x  1 root root  2573 Apr 20 03:01 apache2

-rwxr-xr-x  1 root root  3490 Aug 31  2006 bootmisc

-rwxr-xr-x  1 root root  1056 Aug 31  2006 checkfs

-rwxr-xr-x  1 root root  3183 Aug 31  2006 checkroot

-rwxr-xr-x  1 root root  2712 Aug 31  2006 clock

-rwxr-xr-x  1 root root  1429 Aug 31  2006 consolefont

-rwxr-xr-x  1 root root  1625 Apr 18 01:00 crypto-loop

-rwxr-xr-x  1 root root   302 Apr 20 03:39 cupsd

-rwxr-xr-x  1 root root  1152 Apr 19 16:51 dbus

lrwxrwxrwx  1 root root    21 Apr 16 15:34 depscan.sh -> ../../sbin/depscan.sh

-rwxr-xr-x  1 root root   993 Apr 19 14:48 esound

lrwxrwxrwx  1 root root    23 Apr 16 15:34 functions.sh -> ../../sbin/functions.sh

-rwxr-xr-x  1 root root   951 Apr 16 20:04 gpm

-rwxr-xr-x  1 root root  6150 Aug 31  2006 halt.sh

-rwxr-xr-x  1 root root  2949 Apr 19 00:23 hdparm

-rwxr-xr-x  1 root root   433 Aug 31  2006 hostname

-rwxr-xr-x  1 root root  1874 Aug 31  2006 keymaps

-rwxr-xr-x  1 root root   620 Aug 31  2006 local

-rwxr-xr-x  1 root root  1419 Aug 31  2006 localmount

-rwxr-xr-x  1 root root   687 Apr 18 01:15 mit-krb5kadmind

-rwxr-xr-x  1 root root   656 Apr 18 01:15 mit-krb5kdc

-rwxr-xr-x  1 root root  2947 Apr 16 15:35 modules

-rwxr-xr-x  1 root root 10661 Apr 19 23:30 mysql

-rwxr-xr-x  1 root root  6632 Apr 19 23:30 mysqlmanager

-rwxr-xr-x  1 root root   557 Apr 20 02:49 nas

lrwxrwxrwx  1 root root     6 Apr 16 15:34 net.eth0 -> net.lo

lrwxrwxrwx  1 root root     8 Apr 22 20:39 net.eth1 -> net.eth1

-rwxr-xr-x  1 root root 30003 Aug 31  2006 net.lo

lrwxrwxrwx  1 root root     6 Apr 20 10:36 net.wlan0 -> net.lo

-rwxr-xr-x  1 root root  3046 Aug 31  2006 netmount

-rwxr-xr-x  1 root root  1468 Aug 31  2006 nscd

-rwxr-xr-x  1 root root   670 Aug 31  2006 numlock

-rwxr-xr-x  1 root root  2244 Apr 16 14:44 pcmcia

-rwxr-xr-x  1 root root   221 Aug 31  2006 reboot.sh

-rwxr-xr-x  1 root root   276 Aug 31  2006 rmnologin

-rwxr-xr-x  1 root root   438 Aug 31  2006 rsyncd

lrwxrwxrwx  1 root root    23 Apr 16 15:34 runscript.sh -> ../../sbin/runscript.sh

-rwxr-xr-x  1 root root   287 Aug 31  2006 shutdown.sh

-rwxr-xr-x  1 root root  2294 Apr 20 02:38 slpd

-rwxr-xr-x  1 root root  1797 Apr 19 00:28 sshd

-rwxr-xr-x  1 root root  1893 Apr 16 14:47 sysklogd

-rwxr-xr-x  1 root root   915 Aug 31  2006 urandom

-rwxr-xr-x  1 root root   530 Apr 16 14:48 vixie-cron

-rwxr-xr-x  1 root root  3974 Apr 19 01:43 xdm

-rwxr-xr-x  1 root root   598 Apr 19 03:17 xprint

```

I'm very new to this, so please spell everything out.

P.S. I'm also having trouble copying from xterm.  Since I'm on a laptop, I don't have a middle button.  I saw that I need to enable EMULATE3BUTTON or something similar, but I couldn't figure out where to do that.Last edited by tofor on Wed Feb 06, 2008 2:46 pm; edited 1 time in total

----------

## blurp

you have a number of configuration files not updated. you should run

```
etc-update
```

after every emerge to update the configuration files in /etc.

 *tofor wrote:*   

> but when I try to start wlan0, i get an error: 

 

I think your wireless interface _may_ not be called wlan0. Do a

```
ifconfig -a
```

to see which one it is. If it is called "eth1", then rename the net.wlan0 file.

```
mv net.wlan0 net.eth1
```

----------

## tofor

Thank you! I  ran etc-update, but wasn't sure what to do from there.  Any links to a tutorial on that?  When I run ifconfig -a I only got eth0, l0, and sit0.  In other words, my card doesn't seem to be configured.  I've tried madwifi, ndiswrapper, and the ACX 111 drivers.  Not sure which is best, but none seem to work.  I installed teh ACX 111 drivers last, according to http://gentoo-wiki.com/HARDWARE_acx100 but wasn't sure where to go from there.

Also, I'm perfectly open to using iwconfig if that is easier.  I only chose wpa_supplicant because it sounded easier to set up.

----------

## blurp

 *tofor wrote:*   

> Thank you! I  ran etc-update, but wasn't sure what to do from there.  Any links to a tutorial on that?

 

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=4

 *tofor wrote:*   

> I've tried madwifi, ndiswrapper, and the ACX 111 drivers.  Not sure which is best, but none seem to work.  I installed teh ACX 111 drivers last, according to http://gentoo-wiki.com/HARDWARE_acx100 but wasn't sure where to go from there.

 

I've no exprience with your wireless device. Maybe you should check if the module was loaded. Do a

```
update-modules -force
```

You can start browsing the /lib/modules/<your kernel version>/kernel tree to see what is the name of the module.

----------

## tofor

 *Quote:*   

> I've no exprience with your wireless device. Maybe you should check if the module was loaded. Do a
> 
> Code:
> 
> update-modules -force

 

I tried this.  Requires --force, but I got the warning:

```
 * Updating /etc/modules.conf ...                                         [ ok ]

 * Updating /etc/modprobe.conf ...

 * Warning: could not generate /etc/modprobe.conf!                        [ !! ]

 * Updating /etc/modprobe.conf by hand ...                                [ ok ]

 * Updating modules.dep ... 
```

Not sure what that means.  I have installed wireless-tools, and I have installed drivers, but am I missing a step?  iwconfig does not list wlan0 or any other wireless connection.

----------

## tarpman

 *tofor wrote:*   

> 
> 
> ```
> 01:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 83)
> ```
> ...

 

That is not a wireless controller, that is your wired network card (the driver for which, incidentally, is e100).  Any other networking devices listed in lspci?

 *tofor wrote:*   

> P.S. I'm also having trouble copying from xterm.  Since I'm on a laptop, I don't have a middle button.  I saw that I need to enable EMULATE3BUTTON or something similar, but I couldn't figure out where to do that.

 

On my laptop pressing both buttons at once qualifies as a middle click with no configuration necessary.  This is a recent Asus laptop and I'm using the synaptics driver; YMMV.

 *tofor wrote:*   

> Thank you! I ran etc-update, but wasn't sure what to do from there. Any links to a tutorial on that?

 

```
emerge --help config
```

----------

## tofor

Whoops, you're right.  I pasted the wrong line.  Sorry about that.  Here is the correct one.

```
02:00.0 Network controller: Texas Instruments ACX 111 54Mbps Wireless Interface
```

This is a D-Link DWL-G630.  

On the copy/paste, I managed to get my USB mouse working, so the middle click works on that.

----------

## tofor

Solved!  See https://forums.gentoo.org/viewtopic-p-4751558.html#4751558

----------

