Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

How to connect to Wi-Fi AP through WPS? All ways will be nice: configs, CLI, GUI - anything.

share|improve this question
This question appears to be abandoned. Unaccepted answer or unanswered, could you perhaps add more detail to your question? If this question no longer applies then you can either delete it or answer it yourself if you've solved the problem. Flagged for deletion. Thanks! –  Ringtail Jan 13 '13 at 3:07
I have no possibility to try solution for any time, but it seems good. –  Michael Jan 13 '13 at 7:07
@user51072 Did you try it? do you have a working solution? –  Dejan Mar 31 '13 at 22:52

2 Answers 2

Solution from

  1. Set yourself up a very basic wpa_supplicant.conf in /etc/wpa_supplicant.conf:

  2. Start wpa_supplicant in daemon mode:

    wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf –B
  3. Run wpa_cli, and verify that it's working by issuing command status. You should see wpa_state=INACTIVE

  4. Fourth, lets add our BSSID and PIN:

    wps_reg xx:xx:xx:xx:xx:xx 12345678

    You should see an "OK". Wait a few more seconds as wpa_supplicant picks up the BSSID and tries to associate and perform key negotiation. What you want to see is CTRL-EVENT-CONNECTED, which will indicate that the PIN was accepted and that you're now associated.

    At this point, if you were to exit wpa_cli, you could run dhclient on wlan0 and would be offered an IP from the AP, assuming DHCPd were enabled.

    Go ahead and type the command save, which should output another "OK". This will update the wpa_supplicant.conf file, as specified from the command line, with a static configuration for this new network.

  5. Verify with: cat /etc/wpa_supplicant.conf

    If all went well, you should have a line under this new network titled psk.

Good luck!

share|improve this answer
Solution doesn't work. ioctl[SIOCSIWENCODEEXT]: Invalid argument using Ubuntu 12 LTS. Is there support in NM? –  Dejan Mar 31 '13 at 22:48
@Dejan I got that warning as well in Ubuntu 12 LTS -- solution still worked though. –  verlaner Dec 30 '13 at 19:21

Connect through WPS on a windows setup, where it works out of the box.

Then open up the network settings on that setup, where it allows you to display the network password that was exchanged through WPS.

Copy that password to your ubuntu setup.

share|improve this answer
Don't know why this is being downvoted - it's a practical solution to the main reason this question is useful - that is "I don't know the WIFI password, but I have WPS access, how can I connect?" +1 This also work on android, with a root-mode file explorer, you can check the passwords in /data/misc/wifi/wpa_supplicant.conf. –  naught101 May 28 at 17:50
Ah, maybe the downvotes were for the comment about ubuntu being frustrating. Here is the relevant bug report - go an subscribe to that, if you want WPS support. –  naught101 May 28 at 17:53
Thanks for the Android tip, @naught101; worked beautifully from my rooted Nexus 7's terminal! :-) –  tstanton Sep 21 at 12:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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