# NO iwconfig

## oshman

I'm trying to configure wireless with madwifi and I get a  *Quote:*   

> command not found 

 error when running iwconfig - how do I fix this problem?

----------

## stlpct706

Make sure that you have emerged the net-wireless/wireless-tools package.

```
emerge -av net-wireless/wireless-tools
```

My iwconfig is located in the /usr/sbin directory.

Hope this helps.

----------

## oshman

Thanks for the help. Maybe you can give just a bit more. I can run iwconfig and this is the output:

```
localhost ~ # iwconfig

lo        no wireless extensions.

eth0      no wireless extensions.

```

How do I get the lo to be recognized as eth1?

----------

## oshman

```

localhost ~ # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:0B:5D:26:D9:94

          inet addr:192.168.2.19  Bcast:255.255.255.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

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

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

          collisions:0 txqueuelen:1000

          RX bytes:418634 (408.8 Kb)  TX bytes:54357 (53.0 Kb)

          Interrupt:11 Base address:0x1800

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

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

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

          collisions:0 txqueuelen:0

          RX bytes:5296 (5.1 Kb)  TX bytes:5296 (5.1 Kb)

localhost ~ # lspci |grep Atheros

0000:00:12.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)

```

----------

## stlpct706

I don't know how to rename the lo interface.  There is a program called ifrename that is included in the wireless-tools ebuild that allows you to change interface names, but I couldn't use it to rename the lo interface.  This site http://chrismetcalf.net/wiki/index.php/LinuxUberNetworkingHowto may help you with ifrename.  The lo interface should not have wireless extensions, as it provides your loopback address (127.0.0.1).

Comparing your output from lspci and iwconfig, I believe that you haven't set up everything necessary for wireless networking.  This wiki article, http://gentoo-wiki.com/HOWTO_Wireless_Configuration_and_Startup may help.

If you still don't have any network devices with wireless extensions, there may be a bigger problem.

----------

## Hieronymus

It looks as if the module for your wlan card isn't loaded yet. Try to modprobe your module and then check iwconfig again, it should be there. If that worked put this modulename in /etc/modules.autoload.d/kernel-2.6

----------

## oshman

I think I am getting closer to fixing this. There is no initscript for net.eth1 in /etc/init.d - I have tried modprobe and net-setup from the live disk - all to get the the wireless card recognized. It still seems that I am stuck with out this. How does one go about adding a scipt file for .net.eth1 - the one for net.eth0 was created during installation.

----------

## stlpct706

You need to make a symlink from net.lo to net.eth1.

```
ln -s /etc/init.d/net.lo /etc/init.d/net.eth1
```

Next, start net.eth1 (As root).

```
/etc/init.d/net.eth1 start
```

.

Then, add net.eth1 to the runlevel you want (in this case default).

```
rc-update add net.eth1 default
```

Depending on how your wireless network is set up, your card may configure itself.  But, if you use encryption, or the ESSID is hidden, you will have to configure the settings.  Look at /etc/conf.d/wireless.example for all of the options.  You need to save your settings in /etc/conf.d/wireless.  If you don't have these files, you may need to update your baselayout.

----------

## oshman

This is what I get:

```

localhost ~ # ln -s /etc/init.d/net.lo /etc/init.d/net.eth1

ln: `/etc/init.d/net.eth1': File exists

localhost ~ # /etc/init.d/net.eth1 start

bash: /etc/init.d/net.eth1: No such file or directory

localhost ~ # rc-update add net.eth1 default

 * /sbin/rc-update: /etc/init.d/net.eth1 not found; aborting.

```

I think what Hieronymus said may be the problem.  Is the module for my wlan card loaded yet? How do I check and if it isn't - how do I load it.

----------

## stlpct706

You can check which modules are loaded with the lsmod command.  Adding modules is done by "modprobe module-name" (executed as root, w/o the quotes).  You need to know the module name, though (which should be the compiled module filename without the .o or .ko extension).  These modules should be installed into the /lib/modules/kernel version directory when you compile and install the modules (either by kernel compilation or an ebuild).  Another important point is to make sure that the /usr/src/linux symlink points to the current kernel source directory (also in /usr/src).

  Where are you running these commands from (LiveCD, etc.).  I'm a little confused by the output the commands generate.  If net.eth1 exists (which the computer thinks it does), rc-update should not claim that the file doesn't exist.  So, I'm going to recommend the following steps (everything should be done as root).

Try to remove net.eth1 with rm, and attempt to make the symlink again.

Ensure that your module is compiled and inserted correctly.

Ensure that your kernel parameters are setup (especially wireless extensions)

I'm being dispatched to the Pensacola region to help with the hurricane cleanup.  So, I'm not going to be able to help after this.  I apologize, and I wish you good luck.[/list]

----------

## oshman

OK - I modprobed ath_pci , did an "emerge baselayout" and now get this with iwconfig.

```
localhost init.d # iwconfig 

lo        no wireless extensions.

eth0      no wireless extensions.

ath0      IEEE 802.11  ESSID:""

          Mode:Managed  Frequency:2.412 GHz  Access Point: 00:00:00:00:00:00

          Bit Rate:0 kb/s   Tx-Power:50 dBm   Sensitivity=0/3

          Retry:off   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

          Link Quality=0/94  Signal level=-95 dBm  Noise level=-95 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

```

Yet - I am not able to add net.ath0 to default - and I am unsure whether it is even configured properly yet.

```
localhost init.d # ln -s net.ath0

 ln: `./net.ath0': File exists

localhost init.d # rc-update add net.ath0 default  

* /sbin/rc-update: /etc/init.d/net.ath0 not found; aborting.
```

Pls advise

----------

## whoracle

 *oshman wrote:*   

> OK - I modprobed ath_pci , did an "emerge baselayout" and now get this with iwconfig.
> 
> ```
> localhost init.d # iwconfig 
> 
> ...

 

thanks, this thread helped me a bit on my way getting my wlan up running  :Smile: 

"ln -s net.ath0" is of what I know ambigous.. I think it should be "ln -s net.ath0 net.eth0" instead. (check "ln" out by issuing "man ln"...)

"rc-update add net.ath0 default " will work when the first command is correctly issued.

Good luck!

----------

