How to automatically disconnect client when RSSI is low

Then it is really strange.

I am sure the config parameters are in /etc/config/wireless, because in CLI, cat /etc/config/wireless, I can see them. And the format are correct.

图片

If I changed the SSID, it will take effect. Don't know why the drop config parameters do not work.

You used Luci or you manually edited config?

I made all the wireless config through luci, then I scpt the file to my computer, use notepad to add the drop signal paramters. And replace the one in the router. Then reboot.

Well,then it should it applied.
But ubus tells us it is not.

Maybe @mk24 who is author of modded hostapd can help us?

Check the /var/run/hostapd-phyX.conf files did the signal parameters get parsed into there?
should be lines like

signal_connect=-50

If not, that means that the modified /lib/netifd/hostapd.sh script which builds hostapd.conf from /etc/config/wireless was not installed. That script is the only file in the hostapd-common package.

Set log_level 0 in the device block of /etc/config/wireless and watch the log (logread -f) with a client connected and you can see the dBm levels reported from the driver. They may not be actual dBm with some drivers. Ath9k is well-behaved but I have not tested with others.

Every signal poll for each STA should log a line like this:
Sun Sep 10 16:23:46 2017 daemon.debug hostapd: wlan0-1: STA [MAC redacted] IAPP: -40 -47 (0)
The three numbers are driver's average signal, present signal, and number of strikes.

Ubus does not report the setting levels. If you see the call in ubus list, this means that you are running the modified hostapd. Ubus can be used to adjust the settings during runtime without dropping all the clients. (If you change and reload hostapd.conf, all the clients will be dropped)

Hi,

I checked, the /var/run/ folder only have two file (wlan0 and wlan1), there is no hostapd-phyX.conf. Although ubus -v list | grep set_required_signal does work.

Please first let me know if the steps below are correct, I want to make sure I am doing things in the correct way

git clone LEDE source,

cd to the folder,

./scripts/feeds update -a

./scripts/feeds install -a

make defconfig
make menuconfig

select the taget platform, keep any other thing unchanged (meaning that, only hostapd-common, and wappad-mini is selected)

  1. Delete the /LEDE souce/package/network/service/hostapd folder

3, Download https://github.com/mk248/lede-modhostapd/archive/master.zip, unzip and rename the folder to hostapd, then upload it to /LEDE souce/package/network/service/

  1. Build the firmware.

It would be better if you deleted hostapd and copied modified before ./scripts/feeds update -a and other steps

There must always be a hostapd-phy0.conf (and additional ones if more than one radio) in /var/run. wpad (running as hostapd) reads these files to get its settings. Each radio that has an AP requires a separate instance of hostapd, however any multiple APs that may exist on the same radio are configured by the same file and hostapd process.

In summary, wpad/hostapd does not read /etc/config/wireless directly. The question is whether or not the hostapd.conf that is created in RAM when uci starts up the wireless contains the signal control settings.

@Fergus

Since you are getting these, it means that the signal check has been configured above the default setting of -128 dBm. This is good.

Setting the log_level to 0 will additionally produce a signal report for each connected STA each poll time. See if these appear and if the signal levels make sense.

Also when a station attempts to connect, the reception of its Auth Request and Assoc Request packet will be logged with a signal level and whether the request was accepted (because signal >= signal_connect) or declined (ignored). You can force a reconnect by switching the client device's wifi off and back on.

All received Probe Requests are also qualified against signal_connect, and ignored if too low. This activity is not logged.

Hi,

Thank you for the tips. Today I tested using a new firmware built following the steps suggested by robimarko.

I checked again and found:

hostapd-phy0.conf and hostapd-phy1.conf are existed in /var/run/, previously, I look up them in /var/run/hostapd, my mistake.

Open and found the config contents are parsed by the system:

interface=wlan0
ctrl_interface=/var/run/hostapd
ap_isolate=1
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
signal_connect=-50
signal_stay=-60
signal_poll_time=5
signal_strikes=3
signal_drop_reason=3

However, if I run ubus -v list, it still shows Integer

root@LEDE:~# ubus -v list
'dhcp' @7dcd82e7
        "ipv4leases":{}
        "ipv6leases":{}
'dnsmasq' @789e8945
'hostapd.wlan0' @74654362
        "get_clients":{}
        "del_client":{"addr":"String","reason":"Integer","deauth":"Boolean","ban_time":"Integer"}
        "list_bans":{}
        "wps_start":{}
        "wps_cancel":{}
        "update_beacon":{}
        "switch_chan":{"freq":"Integer","bcn_count":"Integer"}
        "set_vendor_elements":{"vendor_elements":"String"}
        "set_required_signal":{"connect":"Integer","stay":"Integer","strikes":"Integer","poll_time":"Integer","reason":"Integer"}
'hostapd.wlan1' @945d167c
        "get_clients":{}
        "del_client":{"addr":"String","reason":"Integer","deauth":"Boolean","ban_time":"Integer"}
        "list_bans":{}
        "wps_start":{}
        "wps_cancel":{}
        "update_beacon":{}
        "switch_chan":{"freq":"Integer","bcn_count":"Integer"}
        "set_vendor_elements":{"vendor_elements":"String"}
        "set_required_signal":{"connect":"Integer","stay":"Integer","strikes":"Integer","poll_time":"Integer","reason":"Integer"}

Also tried to set the loglevel to 0, here is the result:

Mon Sep 11 18:33:20 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:21 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:25 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:26 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:30 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:31 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:34 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: auth request, signal 0 (Accepted)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: authentication OK (open system)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-AUTHENTICATE.indication(a6:23:d1:76:ad:33, OPEN_SYSTEM)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DELETEKEYS.request(a6:23:d1:76:ad:33)
Mon Sep 11 18:33:34 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: assoc request, signal 0 (Accepted)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: association OK (aid 1)
Mon Sep 11 18:33:34 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: associated (aid 1)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-ASSOCIATE.indication(a6:23:d1:76:ad:33)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DELETEKEYS.request(a6:23:d1:76:ad:33)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: binding station to interface 'wlan0'
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: event 1 notification
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: start authentication
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.1X: unauthorizing port
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: sending 1/4 msg of 4-Way Handshake
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: received EAPOL-Key frame (2/4 Pairwise)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: sending 3/4 msg of 4-Way Handshake
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: received EAPOL-Key frame (4/4 Pairwise)
Mon Sep 11 18:33:34 2017 daemon.notice hostapd: wlan0: AP-STA-CONNECTED a6:23:d1:76:ad:33
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.1X: authorizing port
Mon Sep 11 18:33:34 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: pairwise key handshake completed (WPA)
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: sending 1/2 msg of Group Key Handshake
Mon Sep 11 18:33:34 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: received EAPOL-Key frame (2/2 Group)
Mon Sep 11 18:33:34 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: group key handshake completed (WPA)
Mon Sep 11 18:33:35 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:36 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -45 -42 (0)
Mon Sep 11 18:33:36 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPDISCOVER(br-lan) a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPOFFER(br-lan) 192.168.1.239 a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPDISCOVER(br-lan) a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPOFFER(br-lan) 192.168.1.239 a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPDISCOVER(br-lan) a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPOFFER(br-lan) 192.168.1.239 a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPREQUEST(br-lan) 192.168.1.239 a6:23:d1:76:ad:33
Mon Sep 11 18:33:37 2017 daemon.info dnsmasq-dhcp[1737]: DHCPACK(br-lan) 192.168.1.239 a6:23:d1:76:ad:33 Linksys-24G
Mon Sep 11 18:33:39 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: authenticated
Mon Sep 11 18:33:40 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:41 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -44 -44 (0)
Mon Sep 11 18:33:41 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:33:45 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:46 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -43 -42 (0)
Mon Sep 11 18:33:46 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:33:50 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:51 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -44 -41 (0)
Mon Sep 11 18:33:51 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:33:55 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:33:56 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -42 -42 (0)
Mon Sep 11 18:33:56 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:00 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:01 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -47 -46 (0)
Mon Sep 11 18:34:01 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:05 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -53 -48 (0)
Mon Sep 11 18:34:06 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:10 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:11 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -56 -43 (0)
Mon Sep 11 18:34:11 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:15 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:16 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -60 -47 (0)
Mon Sep 11 18:34:16 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:20 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:21 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -65 -47 (0)
Mon Sep 11 18:34:21 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:25 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:26 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -61 -54 (0)
Mon Sep 11 18:34:26 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:30 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:31 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -61 -43 (0)
Mon Sep 11 18:34:31 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:35 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:36 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -78 -69 (0)
Mon Sep 11 18:34:36 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:40 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:41 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -76 -59 (0)
Mon Sep 11 18:34:41 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:45 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:46 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -73 -67 (0)
Mon Sep 11 18:34:46 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:50 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:51 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -72 -70 (1)
Mon Sep 11 18:34:51 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:34:55 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:34:56 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -73 -71 (2)
Mon Sep 11 18:34:56 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:35:00 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:01 2017 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED a6:23:d1:76:ad:33
Mon Sep 11 18:35:01 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -73 -71 (3)
Mon Sep 11 18:35:01 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 1 dropped
Mon Sep 11 18:35:03 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DEAUTHENTICATE.indication(a6:23:d1:76:ad:33, 3)
Mon Sep 11 18:35:03 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DELETEKEYS.request(a6:23:d1:76:ad:33)
Mon Sep 11 18:35:03 2017 kern.info kernel: [  391.567484] ieee80211 phy0: staid 1 deleted
Mon Sep 11 18:35:05 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:06 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: auth request, signal 0 (Accepted)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: authentication OK (open system)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: event 0 notification
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-AUTHENTICATE.indication(a6:23:d1:76:ad:33, OPEN_SYSTEM)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DELETEKEYS.request(a6:23:d1:76:ad:33)
Mon Sep 11 18:35:06 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: assoc request, signal 0 (Accepted)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: association OK (aid 1)
Mon Sep 11 18:35:06 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: associated (aid 1)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-ASSOCIATE.indication(a6:23:d1:76:ad:33)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DELETEKEYS.request(a6:23:d1:76:ad:33)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: binding station to interface 'wlan0'
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: event 1 notification
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: sending 1/4 msg of 4-Way Handshake
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: received EAPOL-Key frame (2/4 Pairwise)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: sending 3/4 msg of 4-Way Handshake
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: received EAPOL-Key frame (4/4 Pairwise)
Mon Sep 11 18:35:06 2017 daemon.notice hostapd: wlan0: AP-STA-CONNECTED a6:23:d1:76:ad:33
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.1X: authorizing port
Mon Sep 11 18:35:06 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: pairwise key handshake completed (WPA)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: sending 1/2 msg of Group Key Handshake
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: received EAPOL-Key frame (2/2 Group)
Mon Sep 11 18:35:06 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 WPA: group key handshake completed (WPA)
Mon Sep 11 18:35:06 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: 0 -64 (0)
Mon Sep 11 18:35:06 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:35:10 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:11 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 IAPP: -75 -66 (0)
Mon Sep 11 18:35:11 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 0 dropped
Mon Sep 11 18:35:15 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DEAUTHENTICATE.indication(a6:23:d1:76:ad:33, 3)
Mon Sep 11 18:35:15 2017 daemon.debug hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: MLME-DELETEKEYS.request(a6:23:d1:76:ad:33)
Mon Sep 11 18:35:15 2017 daemon.info hostapd: wlan0: STA a6:23:d1:76:ad:33 IEEE 802.11: authenticated
Mon Sep 11 18:35:15 2017 kern.info kernel: [  403.339595] ieee80211 phy0: staid 1 deleted
Mon Sep 11 18:35:15 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:16 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:20 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:21 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:25 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:26 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:30 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:31 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:35 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:36 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:40 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:41 2017 daemon.info hostapd: wlan0: IAPP signal poll: 0 STAs, 0 dropped
Mon Sep 11 18:35:45 2017 daemon.info hostapd: wlan1: IAPP signal poll: 0 STAs, 0 dropped

I just connect one device, during the test, it does not drop.

I am not sure if the issues is related to platform, I jus have one WRT 3200 router (mvebu), so I could not test it on another router at the moment.

I saw the line:

Mon Sep 11 18:35:01 2017 daemon.info hostapd: wlan0: IAPP signal poll: 1 STAs, 1 dropped

And later there is also an association OK

Is that means it does drop, just reconnect very quickly?

But I still confused, the signal_connect=-50, then how can the client be able to re-connect?

Yes the station was properly dropped for low signal, then as stations will do, it immediately tried to reconnect.

 hostapd: wlan0: STA a6:23:d1:76:ad:33 MLME: auth request, signal 0 (Accepted)

The reconnect was accepted because the driver reported a signal strength of 0 on the auth and assoc requests instead of the real signal. 0 is a bogus number but it is mathematically higher than -50 so it is accepted.
I have seen my routers running ath9k report a signal of 0 sometimes apparently at random, but whatever driver you are using seems to be doing it every time.

Not sure if the mod hostapd can use the first two number to check signal?

-44 -44 (0)

-56 -43 (0)

-78 -69 (0)

Look like the first two number also shows that the signal is from good to bad.

Because I am not able to change the wifi driver code for mvebu, if the driver developer does not change codes, I can only try other platform like WNDR 3800 or MT7621, or buying a Repeater that supports poor signal drop, like ASUS.

Unfortunately it is not that simple since the RSSI numbers come from the driver different ways.

Before a station is connected, hostapd receives every management packet (Probe Request, Assoc Request, etc) and formulates a response to it. These packets arrive in a raw form in a structure that includes a RSSI.

After exchanging several packets with hostapd, if the station has been qualified to connect by passing the cryptographic challenges, etc. hostapd inserts the station's MAC into the driver's list of connected stations.

At that point data flows directly from the station to the kernel without involving hostapd. Hostapd doesn't see any data packets from the station. Hostapd and the driver do both maintain a list of connected stations. So to check the RSSI of a connected station, my modification to hostapd runs a timer and periodically goes through the hostapd list of stations to request information on each one from the driver. The driver returns a bunch of things including the "last" and "average" RSSI of the station. Those are the two numbers logged in the signal poll report.

I don't think that a signal poll can be run on a station that doesn't exist in the driver's list because it is not connected yet. We really need an accurate RSSI on that one auth request packet that goes directly to hostapd.

Another guess at what could be happening is the auth request is sent at 1 Mb (11b modulation) and your driver does not measure signal level on those. After connection, data packets are sent at 11n rates and those are measured.

(The IEEE's long term strategy, which I also consider a good idea, is interested in getting 11b packets off the air entirely but that would require a lot of driver modifications and likely break some STAs)

A Netgear WNDR3800 should work fine because it is ath9k on both bands. I don't have any MT7621 routers to test on.

Thanks for the info.

I have a WNDR3800 at my hometown, will bring it back and try again.

Hello,

can someone help me to get this working with the latest stable release (v17.01.3)?
I don't know how to add lde-modhostapd to my stable installation and need help with each step.

Edit: What I'm not able to get done are the first two steps:

  1. Install the LEDE buildroot. (git.lede-project.org/source.git)
  2. Make a default build for your target hardware. (outside the scope of this document)

I never compiled something by myself and need help with that. Would someone be that nice?
I want to achieve a better roaming between my r7800 routers.

Installation guide: https://github.com/mk248/lede-modhostapd/blob/master/README

See the LEDE wiki:
https://lede-project.org/docs/guide-developer/start
https://lede-project.org/docs/guide-developer/install-buildsystem
https://lede-project.org/docs/guide-developer/use-buildsystem

BTW: Your questions regarding the basics do not belong in this thread. Please keep the title of this thread in mind and ask questions regarding the very basics in a separate thread.

Thanks for your reply, sorry for asking basic questions.

Is it possible to get this running with an already installed, stable LEDE 17.01.3 version?

It doesn't look to me like the patch is being added, when the LEDE buildroot is being created.
The patch seems to be applied after LEDE is running on the router, is this correct?

Even if, following steps are still over my head:

Confirm that wpad-mini is selected. This is usually the default. It should work with other variants of hostapd / wpad but this is not tested. Place this tree at package/network/services/hostapd, replacing all files there. You can also do this with a link. Rebuild the hostapd package: make package/hostapd/compile

I guess this isn't made for newbies. Sadly I need it to work for a solid roaming experience.

I would really appreciate if someone could help me to get this working (probably via PN, when this is off-topic here).

I'm trying to get it working with an Netgear R7800 (LEDE ipq806x build 17.01.3)

@eggplanter I have attempted to compile for R7800 for you. The ipk's are on my Github page. Beware: these are completely untested. I do not have any ipq routers.

To install, scp the files to your router and opkg --force-downgrade install (file name). Then configure through /etc/config/wireless then restart the whole network (/etc/init.d/network restart) Setting log_level 0 (in the wifi-device section) is recommended so you have extended log information.

Binaries from strangers and all that, I do appreciate your testing on a new platform.

Hello mk24,
thanks a lot for your precompiled files. I installed both files like you mentioned and confirmed the installation with "ubus -v list | grep set_required_signal", which shows me the new parameters.

It did not seem to work. My client was connected to each radio (2.4 GHz and 5 GHz radio) and I moved to a location with around -83 dBm. The connection was not dropped. Probably my config isn't correct.

I added following config to /etc/config/wireless:
option signal_connect "-50"
option signal_stay "-55"
option signal_strikes "3"
option signal_poll_time "5"
option signal_drop_reason "3"

I didn't assign it to a specific wireless interface, since the config seems to be global. Is this correct? Is it needed to place the parameters below a specific interface? I got following:

  • config wifi-device 'radio0'
  • config wifi-iface 'default_radio0'
  • config wifi-device 'radio1'
  • config wifi-iface 'default_radio1'

My log file showed me following. The tested client is using the IP 192.168.1.10. I anonymized the MAC-Adress of the client.

Edit 1: I guess the quotes at my config were wrong. Testing again.