# Wpa_supplicant issues

## lucid insanity

I am currently unable to get my wireless to work.  I am trying to use wpa_supplicant to manage my connection.  My wireless adapter is a TP-LINK TL-WN722N. 

I have verified that my wireless adapter is recognized by running

```
ifconfig -a
```

 which (abridged) returns

```
wlan0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500

ether f4:ec:38:85:5a:6f txqueuelen 1000 (Ethernet)

RX packets 0 bytes 0 (0.0 B)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 0 bytes 0 (0.0 B)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

running 

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

 gives the following output

```
Bringing up interface wlan0

Starting wpa_supplicant on wlan0...

ioctl[SIOCSIWPMKSA]:Invalid argument

ioctl[SIOCSIWMODE]: Invalid argument

ioctl[SIOCGIWRANGE]:Invalid argument

ioctl[SIOCGIWMODE]:Invalid argument

ioctl[SIOCSIWAP]: Invalid argument

ioctl[IEEE80211_IOCTL_SETPARAM]:Invalid argument

ioctl[SIOCGIWMODE]:Invalid argument

ioctl[SIOCSIWAP]:Invalid argument

Failed to initialize driver interface

start-stop-daemon: failed to start '/usr/sbin/wpa_supplicant'

ERROR: net.wlan0 failed to start
```

 here is the contents of my /etc/conf.d/net file

```
config_wlan0="dhcp"

modules="wpa_supplicant"

wpa_supplicant_wlan0="Dmadwifi"
```

and here is the contents of the wpa_supplicant.conf file

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

ap_scan=1

network={

        key_mgmt=NONE

        priority=-999

}
```

Any suggestions?

----------

## DONAHUE

I would 

```
emerge linux-firmware
```

 I associate lots of siocs errors with missing firmware.

If that does no good:

edit /etc/conf.d/net

 *Quote:*   

> dns_servers="8.8.8.8 "
> 
> modules_wlan0="wpa_supplicant"
> 
> #wpa_supplicant_wlan0="-Dwext" ONE
> ...

  use your ip's if 

recent changes to openrc and udev and dhcp may cause mistimed service startups.

----------

## 666threesixes666

networkmanager with avahi dhcpcd resolvconf use flags & broadcom firmware cutter did me wonders....  for my atheros card it was as easy as networkmanager with the use flags....  wicd setup my wireless equally as well though it did have tendencies to break randomly on me where network manager stayed solid with the use flags....  i also use nm-applet to manage network manager  id only stay your course with setting up the back ends like that if your running a server (and at that point should be running wire anyways)

mkultra@mkultra ~/Downloads $ cat /etc/conf.d/net

#Generated by NetworkManager

bla bla bla bla bla bla bla auto done 4 me =)

----------

## wcg

 *Quote:*   

> 
> 
> wpa_supplicant_wlan0="Dmadwifi"
> 
> 

 

Should that be

```

wpa_supplicant_wlan0="-Dmadwifi"

```

(Do you need to supply the dash in front of the "-D[driver]"

option to wpa_supplicant?)

----------

## BillWho

lucid insanity,

My  /etc/conf.d/net file contains:

```
modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf"
```

----------

