# Frequent wifi disconnects on Intel 2200BG



## topcat (Sep 14, 2014)

Hi, I'm running FreeBSD 10 on an old Del Inspiron 9300. Performance is very snappy, which is amazing considering the age of the hardware. Ubuntu used to struggle on this machine!

However, I'm having an issue with the wireless connection. I have the following card, as shown by`pciconv -lv`

```
iwi0@pci0:3:3:0:        class=0x028000 card=0x27228086 chip=0x42208086 rev=0x05 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'PRO/Wireless 2200BG [Calexico2] Network Connection'
    class      = network
```
I'm using the iwi0 driver for this, configured as follows:
/boot/loader.conf

```
# For wireless
legal.intel_iwi.license_ack=1
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"

# Devil worship in loader logo
loader_logo="beastie"

# Boot-time kernel tuning
kern.ipc.shmseg=1024
kern.ipc.shmmni=1024
kern.maxproc=10000

# Load MMC/SD card-reader support
# mmc_load="YES"
# mmcsd_load="YES"
# sdhci_load="YES"

# Access ATAPI devices through the CAM subsystem
atapicam_load="YES"

# Filesystems in Userspace
fuse_load="YES"

# Intel Core thermal sensors
coretemp_load="YES"

# AMD K8, K10, K11 thermal sensors
#amdtemp_load="YES"

# In-memory filesystems
tmpfs_load="YES"

# Asynchronous I/O
aio_load="YES"

# Handle Unicode on removable media
libiconv_load="YES"
libmchain_load="YES"
cd9660_iconv_load="YES"
msdosfs_iconv_load="YES" 

# Load nvidia kernel module
nvidia_load="YES"
```

/etc/rc.conf

```
hostname="turing"
wlans_iwi0="wlan0"
ifconfig_wlan0="WPA DHCP"
defaultrouter=""
sshd_enable="YES"
moused_enable="NO"
pf_enable="YES"
#pflog_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
ntpd_enable="YES"
# Let ntpd make time jumps larger than 1000sec
ntpd_flags="-g" 
devfs_system_ruleset="devfsrules_common"
hald_enable="YES"
dbus_enable="YES"
linux_enable="YES"
# Console settings
allscreens_flags="MODE_280"
blanktime="300"
saver="logo"
# Disable line printer daemon since we have CUPS
lpd_enable="NO"
# Enable CUPS
cupsd_enable="YES" 
smartd_enable="YES"
```

/etc/wpa_supplicant.conf

```
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
          ssid="skynet"
          psk="wpa_password"
        }
```

Wifi connects immediately and speeds are good. However, frequently the connection will go down and immediately recover, leading to a brief loss of connectivity. Here are the relevant log messages from /var/log/messages:

```
Sep 14 12:16:18 turing wpa_supplicant[604]: wlan0: CTRL-EVENT-DISCONNECTED bssid=48:f8:b3:61:00:e6 reason=0
Sep 14 12:16:18 turing kernel: wlan0: link state changed to DOWN
Sep 14 12:16:21 turing wpa_supplicant[604]: wlan0: Trying to associate with 48:f8:b3:61:00:e6 (SSID='skynet' freq=2462 MHz)
Sep 14 12:16:21 turing wpa_supplicant[604]: wlan0: Associated with 48:f8:b3:61:00:e6
Sep 14 12:16:21 turing kernel: wlan0: link state changed to UP
Sep 14 12:16:21 turing devd: Executing '/etc/rc.d/dhclient quietstart wlan0'
Sep 14 12:16:21 turing dhclient[636]: send_packet: No buffer space available
Sep 14 12:16:21 turing wpa_supplicant[604]: wlan0: WPA: Key negotiation completed with 48:f8:b3:61:00:e6 [PTK=CCMP GTK=CCMP]
Sep 14 12:16:21 turing wpa_supplicant[604]: wlan0: CTRL-EVENT-CONNECTED - Connection to 48:f8:b3:61:00:e6 completed [id=0 id_str=]
Sep 14 12:16:47 turing dhclient: New IP Address (wlan0): 192.168.1.114
Sep 14 12:16:47 turing kernel: iwi0: need multicast update callback
Sep 14 12:16:47 turing kernel: iwi0: need multicast update callback
Sep 14 12:16:47 turing dhclient: New Subnet Mask (wlan0): 255.255.255.0
Sep 14 12:16:47 turing dhclient: New Broadcast Address (wlan0): 192.168.1.255
Sep 14 12:16:47 turing dhclient: New Routers (wlan0): 192.168.1.1
```
It does this every few minutes, sometimes more frequently. Occasionally the connection would stay up for a couple of hours before this happens. I also have a MacBook Pro running Snow Leopard which does not have this issue. My router is a Linksys EA3500. The signal is strong as shown by `ifconfig wlan0 scan`

```
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
skynet          48:f8:b3:61:00:e6   11   54M -54:-95  100 EPS  RSN HTCAP WME WPS
```

Any pointers? This and suspend/resume not working are my only issues. Love the system otherwise


----------



## pk0 (Apr 7, 2016)

Hi topcat,

did you find any solution to the problem? I would be very interested in it, because its the same with my system (9.3 and 10.1).

Thanks


----------

