WiFi issues

Hi,

I am running a DietPi machine that is connected to my local network via wifi.
Unfortunately the wifi connection seems to get lost after a couple of hours. Turning the raspi off an on will properly reconnct my raspi to the network.
What is the best way to troubleshoot such kind of issues? How can I configure logging to get more details and how can I keep the logs persistent?

Best regards,
Olaf

Hi,

Please see following link for script to reconnect WiFi:
https://community.roonlabs.com/t/wifi-disappears-after-a-day/25850/20?u=dan_knight

Thanks for your support. I’ve applied that script to my RPi.
I will keep you posted about the results.

It seems to work perfectly with that script, now.
No wifi connection loss the last day. Before I applied the script the wifi connection got lost after approx. an hour…

Thanks a lot!

I am from time to time still experiencing issues with my wifi adapter. I switched to full logging and found that:

Jun 24 22:00:33 schuppi kernel: [ 1988.428866] ------------[ cut here ]------------
Jun 24 22:00:33 schuppi kernel: [ 1988.429334] WARNING: CPU: 0 PID: 129 at net/wireless/sme.c:948 __cfg80211_disconnected+0x4a4/0x4fc [cfg80211]
Jun 24 22:00:33 schuppi kernel: [ 1988.429342] Modules linked in: lirc_dev rc_core nfsd rpcsec_gss_krb5 8192cu cfg80211 rfkill bcm2835_gpiomem i2c_bcm2835 uio_pdrv_genirq fixed uio i2c_dev i2c_bcm2708 fuse ipv6
Jun 24 22:00:33 schuppi kernel: [ 1988.429407] CPU: 0 PID: 129 Comm: kworker/u8:2 Tainted: G WC 4.9.30-v7+ #2
Jun 24 22:00:33 schuppi kernel: [ 1988.429411] Hardware name: BCM2835
Jun 24 22:00:33 schuppi kernel: [ 1988.429610] Workqueue: cfg80211 cfg80211_event_work [cfg80211]
Jun 24 22:00:33 schuppi kernel: [ 1988.429643] [<8010fb4c>] (unwind_backtrace) from [<8010c058>] (show_stack+0x20/0x24)
Jun 24 22:00:33 schuppi kernel: [ 1988.429658] [<8010c058>] (show_stack) from [<804554a0>] (dump_stack+0xd4/0x118)
Jun 24 22:00:33 schuppi kernel: [ 1988.429673] [<804554a0>] (dump_stack) from [<8011d318>] (__warn+0xf8/0x110)
Jun 24 22:00:33 schuppi kernel: [ 1988.429684] [<8011d318>] (__warn) from [<8011d400>] (warn_slowpath_null+0x30/0x38)
Jun 24 22:00:33 schuppi kernel: [ 1988.429873] [<8011d400>] (warn_slowpath_null) from [<7f124f00>] (__cfg80211_disconnected+0x4a4/0x4fc [cfg80211])
Jun 24 22:00:33 schuppi kernel: [ 1988.430192] [<7f124f00>] (__cfg80211_disconnected [cfg80211]) from [<7f0fabc4>] (cfg80211_process_wdev_events+0x1a0/0x1a8 [cfg80211])
Jun 24 22:00:33 schuppi kernel: [ 1988.430486] [<7f0fabc4>] (cfg80211_process_wdev_events [cfg80211]) from [<7f0fac08>] (cfg80211_process_rdev_events+0x3c/0x70 [cfg80211])
Jun 24 22:00:33 schuppi kernel: [ 1988.430776] [<7f0fac08>] (cfg80211_process_rdev_events [cfg80211]) from [<7f0f5284>] (cfg80211_event_work+0x24/0x2c [cfg80211])
Jun 24 22:00:33 schuppi kernel: [ 1988.430932] [<7f0f5284>] (cfg80211_event_work [cfg80211]) from [<801365e8>] (process_one_work+0x158/0x454)
Jun 24 22:00:33 schuppi kernel: [ 1988.430947] [<801365e8>] (process_one_work) from [<80136948>] (worker_thread+0x64/0x568)
Jun 24 22:00:33 schuppi kernel: [ 1988.430960] [<80136948>] (worker_thread) from [<8013c864>] (kthread+0x10c/0x124)
Jun 24 22:00:33 schuppi kernel: [ 1988.430974] [<8013c864>] (kthread) from [<80108148>] (ret_from_fork+0x14/0x2c)
Jun 24 22:00:33 schuppi kernel: [ 1988.430981] —[ end trace c84370bcc0587d6c ]—


Can anyone explain to me what might be the root for wireless connection losses?

Sometimes loud Bluetooth devices in the vicinity can mess up wifi. Do these disconnects correspond with receiving a phone call, or speaking through a Bluetooth headset nearby?