# help...problem with internal PCI wireless...[SOLVED]

## papapenguin

Hi, I just installed an internal wireless card in my laptop after countless problems with a PCMCIA card...

I can see it, but something is up--I get a eth1 does not exist problem upon boot...

 *Quote:*   

> papapenguin ~ # lspci -v
> 
> 00:00.0 Host bridge: VIA Technologies, Inc. P/KN266 Host Bridge
> 
>         Subsystem: Mitac Device 8381                           
> ...

 

 *Quote:*   

> papapenguin ~ # ifconfig
> 
> eth0      Link encap:Ethernet  HWaddr 00:40:d0:4a:e5:34
> 
>           inet addr:192.168.1.42  Bcast:255.255.255.255  Mask:255.255.255.0
> ...

 

 *Quote:*   

> papapenguin ~ # emerge --info   
> 
> Portage 2.1.6.4 (default/linux/x86/2008.0/desktop, gcc-4.3.2, glibc-2.9_p20081201-r1, 2.6.28-gentoo i686)                                                                           
> 
> =================================================================                         
> ...

 

----------

## papapenguin

I have an update, by running:

 *Quote:*   

> # emerge --info 
> 
>  # update-pciids 
> 
>  # lspci 
> ...

 

my ifconfig changed...

 *Quote:*   

> papapenguin ~ # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:40:d0:4a:e5:34
> 
>           inet addr:192.168.1.42  Bcast:255.255.255.255  Mask:255.255.255.0
> ...

 

now at last I can see my wlan...but when I try to start it...

 *Quote:*   

> papapenguin ~ # /etc/init.d/net.wlan0 start
> 
> -su: /etc/init.d/net.wlan0: No such file or directory
> 
> 

 

----------

## d2_racing

Hi, ok first, can you post this :

```

# cd /etc/init.d/ && ls -la

# iwconfig 

# ifconfig -a

# lsmod

# lspci -v

```

----------

## papapenguin

 *Quote:*   

> papapenguin ~ # cd /etc/init.d/ && ls -la
> 
> total 308                                
> 
> drwxr-xr-x  2 root root  4096 Jan  8 01:57 .
> ...

 

and then this...

 *Quote:*   

> papapenguin init.d # iwconfig
> 
> -su: iwconfig: command not found
> 
> papapenguin init.d #

 

 *Quote:*   

> papapenguin init.d # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:40:d0:4a:e5:34
> 
>           inet addr:192.168.1.42  Bcast:255.255.255.255  Mask:255.255.255.0
> ...

 

 *Quote:*   

> papapenguin init.d # lsmod
> 
> Module                  Size  Used by
> 
> ipv6                  232860  8      
> ...

 

and finally:

 *Quote:*   

> papapenguin init.d # lspci -v                                                             
> 
> 00:00.0 Host bridge: VIA Technologies, Inc. P/KN266 Host Bridge                           
> 
>         Subsystem: Mitac Device 8381                                                      
> ...

 

----------

## d2_racing

Ok, I see that you have the ath5k module which is nice to see  :Razz: 

Now we need to clean up something :

```

lrwxrwxrwx 1 root root 6 Dec 5 18:41 net.eth0 -> net.lo

lrwxrwxrwx 1 root root 6 Jan 8 01:57 net.eth1 -> net.lo 

```

So run this plz:

```

# cd /etc/init.d

# rm net.eth0

# rm net.eth1

# ln -s net.lo net.eth0

# ln -s net.lo net.wlan0

```

After that, can you post this 

```

# cd /etc/init.d/ && ls -la

# cat /etc/conf.d/net

# equery list wpa

```

----------

## d2_racing

for the iwconfig command that is not found, run this plz :

```

# emerge -av  net-wireless/wireless-tool

```

After that, run this :

```

# ifconfig -a

# iwconfig

```

----------

## papapenguin

ok, so I saw the last post before the previous one, so I did things a bit out of order...

after running this:

 *Quote:*   

> # cd /etc/init.d 
> 
> # rm net.eth0 
> 
> # rm net.eth1 
> ...

 

I got this:

 *Quote:*   

> papapenguin init.d # cd /etc/init.d/ && ls -la
> 
> total 308                                     
> 
> drwxr-xr-x  2 root root  4096 Jan  9 08:03 .  
> ...

 

then I emerged wireless-tools and ran this:

 *Quote:*   

> # ifconfig -a 
> 
> # iwconfig 

 

which got me this:

 *Quote:*   

> papapenguin ~ # ifconfig -a
> 
> eth0      Link encap:Ethernet  HWaddr 00:40:d0:4a:e5:34  
> 
>           inet addr:192.168.1.42  Bcast:255.255.255.255  Mask:255.255.255.0
> ...

 

looks pretty good so far...

 *Quote:*   

> papapenguin ~ # iwconfig
> 
> lo        no wireless extensions.
> 
> eth0      no wireless extensions.
> ...

 

then I rebooted and it works!  although on bootup it runs lo (bringing up eth0, and now wlan0) then dhcpcd, then runs lo again--and I get an error that says eth0 cannot start -- which is true because it has been started.

do I need dhcpcd in this case?

----------

## d2_racing

Ok, for that can you post this :

```

# rc-update show

# cat /etc/conf.d/net

# cat /etc/wpa_supplicant/wpa_supplicant.conf

```

----------

## papapenguin

 *Quote:*   

> papapenguin ~ # rc-update show                            
> 
>              bootmisc | boot                                          
> 
>                  fsck | boot
> ...

 

ok, for this one, I think I probably need to change the eth1 status or take it out completely...

 *Quote:*   

> papapenguin ~ # cat /etc/conf.d/net
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

I installed wireless-tools, and not wpa-supplicant...

 *Quote:*   

> papapenguin ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf
> 
> cat: /etc/wpa_supplicant/wpa_supplicant.conf: No such file or directory
> 
> papapenguin ~ #

 

----------

## d2_racing

In fact, your /etc/conf.d/net should be like this :

```

config_eth0="dhcp"

dhcpcd_eth0="-N"

dns_domain_lo="homenetwork"

```

Also, for your wireless card, you should install wpa_supplicant and with that, I can give you what you need :

```

# emerge -av wpa_supplicant

```

----------

## d2_racing

For a standard WPA2 encryption with the AES it's :

```

# cat /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_SSID"

   psk="your_passphrase"

   proto=WPA2

   key_mgmt=WPA-PSK

   pairwise=CCMP

   group=CCMP

   priority=5

} 

```

And for the file /etc/conf.d/net, you need to add this :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" ) 

```

----------

## d2_racing

And for a wep encryption, you will need this :

```

# cat /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_SSID"

        scan_ssid=1

        priority=5

        key_mgmt=NONE

        wep_key0=your_hexa_key_with_no_quote

        wep_tx_keyidx=0

} 

```

----------

## d2_racing

Finally, after editing your /etc/wpa_supplicant/wpa_supplicant.conf and /etc/conf.d/net, you need to run this :

Unplug your network cable from eth0, an run theses :

This create the symbolic link to net.wlan0

```

# cd /etc/init.d

# ln -s net.lo net.wlan0

```

```

# iwconfig

# ifconfig -a

# iwlist scan

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

# wpa_cli status

# iwconfig

# ifconfig -a

# ping -c 3 www.google.com

```

----------

## d2_racing

And one day, with that, you can manually start eth0 or wlan0 in no time :

```

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

Or 

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

```

----------

## d2_racing

I'm not an expert with the ath5k driver, but on the forum I see sometimes the device ath0 or wlan0.

I don't know how this works, but can you post this file just to be sure :

```

# cat /etc/udev/rules.d/70-persistent-net.rules

```

----------

## papapenguin

 *Quote:*   

> papapenguin ~ # cat /etc/udev/rules.d/70-persistent-net.rules
> 
> # This file was automatically generated by the /lib/udev/write_net_rules
> 
> # program, run by the persistent-net-generator.rules rules file.
> ...

 

----------

## d2_racing

Ok, your udev rule seems to be good, so can you test if you can connect to your AP ?

----------

## papapenguin

thanks d2_racing, I'm up and running with my wlan0 now!

I added the wpa and wep config's to conf.d/net but commented them out for now since my wireless in unencrypted.

Now I need to learn how to use the tools and choose the network I want

----------

## d2_racing

 *papapenguin wrote:*   

> thanks d2_racing, I'm up and running with my wlan0 now!
> 
> I added the wpa and wep config's to conf.d/net but commented them out for now since my wireless in unencrypted.
> 
> 

 

These settings go inside /etc/wpa_supplicant/wpa_supplicant.conf only  :Razz: 

Your /etc/conf.d/net should contain only this :

```

#WPA_SUPPLICANT

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dwext"

config_wlan0=( "dhcp" ) 

```

----------

## papapenguin

right, thanks d2_racing, I actually did that...

 *Quote:*   

> papapenguin ~ # cat /etc/wpa_supplicant/wpa_supplicant.conf
> 
> # This is a network block that connects to any unsecured access point.
> 
> # We give it a low priority so any defined blocks are preferred.
> ...

 

and

 *Quote:*   

> papapenguin ~ # cat /etc/conf.d/net
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

I haven't commented out the config_eth0 yet...

----------

