# Sudden unclear behavior of USB Edimax WLAN Adapter



## juedan (Mar 13, 2019)

Hello forum,

Yesterday my small web server made some troubles which were for me absolutely unclear.
Here a an abstract from /var/log/messages:

```
Mar 12 23:26:41 futro-s900 kernel: wlan0: link state changed to DOWN
Mar 12 23:26:41 futro-s900 kernel: lagg0: link state changed to DOWN
Mar 12 23:26:41 futro-s900 wpa_supplicant[28239]: wlan0: CTRL-EVENT-DISCONNECTED bssid=<Fritzbox> reason=0
Mar 12 23:26:41 futro-s900 wpa_supplicant[28239]: wlan0: Trying to associate with <Fritzbox> (SSID='<FritzboxSSID>' freq=2462 MHz)
Mar 12 23:26:42 futro-s900 kernel: urtwn0: ieee80211_crypto_encap returns NULL.
Mar 12 23:26:47 futro-s900 last message repeated 3 times
Mar 12 23:26:51 futro-s900 wpa_supplicant[28239]: wlan0: Authentication with <Fritzbox> timed out.
Mar 12 23:26:51 futro-s900 wpa_supplicant[28239]: wlan0: CTRL-EVENT-DISCONNECTED bssid=<Fritzbox> reason=3 locally_generated=1
Mar 12 23:26:51 futro-s900 kernel: urtwn0: ieee80211_crypto_encap returns NULL.
Mar 12 23:26:52 futro-s900 last message repeated 3 times
```

# dmesg

```
urtwn0: ieee80211_crypto_encap returns NULL.
urtwn0: device timeout
urtwn0: device timeout
in6_purgeaddr: err=65, destination address delete failed
```

Before this there were no messages or other hints and while this messages were written to syslog the other WLAN clients had no problems.
After restarting the network interfaces (service netif restart) everthing is running without problems.

Network hardware: EDimax EW-7811Un:

```
urtwn0 on uhub4
urtwn0: <vendor 0x7392 product 0x7811, class 0/0, rev 2.00/2.00, addr 2> on usbus1
urtwn0: MAC/BB RTL8188CUS, RF 6052 1T1R
urtwn0: enabling 11n
```

Operating system:

```
FreeBSD futro-s900 11.2-RELEASE-p9 FreeBSD 11.2-RELEASE-p9 #0: Tue Feb  5 15:30:36 UTC 2019     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
```

Network configuration:

```
# ifconfig
re0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=80088<VLAN_MTU,VLAN_HWCSUM,LINKSTATE>
    ether 90:1b:0e:26:38:7a
    hwaddr 90:1b:0e:26:38:7a
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (none)
    status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
    options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
    inet6 ::1 prefixlen 128 
    inet6 fe80::1%lo0 prefixlen 64 scopeid 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
    groups: lo 
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 90:1b:0e:26:38:7a
    hwaddr 90:1b:0e:26:38:7a
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet MCS mode 11ng
    status: associated
    ssid Erdbeere channel 11 (2462 MHz 11g ht/20) bssid 38:10:d5:72:4a:ea
    regdomain ETSI country DE authmode WPA2/802.11i privacy ON
    deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 30 bmiss 7
    scanvalid 60 protmode CTS ht20 -ampdutx ampdurx ampdulimit 64k
    ampdudensity 8 -stbc wme roaming MANUAL
    groups: wlan 
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 90:1b:0e:26:38:7a
    inet 192.168.1.202 netmask 0xffffff00 broadcast 192.168.1.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect
    status: active
    groups: lagg 
    laggproto failover lagghash l2,l3,l4
    laggport: re0 flags=1<MASTER>
    laggport: wlan0 flags=4<ACTIVE>
```

Hardware: Fujitsu S900, AMD G-T40N Processor (997.90-MHz K8-class CPU), 2GiB RAM, 160GB HDD Seagate Barracuda

Now I'm trying to understand this behavior. I hope someone can explain it to me.

Thanking you in advance

JueDan

PS: the WLAN connection is a temporary solution and it will be replaced by LAN cable when the small webserver has its final location


----------

