Hostapd_cli wps_pbc fails!

Trying to connect a WPS device.

I installed hostapd-utils on openwrt 19.07.3.

Running the command "hostapd_cli wps_pbc" returns "UNKNOWN COMMAND"?
(other hostapd_cli commands work fine for instance "hostapd_cli status")

Why does it fail? Is there some alternative way to make WPS devices join the network?

try to specifiy the interface like that: hostapd_cli -i wlan2g wps_pbc

the name must match yours. Also you must set option wps_pushbutton '1' to your wifi connection.

1 Like

As additional data, you must also name the interface with option ifname '2G_ap' (for example).

You should also replace wpad-mini with wpad.
https://openwrt.org/docs/guide-user/network/wifi/basic#wps_options

It seems hostapd_cli has been compiled with a flag that disabled the wps_pbc command. But why?

https://hostap.shmoo.narkive.com/o4qMI2jX/hostapd-cli-all-sta-unknown-command

I found those instruction too on openwrt.org but they are outdated. wpad-mini is not in use anymore.

That compileiinformation is also really outdated. I use standard openwrt images and it works for me

The command returns OK when I change the "opkg remove wpad-mini" from the official documentation to "opkg-remove wpad-basic", so it now reads:

  • Add option wps_pushbutton '1 ' to a config wifi-iface section that is configured for WPA2-PSK in /etc/config/wireless
  • opkg update
  • opkg remove wpad-basic
  • opkg install wpad hostapd-utils
  • reboot

$ hostapd_cli -i wlan1 wps_pbc
OK
$ hostapd_cli -i wlan1 wps_get_status
PBC Status: Active
Last WPS result: None

I hold the WPS button on the device for 3 secs. It starts searching but never joins the router. I tried wlan0 too but same result.

That's a pitty, I had the same device working for many years using LEDE.

And btw. clicking the WPS button on the router does not turn on the led, but the wps_get_status command does say it's "active". I believe the led also worked on LEDE.