openwrt / openwrt/packages

wifischedule: bug in disabling wifi with station associated

Open
#20,292 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
4.6k
Forks
4k
Avg merge
3d 12h
Merged PRs (30d)
134

Description

Maintainer: @\newkit
Environment: MediaTek MT7628AN ver:1 eco:2, Wavlink WL-WN578A2, OpenWrt 22.03.3 r20028-43d71ad93e

Description:
There is a problem using OpenWrt and the wifi scheduler, that comes into focus when using the scheduler without "Force disabling wifi even if stations associated". What could happen is the following:
The scheduler is set to switch off over night. A station is associated all the time until the next morning. The scheduler should start the wifi again, but it does not matter, since there is still a station active. Then the station goes offline and the recheck from last night realizes that there are no stations and switches off the wifi. Maybe there should be an additional check, if it's an active wifi period of day or something similar.

Example log (wifi off period from 23:59 until 07:00) :
Fri Jan 13 06:50:00 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 07:00:00 CET 2023 /usr/bin/wifi_schedule.sh start
Fri Jan 13 07:00:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 07:00:02 CET 2023 Station(s) F6:43:E6:25:41:4D 4A:3F:FB:7F:2E:3C associated on wlan0
Fri Jan 13 07:00:02 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 07:10:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 07:10:00 CET 2023 Station(s) 4A:3F:FB:7F:2E:3C F6:43:E6:25:41:4D associated on wlan0
Fri Jan 13 07:10:00 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 07:20:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 07:20:01 CET 2023 Station(s) 4A:3F:FB:7F:2E:3C F6:43:E6:25:41:4D associated on wlan0
Fri Jan 13 07:20:01 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 07:30:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 07:30:00 CET 2023 Station(s) 4A:3F:FB:7F:2E:3C F6:43:E6:25:41:4D associated on wlan0
Fri Jan 13 07:30:00 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 07:40:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 07:40:00 CET 2023 Station(s) 4A:3F:FB:7F:2E:3C F6:43:E6:25:41:4D associated on wlan0
Fri Jan 13 07:40:00 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 07:50:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 07:50:00 CET 2023 Station(s) F6:43:E6:25:41:4D associated on wlan0
Fri Jan 13 07:50:00 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 08:00:00 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 08:00:00 CET 2023 Station(s) F6:43:E6:25:41:4D associated on wlan0
Fri Jan 13 08:00:00 CET 2023 Could not disable wifi due to associated stations, retrying...
Fri Jan 13 08:10:01 CET 2023 /usr/bin/wifi_schedule.sh recheck
Fri Jan 13 08:10:01 CET 2023 No stations associated, disable wifi.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with /usr/bin/wifi_schedule.sh and trace the start and recheck paths shown in the log. Reproduce the overnight schedule with an associated station, then verify that a later station disconnect does not disable Wi-Fi during the active period; the expected behavior is that rechecks respect the current schedule window.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
networking, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.