# Can't seem to get wlan0 working



## baskoffie (Nov 4, 2010)

Hi there,

I'm new here, but I've been using FreeBSD 7.3 for a while some time back. Now i I'd decided to try out FreeBSD 8.1, I'm a gaping newbie and can't seem to get my wireless network connection going. I've been at it for hours, read an inhuman amount of threads relating to any part of my problem, tried to consult the man pages and even reinstalled three times. After all of that, this is the current state I am in:

I'm using an Asus X72Sr notebook, my network adapter is Intel 3945ABG/4965AGN, my wireless network is WEP secured.

Sysinstall did not detect my wireless network adapter. It made no notice of it at all. I've checked several logs for this. When I installed 7.3, if i I remember correctly, It didn't detect it as well, but when I installed FreeBSD over FTP with wired internet it detected my wireless adapter after the install for some reason...

/etc/rc.conf:

```
moused_enable="YES"
hald_enable="YES"
dbus_enable="YES"
inetd_enable="YES"
wlans_wpi0="wlan0"
network_interfaces="wlan0"
ifconfig_wlan0="dhcp ssid Belkin54g"
webcamd_enable="YES"
# -- sysinstall generated deltas -- # Thu Nov  4 23:45:32 2010
ifconfig_msk0="DHCP"
hostname="laptop.espresso"
```

/boot/loader.conf:

```
if_wpi_load="YES"
wlan_wep_load="YES"
```

doing

```
laptop# ifconfig
```
shows:

```
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=c011a<TXCSUM,VLAN_MTU,VLAN_HWTAGGING,TSO4,VLAN_HWTSO,LINKSTATE>
	ether 00:22:15:4f:90:8b
	inet 192.168.2.7 netmask 0xffffff00 broadcast 192.168.2.255
	media: Ethernet autoselect (100baseTX <full-duplex>)
	status: active
wpi0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:1f:3c:8c:71:d8
	media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
	status: associated
fwe0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:1e:8c:70:a1:2d
	ch 1 dma -1
fwip0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
	lladdr 0.1e.8c.0.1.70.a1.2d.a.2.ff.fe.0.0.0.0
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=3<RXCSUM,TXCSUM>
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x5 
	inet6 ::1 prefixlen 128 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	ether 00:1f:3c:8c:71:d8
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid Belkin54g channel 12 (2467 MHz 11g)
	country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
	protmode CTS bintval 0
```

doing

```
#ifconfig wlan0 scan
```
Just hangs

doing

```
laptop# ifconfig wlan0 list scan
```
shows:

```
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
Belkin54g       00:17:3f:00:f4:72   11   54M  21:0    100 EP  
voortrekker...  00:23:54:9c:f3:f5   11   54M   8:0    100 EP   RSN WPA
degraaf43       00:14:5c:83:17:ce    6   54M   6:0    100 EPS  WPA ATH
ThomsonA79B50   00:18:f6:ef:86:5f   11   54M   4:0    100 EP   WME
SpeedTouch8...  00:18:f6:64:42:94    1   54M   4:0    100 EP   RSN WPA WME
```

I'm glad that at least I can find some wireless networks, but I really can't find a solution to connect to one..

I really don't know what the problem is.. and I hope I'm not posting something stupid, but is there anybody who could give me any insight into this? Help would be greatly appreciated.

Regards,
Bas


----------



## wblock@ (Nov 4, 2010)

For WPA (which you really should use, and with AES, not TKIP), run wpa_supplicant(8).  In fact, you can run it even for open networks, provided you set that in /etc/wpa_supplicant.conf.  For a typical WPA network, all you need is SSID and a PSK:

```
network={
        ssid="myssid"
        psk="myultrasecretpsk"
}
```

Can't recall what is set for open networks.  key_mgmt=NONE, at least.


----------



## baskoffie (Nov 4, 2010)

Ok thanks for your answer, I've switched my network security to WPA/AES and modified /etc/rc.conf to this:

```
hostname="laptop.espresso"
moused_enable="YES"
hald_enable="YES"
dbus_enable="YES"
inetd_enable="YES"
wlans_wpi="wlan0"
ifconfig_wlan0="WPA DHCP"
webcamd_enable="YES"
```

/etc/wpa_supplicant.conf:

```
network={
  ssid="Belkin54g"
  psk="mypskkey"
  }
```

I rebooted, and near the end the boot hangs and tells me:

```
wpi_newstate: SCAN -> AUTH flags 0x0
config chan 11 flags 8005 cck f ofdm 15
wpi_newstate: AUTH -> ASSOC flags 0x0
wpi_newstate: ASSOC -> RUN flags 0x0
config chan 11 flags 8015
wpi0: need multicast update callback
wpi0: need multicast update callback
wpi0: need multicast update callback
```

Hangs for about 30 seconds and repeats the above messages.

ifconfig gives me a changed spec for wlan0:

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:1f:3c:8c:71:d8
inet 192.168.2.2 netmask 0xffffff00 broadcast 192.168.2.255
media: IEEE 802.11 Wireless Ethernet OFDM/46Mbps mode 11g
status: associated
ssid Belkin54g channel 11 (2462 Mhz 11g) bssid 00:17:3f:00:f4:72 
country US authmode WPA privacy ON deftxkey UNDEF AES-CCM 2:128-bit 
txpower 0 bsmiss 7 scanvalid 60 protmode CTS roaming MANUAL
```

Doing ping hangs.

Well, I'm definitely getting closer. But why this?


----------



## wblock@ (Nov 5, 2010)

Don't know that much about the Intel 3945; maybe a driver bug.  The driver has had some recent work, so upgrading to 8-STABLE may improve or fix it.


----------



## baskoffie (Nov 6, 2010)

Like I said, near the end of the boot the repeating message 
	
	



```
wpi0: need multicast update
```
 appears, but apparently if I wait a while and log in I am connected to my wireless network!

I'll mark this as solved, but actually I am still curious about how to solve my original problem which concerned WEP. I have bought a new wireless adapter for one of the computers in my network, but actually that is avoiding the problem and I can imagine that some people might not have that option if you consider them having no money or an embedded wireless adapter which does not support WPA2.

And some off-topic question: Why is this thread in Mobile computing? I'm fairly sure I'd posted it in Networking.


----------



## wblock@ (Nov 6, 2010)

baskoffie said:
			
		

> Like I said, near the end of the boot the repeating message wpi0: need multicast update appears, but apparently if i wait a while and log in I am connected to my wireless network!




```
ifconfig_wlan0="WPA SYNCDHCP"
```

SYNCDHCP forces the boot to wait until it gets a lease, the way it used to.  Some network cards, particularly wireless, take a while to connect and get a lease.



> I'll mark this as solved, but actually i am still curious about how to solve my original problem which concerned WEP. I have bought a new wireless adapter for one of the computers in my network, but actually that is avoiding the problem and I can imagine that some people might not have that option if you consider them having no money or an embedded wireless adapter which does not support WPA2.



I think wpa_supplicant.conf(5) will support WEP with the right configuration.


----------



## richardpl (Nov 6, 2010)

wblock said:
			
		

> I think wpa_supplicant.conf(5) will support WEP with the right configuration.



It really does support.


----------

