Candela Technologies Logo
 
http://www.candelatech.com
sales@candelatech.com
+1 360 380 1618 [PST, GMT -8]
Network Testing and Emulation Solutions

WPS Association

Goal: Associate a station to an AP with the WPS Push and PIN methods.

In this test scenario, a LANforge CT523 is used to simulate a station connecting to a commercial AP with WPS Push mode and also with WPS PIN mode. Currently this test requires the use of a terminal on the LANforge system to run some WPS commands.
 
  1. Create a virtual wireless station.

    1. Go to the Port Mgr tab. screenshot

    2. Check wiphy0 settings by selecting wiphy0 and click Modify. screenshot

      1. If the Down checkbox is selected, Click Set IF Down on the left, then uncheck the Down checkbox.

      2. Make sure Channel/Freq is set to AUTO.

      3. Click OK.

    3. Back in the Port Mgr tab, select port wiphy0 and click Create. screenshot

      1. Select WiFi STA.

      2. Select DHCP-IPv4.

      3. Set Quantity to 1.

      4. Set STA ID to 0.

      5. Set SSID to [BLANK]. Don't forget to add the brackets.

      6. Click Apply.

  2. Create a wpa_supplicant.conf file.

    1. Open a terminal on the LANforge system. screenshot

    2. Create the file wpa_supplicant.conf in /etc that contains the below text. Alternatively, the command in the next step can be used to create the file.
      ctrl_interface=/var/run/wpa_supplicant
      ctrl_interface_group=0
      update_config=1

    3. In the open terminal run the below command to create the wpa_supplicant.conf file.
      NOTE: Please make sure wpa_supplicant.conf doesn't already exist in the /etc directory.

      First become root: su -
      Then run:
      if [ ! -f '/etc/wpa_supplicant.conf' ]; then printf %'s\n' ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=0 update_config=1 > /etc/wpa_supplicant.conf; fi screenshot

    4. Keep in mind the wpa_supplicant.conf file will save AP information for stations. If you want a station to forget the AP information, you'll need to recreate the wpa_supplicant.conf file.

  3. Configure sta0 to use a the wpa_supplicant.conf file created in step 2.

    1. Select sta0 in the Port mgr tab and click Modify. screenshot

    2. In the Misc Configuration tab, select Custom WPA Cfg then inside the text field for WPA Cfg, add the path of the wpa_supplicant.conf file. In this case, we'll be using /etc/wpa_supplicant.conf screenshot

    3. Click OK.

  4. Associate the station using WPS Push mode.

    1. In a terminal on the LANforge system, enter in the below command and then push your AP's WPS button. If you aren't root, use su -
      wpa_cli -i sta0 wps_pbc screenshot

    2. Your station should now associate and get an IP.
      Note: The SSID field in the sta0 Modify window will remain as [BLANK]. You also may see a different SSID in the View Details window, this is a bug and can be ignored for now as long as the BSSID is correct. screenshot

  5. Associate the station using WPS PIN mode.

    1. Obtain your AP's BSSID and WPS PIN. This information can usually be found on the AP label or in the AP's software.

    2. In a terminal on the LANforge system, enter in the below command. Replace the x's with the BSSID and numbers with the PIN. If you aren't root, use su -
      wpa_cli -i sta0 wps_reg xx:xx:xx:xx:xx:xx 12345678 screenshot

    3. Your station should now associate and get an IP.
      Note: The SSID field in the sta0 Modify window will remain as [BLANK]. You also may see a different SSID in the View Details window, this is a bug and can be ignored for now as long as the BSSID is correct. screenshot


Candela  Technologies, 2417 Main Street, Suite 201, Ferndale, WA 98248, USA
www.candelatech.com | sales@candelatech.com | +1.360.380.1618
Google+ | Facebook | LinkedIn | Blog