Opened 8 years ago

Last modified 8 years ago

#194 new enhancement

Enable setting 'wps_pushbutton' option for hostapd-based Wifi devices on Wireless Security leaf

Reported by: reporter Owned by:
Priority: minor Milestone:
Component: LuCI Applications Keywords: Wifi WPS hostapd
Cc: hannu.nyman@…

Description

Hostapd based Wifi devices may support the WPS (Wifi Protected Setup) authentication and automatic joining of networks, for which function many routers have a physical button.

For hostapd based devices, you need to set an option 'wps_pushbutton' = '1' in /etc/config/wireless for each radio, for which you want to use the WPS. That option controls the hostapd daemon's awareness about the existence of WPS functionality.

Currently Luci provides no access to the option.

It would be great, if /modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua would be modified so that it would support that option. The option belongs to the "Wireless Security" leaf. A simple checkbox would be enough.

With hostapd, that option has meaning only if encryption is PSK, meaning WPA-PSK and/or WPA2-PSK.
Checking wps_pushbutton
https://dev.openwrt.org/browser/trunk/package/hostapd/files/hostapd.sh#L132
prerequisite PSK:
https://dev.openwrt.org/browser/trunk/package/hostapd/files/hostapd.sh#L59

In Luci's wifi.lua, the existence of the needed modules is done for some options and displayed options are tailored according to that. The correct check for showing this option checkbox might be to check for '/usr/sbin/hostapd_cli', which is the module used to pass WPS event notification to the already running hostapd daemon. The check might be added next to the other similar checks:
http://luci.subsignal.org/trac/browser/luci/trunk/modules/admin-full/luasrc/model/cbi/admin_network/wifi.lua#L539

And the option should only be showed on the WPA-PSK, WPA2-PSK and WPA-PSK/WPA2-PSK encryptions, where it has meaning.

The option belongs to the the same option block 'wifi-iface' in /etc/config/wireless as the WPA-setting and other security settings.

Example of usage in Openwrt config:
https://forum.openwrt.org/viewtopic.php?pid=127010#p127010

Attachments (1)

luci-0.10_wifi.lua.patch (1.0 KB) - added by reporter 8 years ago.
I created a suggestion about the patch. This is for 0.10, but should be the same also for Luci trunk

Download all attachments as: .zip

Change History (1)

Changed 8 years ago by reporter

I created a suggestion about the patch. This is for 0.10, but should be the same also for Luci trunk

Note: See TracTickets for help on using tickets.