Page 1 of 1

Reconnect WLAN

Posted: Sun Feb 17, 2019 7:32 am
by BjoernS
Hi,
I have a problem reconnecting the WLAN.

Code: Select all

ifconfig wlan0 down
brings down the interface, but neither

Code: Select all

ifconfig wlan0 up

Code: Select all

ifup wlan0

Code: Select all

wpa_cli -i wlan0 reconfigure
brings it up again.

Code: Select all

ip a
shows:

Code: Select all

2: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN gr default qlen 1000
    link/ether 74:da:38:65:3d:27 brd ff:ff:ff:ff:ff:ff
lsusb:

Code: Select all

Bus 001 Device 003: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

Re: Reconnect WLAN

Posted: Sun Feb 17, 2019 9:15 am
by epoch1970
The old ifconfig has been obsoleted by “ip” commands.
“ip link set dev <dev> down” is the replacement for “ifconfig <dev> down”
https://baturin.org/docs/iproute2/

ifupdown is even more obsolete, do not use “ifup” or “ifdown” unless you know why.

Try “ip link <dev> up” and then see if the interface reacquires carrier through wpa_supplicant.

Re: Reconnect WLAN

Posted: Sun Feb 17, 2019 6:44 pm
by BjoernS
Thank you, but that also doesn´t work.
But I see some error trace in ther kernel log:
[ 120.103235] ------------[ cut here ]------------
[ 120.104048] WARNING: CPU: 0 PID: 20 at net/wireless/sme.c:981 __cfg80211_disconnected+0x334/0x374 [cfg80211]
[ 120.104059] Modules linked in: 8192cu cfg80211 rfkill snd_bcm2835(C) snd_pcm snd_timer snd uio_pdrv_genirq fixed uio ip_tables x_tables ipv6
[ 120.104115] CPU: 0 PID: 20 Comm: kworker/u2:1 Tainted: G C 4.14.79+ #1159
[ 120.104119] Hardware name: BCM2835
[ 120.104816] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
[ 120.104876] [<c0016420>] (unwind_backtrace) from [<c0013d40>] (show_stack+0x20/0x24)
[ 120.104902] [<c0013d40>] (show_stack) from [<c0634c44>] (dump_stack+0x20/0x28)
[ 120.104925] [<c0634c44>] (dump_stack) from [<c0021ecc>] (__warn+0xe4/0x10c)
[ 120.104940] [<c0021ecc>] (__warn) from [<c0021fc0>] (warn_slowpath_null+0x30/0x38)
[ 120.105634] [<c0021fc0>] (warn_slowpath_null) from [<bf13d458>] (__cfg80211_disconnected+0x334/0x374 [cfg80211])
[ 120.106930] [<bf13d458>] (__cfg80211_disconnected [cfg80211]) from [<bf114b0c>] (cfg80211_process_wdev_events+0x160/0x1b4 [cfg80211])
[ 120.108355] [<bf114b0c>] (cfg80211_process_wdev_events [cfg80211]) from [<bf114b9c>] (cfg80211_process_rdev_events+0x3c/0x74 [cfg80211])
[ 120.109658] [<bf114b9c>] (cfg80211_process_rdev_events [cfg80211]) from [<bf10f218>] (cfg80211_event_work+0x24/0x2c [cfg80211])
[ 120.110298] [<bf10f218>] (cfg80211_event_work [cfg80211]) from [<c0039364>] (process_one_work+0x11c/0x398)
[ 120.110321] [<c0039364>] (process_one_work) from [<c003961c>] (worker_thread+0x3c/0x544)
[ 120.110346] [<c003961c>] (worker_thread) from [<c003f518>] (kthread+0x120/0x15c)
[ 120.110371] [<c003f518>] (kthread) from [<c000fe2c>] (ret_from_fork+0x14/0x28)
[ 120.110379] ---[ end trace e2dd472f47e28fa3 ]---
---
So I tried reloading the kernel module, this is at the moment the only way that works.

Re: Reconnect WLAN

Posted: Mon Feb 18, 2019 4:10 pm
by epoch1970
Ouch, that's a crash, not good at all.
If you suddenly remove the USB adapter you'd get this kind of crash, same if the adapter doesn't get enough power from the PSU.
If this happens during normal operation, perhaps the cause is in the adapter driver?

Reloading the module might be a workaround, but I wouldn't rely too much on that.