# WLAN hostapd: Client disconnects



## fthoma (Mar 27, 2010)

Hello,

I want to use my FreeBSD box as an WLAN access point. I bought a D-Link DWL-G122 (if_rum.ko) and configured hostapd.
When i connect with wpa_supplicant it disconnects immediately after the connection is idle for about 1 second. It re-connects again if i do a ping request but it takes like forever. 
When i permanently send ping requests to the FreeBSD box (or another server) the connection is hold.
Any ideas how i can prevent wpa_supplicant from disconnecting?

wpa_supplicant log

```
fry ~# wpa_supplicant -i wlan0 -c /root/etc/netcfg/leela.conf
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:26:5a:7e:ed:89 (SSID='leela' freq=2412 MHz)
Associated with 00:26:5a:7e:ed:89
WPA: Key negotiation completed with 00:26:5a:7e:ed:89 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:26:5a:7e:ed:89 completed (auth) [id=0 id_str=]
CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
CTRL-EVENT-SCAN-RESULTS
Trying to associate with 00:26:5a:7e:ed:89 (SSID='leela' freq=2412 MHz)
Associated with 00:26:5a:7e:ed:89
WPA: Key negotiation completed with 00:26:5a:7e:ed:89 [PTK=CCMP GTK=TKIP]
CTRL-EVENT-CONNECTED - Connection to 00:26:5a:7e:ed:89 completed (reauth) [id=0 id_str=]
```
/etc/hostapd.conf

```
interface=wlan0
debug=1
ctrl_interface=/var/run/hostapd
ctrl_interface_group=wheel
ssid=leela
wpa=2
wpa_passphrase=somepw
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
```
and /etc/rc.conf

```
wlans_rum0="wlan0"
create_args_wlan0="wlanmode hostap"
ifconfig_wlan0="inet 192.168.0.1 netmask 255.255.255.0"
hostapd_enable="YES"
```


----------



## frankpeng (Aug 7, 2010)

Have you fixed the problem?
I have the same problem. I used ath with  no problem. I keep every thing the same, just replace ath0 with rum0. The client can connect the ap, but very soon, the ap crashed. 
	
	



```
Entropy harvesting: interrupts ethernet point_to_point kickstart
```

This may be another problem because I screwed up with mergemaster when I make installworld.
I copied /etc from another computer which is i386. This one is amd64.


----------



## frankpeng (Aug 8, 2010)

I read on the internet says rum and 2cpu FreeBSD crashes. I give up rum and tried malo. But malo works only as a client no access point.


----------



## frankpeng (May 2, 2011)

I was running FreeBSD access point for a couple of months. I am using TP-LINK TL-WN321G USB stick as the AP. The connection drops off every 5 to 10 minutes. I have to repair in Windows to fix it. Now I am recompiling the kernel to see if it is fixed or not.


----------



## fthoma (May 9, 2011)

I switched to an Atheros based Mini PCI Card. That solved my problem.


----------

