I have configured network with Wifi to Eth brigde setup; I basically followed this guide.
In general this is working, however there’s an issue when AP goes down for +8hrs, means Wifi is disabled.
After AP is enabled again Raspi is not reconnecting to Wifi.
Searching for a solution in internet the most common solution is this:
- Install package ifplugd
- Copy file /etc/wpa_supplicant/ifupdown.sh to /etc/ifplugd/action.d/ifupdown
- Define ifplugd configuration in this file /etc/default/ifplugd with this content:
ARGS="-q -f -u0 -d10 -w -I"
- Reboot Raspi
I have created a symlink in /etc/ifplugd/action.d/ with this command:
ln -s /etc/wpa_supplicant/ifupdown.sh ifupdown
Unfortunately this solution is not working.
Do you have any idea how to fix it?
Did you actually install the ifplugd package? G_AGI ifplugd
You can also enable DietPi-WiFi-Monitor via dietpi-config which will check WiFi connection every 10 seconds and in case try to reconnect. But since you did some custom network setup, be careful before hitting any “Apply” within dietpi-config since it overwrites /etc/network/interfaces.
With yesterday released v6.23 we implemented to possibility to add custom drop-in configs via /etc/network/interfaces.d/. That might generally resolve issues with dietpi-config overwriting custom network settings.
I installed package ifplugd from stretch repo:
root@pc9-fhem:~# apt-cache policy ifplugd
Can you please share some details how dietpi-config which will check WiFi connection every 10 seconds?
Is this done with cron-job?
Where can I enable DietPi-WiFi-Monitor?
I didn’t find anything in dietpi-config.
Enabled service dietpi-wifi-monitor.
dietpi-config > Network Options: Adapters > WiFi > WiFi Monitor (or similar)
I have enabled dietpi-wifi-monitor.
This bash script is checking for a working connection to the router, and if this fails triggers
However this is not working with my Raspi.
There’s no general issue with Wifi connection of my Raspi using this device:
root@pc9-fhem:~# lsusb | grep WLAN
Bus 001 Device 006: ID 0bda:8172 Realtek Semiconductor Corp. RTL8191SU 802.11n WLAN Adapter
This means Raspi is booting w/o errors, and the Wifi connection is working w/o any issues.
root@pc9-fhem:~# dmesg | grep 8712
[ 12.307140] r8712u: module is from the staging directory, the quality is unknown, you have been warned.
[ 12.602489] r8712u: register rtl8712_netdev_ops to netdev_ops
[ 12.602532] usb 1-1.5: r8712u: USB_SPEED_HIGH with 4 endpoints
[ 12.630273] usb 1-1.5: r8712u: Boot from EFUSE: Autoload OK
[ 15.166884] usb 1-1.5: r8712u: CustomerID = 0x000a
[ 15.166914] usb 1-1.5: r8712u: MAC Address from efuse = 24:05:0f:9a:4b:55
[ 15.166928] usb 1-1.5: r8712u: Loading firmware from "rtlwifi/rtl8712u.bin"
[ 15.167958] usbcore: registered new interface driver r8712u
[ 28.113946] r8712u 1-1.5:1.0 wlan0: 1 RCR=0x153f00e
[ 28.114698] r8712u 1-1.5:1.0 wlan0: 2 RCR=0x553f00e
The required kernel module is loaded
root@pc9-fhem:~# lsmod | grep 8712
r8712u 182711 0
and iwconfig confirms a working connection
eth0 no wireless extensions.
wlan0 IEEE 802.11bgn ESSID:"wlanAP_nomap" Nickname:"rtl_wifi"
Mode:Managed Frequency:2.437 GHz Access Point: C8:0E:14:xx:xx:xx
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Encryption key:****-****-****-****-****-****-****-**** Security mode:open
Link Quality=98/100 Signal level=98/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.
The issue is reproducible by deactivating Wifi for +1hr; in my apartment Wifi is off every day from 0:00h to 7:00h.
There are 2 potential workarounds for this issue:
- Enable Wifi 24/7
- Setup a cronjob to reboot Raspi daily after 7:00h
But there must be a sustainable solution because Wifi connection is generally working after reboot.
Maybe I must trigger the steps that are executed during boot to startup network manually.
Got it, jep in this case WiFi monitor is no solution, leave it disabled or disabled it again if you tried so. I would just be an unnecessary overload.
I think the cron job is the best shot. Run it e.g. on 07:05 with:
Or is this what does not work, so currently a reboot is required to make it connect again?
In this case:
Are a start to debug.