# ifconfig will not create wlan0



## tl1000s77 (Apr 19, 2010)

I just installed FreeBSD 7.3 RELEASE and I'm trying to setup my wireless card.  It's an Intel 3945ABG wireless card so I'm using the wpi drivers.  

My boot loader configuration looks like this:

```
if_wpi_load="YES"
if_vlan_load="YES"
wlan_load="YES"
wlan_amrr_load="YES"
firmware_load="YES"
wpifw_load="YES"
legal.intel_wpi.license_ack=1
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```

My rc.conf looks like this:

```
wlans_wpi0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

I also have a wpa_supplicant.conf file with my network settings.  

I can scan my network using ifconfig wpi0 up scan, but I've had no luck connecting to it.

The problem I'm noticing is that when I reboot up the computer, it never creates the wlan0 device.  When I try to do it manually using this command: 

`ifconfig wlan0 create wlandev wpi0`

I get:


```
ifconfig: SIOCIFCREATE2: Invalid argument
```

I've searched google and the FreeBSD forums but I can't seem to find an answer.  Any help would be much appreciated.


----------



## Kiiski (Apr 19, 2010)

Hi

 Wireless is handled little bit differently under FreeBSD 7.X and 8.0 as stated in handbook chapter 31.3.3 (http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html)

Your /etc/rc.conf lines should be changed to suit 7.X as they seem to be for 8.0 now.

Hope this helps...


----------



## tl1000s77 (Apr 19, 2010)

Kiiski,

Thanks!  It was a misconfigured rc.conf file.  Here are the settings that got it working for me. 

My /etc/rc.conf:

```
hostname="netbsdlaptop"
linux_enable="YES"
moused_enable="YES"
nfs_client_enable="YES"
sshd_enable="YES"
gnome_enable="YES"
ifconfig_wpi0="DHCP"
```

My /boot/loader.conf:

```
autoboot_delay="2"
loader_logo="beastie"
snd_hda_load="YES"
wlan_scan_ap_load="YES"
wlan_scan_sta_load="YES"
if_wpi_load="YES"
if_vlan_load="YES"
wlan_load="YES"
wlan_amrr_load="YES"
firmware_load="YES"
wpifw_load="YES"
legal.intel_wpi.license_ack=1
wlan_xauth_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
```

And my /etc/wpa_supplicant.conf:

```
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel

network={
	ssid="Home"
	scan_ssid=1
	key_mgmt=WPA-PSK
	psk="SupaSecretPassword!"
}
```

The only thing that I noticed is that it doesn't start automatically when the laptop boots up.  Is there a way I can do that?  I have to type it in manually to get it to work.

[CMD="wpa_supplicant -i wpi0 -c /etc/wpa_supplicant.conf"][/CMD]

Thanks again!


----------



## richardpl (Apr 21, 2010)

```
ifconfig_wpi0="WPA DHCP "
```


----------

