I'm building an IOT device, powered by headless Debain on a CHIP (https://getchip.com/), and will have connectivity to a customer's wifi. I'm trying to build in functionality for wifi connectivity to the customer's router in a way that wouldn't require the customer to ever need to input a password and username. Basically, I'd like to have WPS push-button functionality in Unix.

I've installed wpa_cli, and have been tinkering around with wpa_supplicant.conf. However I'm very confused. The example .conf document located here , states that we'd need to input all the parameters of the router ahead of time. Why would that ever need to be the case? Doesn't that defeat the purpose of WPS (i.e. WPS should be blind to any access points and should handshake with the nearest router that has its WPS window open)?


Edit your /etc/wpa_supplicant.conf configuration file as follow:

At least you need to add the following line :


You can enable some others support:


Get the uuid through status command from wpa_cli

To connect

  1. run wpa_cli
  2. From the Interactive mode, run wps_pbc and push the wps button.
  3. Once connected run dhclient wlan0 (change wlan0 with your interface wifi)
  • 2
    Sorry it took me so long to come back to this; urgent things came up. This worked perfectly! You showed me the final step that I was missing: the dhclient. Thanks! – CAPGuy Oct 2 '16 at 2:22

See the documentation at w1.fi/cgit/hostap/plain/wpa_supplicant/README-WPS.

The documentation you were looking at shows all the possible options in wpa_supplicant.conf, which includes options for static configuration.

You also need to write a script so that when the WPS button on your device is pressed then you execute wpa_cli wps_pbc to alert wpa_supplicant. It's also a good idea to capture a multisecond key-press and use that to reset wpa_supplicant's configuration (allowing the user to move your device).

  • That's a great piece of advice about the button to reset the supplicant. Thanks! – CAPGuy Oct 2 '16 at 2:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.