Example #1
0
 def setup_class(self):
     super().setup_class()
     if len(self.fuchsia_devices) < 1:
         raise signals.TestFailure("No fuchsia devices found.")
     for fd in self.fuchsia_devices:
         # Initialize the Policy client controller for each Fuchsia device
         fd.wlan_policy_lib.wlanCreateClientController()
     if len(self.access_points) < 1:
         raise signals.TestFailure("No access points found.")
     # Prepare the AP
     self.access_point = self.access_points[0]
     self.access_point.stop_all_aps()
     # Generate network params.
     bss_settings_2g = []
     bss_settings_5g = []
     open_network = self.get_open_network(False, [])
     self.open_network_2g = open_network["2g"]
     self.open_network_5g = open_network["5g"]
     wpa2_settings = self.get_psk_network(False, [])
     self.wpa2_network_2g = wpa2_settings["2g"]
     self.wpa2_network_5g = wpa2_settings["5g"]
     bss_settings_2g.append(
         hostapd_bss_settings.BssSettings(
             name=self.wpa2_network_2g["SSID"],
             ssid=self.wpa2_network_2g["SSID"],
             security=hostapd_security.Security(
                 security_mode=self.wpa2_network_2g["security"],
                 password=self.wpa2_network_2g["password"])))
     bss_settings_5g.append(
         hostapd_bss_settings.BssSettings(
             name=self.wpa2_network_5g["SSID"],
             ssid=self.wpa2_network_5g["SSID"],
             security=hostapd_security.Security(
                 security_mode=self.wpa2_network_5g["security"],
                 password=self.wpa2_network_5g["password"])))
     self.ap_2g = hostapd_ap_preset.create_ap_preset(
         iface_wlan_2g=self.access_points[0].wlan_2g,
         iface_wlan_5g=self.access_points[0].wlan_5g,
         channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
         ssid=self.open_network_2g["SSID"],
         bss_settings=bss_settings_2g)
     self.ap_5g = hostapd_ap_preset.create_ap_preset(
         iface_wlan_2g=self.access_points[0].wlan_2g,
         iface_wlan_5g=self.access_points[0].wlan_5g,
         channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
         ssid=self.open_network_5g["SSID"],
         bss_settings=bss_settings_5g)
     # Start the networks
     self.access_point.start_ap(hostapd_config=self.ap_2g)
     self.access_point.start_ap(hostapd_config=self.ap_5g)
     # Save the SSIDs
     self.all_ssids = [
         self.open_network_2g["SSID"],
         self.wpa2_network_2g["SSID"],
         self.open_network_5g["SSID"],
         self.wpa2_network_5g["SSID"],
     ]
Example #2
0
 def _generate_legacy_ap_config(self, network_list):
     bss_settings = []
     ap_settings = network_list.pop(0)
     # TODO:(bmahadev) This is a bug. We should not have to pop the first
     # network in the list and treat it as a separate case. Instead,
     # create_ap_preset() should be able to take NULL ssid and security and
     # build config based on the bss_Settings alone.
     hostapd_config_settings = network_list.pop(0)
     for network in network_list:
         if "password" in network and "hiddenSSID" in network:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(
                     name=network["SSID"],
                     ssid=network["SSID"],
                     hidden=True,
                     security=hostapd_security.Security(
                         security_mode=network["security"],
                         password=network["password"])))
         elif "password" in network and not "hiddenSSID" in network:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(
                     name=network["SSID"],
                     ssid=network["SSID"],
                     security=hostapd_security.Security(
                         security_mode=network["security"],
                         password=network["password"])))
         elif not "password" in network and "hiddenSSID" in network:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(name=network["SSID"],
                                                  ssid=network["SSID"],
                                                  hidden=True))
         elif not "password" in network and not "hiddenSSID" in network:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(name=network["SSID"],
                                                  ssid=network["SSID"]))
     if "password" in hostapd_config_settings:
         config = hostapd_ap_preset.create_ap_preset(
             channel=ap_settings["channel"],
             ssid=hostapd_config_settings["SSID"],
             security=hostapd_security.Security(
                 security_mode=hostapd_config_settings["security"],
                 password=hostapd_config_settings["password"]),
             bss_settings=bss_settings,
             profile_name='whirlwind')
     else:
         config = hostapd_ap_preset.create_ap_preset(
             channel=ap_settings["channel"],
             ssid=hostapd_config_settings["SSID"],
             bss_settings=bss_settings,
             profile_name='whirlwind')
     return config
    def setup_ap(self):
        bss_settings = []
        self.access_point = self.access_points[0]
        network_type = self.user_params["network_type"]
        if (network_type == "2G"):
            self.channel = hostapd_constants.AP_DEFAULT_CHANNEL_2G
        else:
            self.channel = hostapd_constants.AP_DEFAULT_CHANNEL_5G

        self.ssid = self.user_params["ssid"]
        self.security = self.user_params["security"]
        if self.security == "none":
            self.config = hostapd_ap_preset.create_ap_preset(
                channel=self.channel,
                ssid=self.ssid,
                bss_settings=bss_settings,
                profile_name='whirlwind')
        else:
            self.passphrase = self.user_params["passphrase"]
            self.hostapd_security = hostapd_security.Security(
                security_mode=self.security, password=self.passphrase)
            self.config = hostapd_ap_preset.create_ap_preset(
                channel=self.channel,
                ssid=self.ssid,
                security=self.hostapd_security,
                bss_settings=bss_settings,
                profile_name='whirlwind')
        self.access_point.start_ap(self.config)
 def test_wrong_password_whirlwind_5g(self):
     self.connect_disconnect(
         {
             'profile':
             'whirlwind',
             'channel':
             self.channel_5G,
             'security':
             hostapd_security.Security(security_mode='wpa2',
                                       password=rand_ascii_str(10))
         },
         password=rand_ascii_str(20),
         negative_test=True)
Example #5
0
def ap_setup(ap, network, bandwidth=80):
    """Set up the whirlwind AP with provided network info.

    Args:
        ap: access_point object of the AP
        network: dict with information of the network, including ssid, password
                 bssid, channel etc.
        bandwidth: the operation bandwidth for the AP, default 80MHz
    Returns:
        brconfigs: the bridge interface configs
    """
    log = logging.getLogger()
    bss_settings = []
    ssid = network[wutils.WifiEnums.SSID_KEY]
    if "password" in network.keys():
        password = network["password"]
        security = hostapd_security.Security(security_mode="wpa",
                                             password=password)
    else:
        security = hostapd_security.Security(security_mode=None, password=None)
    channel = network["channel"]
    config = hostapd_ap_preset.create_ap_preset(channel=channel,
                                                ssid=ssid,
                                                security=security,
                                                bss_settings=bss_settings,
                                                vht_bandwidth=bandwidth,
                                                profile_name='whirlwind',
                                                iface_wlan_2g=ap.wlan_2g,
                                                iface_wlan_5g=ap.wlan_5g)
    config_bridge = ap.generate_bridge_configs(channel)
    brconfigs = bi.BridgeInterfaceConfigs(config_bridge[0], config_bridge[1],
                                          config_bridge[2])
    ap.bridge.startup(brconfigs)
    ap.start_ap(config)
    log.info("AP started on channel {} with SSID {}".format(channel, ssid))
    return brconfigs
Example #6
0
def configure_and_start_ap(ap, network):
    """Configure hostapd parameters and starts access point.

    Args:
        ap: An access point object.
        network: A dictionary with wifi network details.
    """
    hostapd_sec = None
    if network["security"] == "wpa2":
        hostapd_sec = hostapd_security.Security(
            security_mode=network["security"], password=network["password"])

    config = hostapd_config.HostapdConfig(
        n_capabilities=[hostapd_constants.N_CAPABILITY_HT40_MINUS],
        mode=hostapd_constants.MODE_11N_PURE,
        channel=network["channel"],
        ssid=network["SSID"],
        security=hostapd_sec)
    ap.start_ap(config)
    time.sleep(AP_START_TIME)
    def test_soft_ap_and_client(self):
        """ Tests FuchsiaDevice DUT can act as a client and a SoftAP
        simultaneously.

        Raises:
            ConnectionError: if DUT fails to connect as client
            RuntimeError: if parallel processes fail to join
            TestFailure: if DUT fails to pass traffic as either a client or an
                AP
        """
        asserts.skip_if(not self.access_point, 'No access point provided.')

        self.log.info('Setting up AP using hostapd.')

        # Configure AP
        ap_params = self.user_params.get('soft_ap_test_params',
                                         {}).get('ap_params', {})
        channel = ap_params.get('channel', 11)
        ssid = ap_params.get('ssid', 'apnet')
        security_mode = ap_params.get('security_mode', None)
        password = ap_params.get('password', None)
        if security_mode:
            security = hostapd_security.Security(security_mode, password)
        else:
            security = None

        # Setup AP and associate DUT
        if not setup_ap_and_associate(access_point=self.access_point,
                                      client=self.dut,
                                      profile_name='whirlwind',
                                      channel=channel,
                                      security=security,
                                      password=password,
                                      ssid=ssid):
            raise ConnectionError(
                'FuchsiaDevice DUT failed to connect as client to AP.')
        self.log.info('DUT successfully associated to AP network.')

        # Verify FuchsiaDevice's client interface has an ip address from AP
        dut_client_interface = self.get_dut_interface_by_role(
            INTERFACE_ROLE_CLIENT)

        # Verify FuchsiaDevice can ping AP
        lowest_5ghz_channel = 36
        if channel < lowest_5ghz_channel:
            ap_interface = self.access_point.wlan_2g
        else:
            ap_interface = self.access_point.wlan_5g
        ap_ipv4 = utils.get_interface_ip_addresses(
            self.access_point.ssh, ap_interface)['ipv4_private'][0]

        self.verify_ping(self.dut, ap_ipv4)

        # Setup SoftAP
        soft_ap_settings = {
            'ssid': utils.rand_ascii_str(hostapd_constants.AP_SSID_LENGTH_2G),
            'security_type': SECURITY_OPEN,
            'connectivity_mode': CONNECTIVITY_MODE_LOCAL,
            'operating_band': OPERATING_BAND_2G
        }
        self.start_soft_ap(soft_ap_settings)

        # Get FuchsiaDevice's AP interface info
        dut_ap_interface = self.get_dut_interface_by_role(INTERFACE_ROLE_AP)

        # Associate primary client with SoftAP
        self.associate_with_soft_ap(self.primary_client.w_device,
                                    soft_ap_settings)

        # Verify primary client has an ip address from SoftAP
        client_ipv4 = self.wait_for_ipv4_address(self.primary_client.w_device,
                                                 ANDROID_DEFAULT_WLAN_PORT)

        # Verify primary client can ping SoftAP, and reverse
        self.verify_ping(self.primary_client.w_device, dut_ap_interface.ipv4)
        self.verify_ping(self.dut, client_ipv4)

        # Set up secondary iperf server of FuchsiaDevice
        self.log.info('Setting up second iperf server on FuchsiaDevice DUT.')
        secondary_iperf_server = iperf_server.IPerfServerOverSsh(
            self.iperf_server_config, DEFAULT_IPERF_PORT + 1, use_killall=True)
        secondary_iperf_server.start()

        # Set up iperf client on AP
        self.log.info('Setting up iperf client on AP.')
        ap_iperf_client = iperf_client.IPerfClientOverSsh(
            self.user_params['AccessPoint'][0]['ssh_config'])

        # Setup iperf processes:
        #     Primary client <-> SoftAP interface on FuchsiaDevice
        #     AP <-> Client interface on FuchsiaDevice
        process_errors = mp.Queue()
        iperf_soft_ap = mp.Process(
            target=self.run_iperf_traffic_parallel_process,
            args=[
                self.primary_client.ip_client, dut_ap_interface.ipv4,
                process_errors
            ])

        iperf_fuchsia_client = mp.Process(
            target=self.run_iperf_traffic_parallel_process,
            args=[ap_iperf_client, dut_client_interface.ipv4, process_errors],
            kwargs={'server_port': 5202})

        # Run iperf processes simultaneously
        self.log.info('Running simultaneous iperf traffic: between AP and DUT '
                      'client interface, and DUT AP interface and client.')
        iperf_soft_ap.start()
        iperf_fuchsia_client.start()

        # Block until processes can join or timeout
        for proc in [iperf_soft_ap, iperf_fuchsia_client]:
            proc.join(timeout=30)
            if proc.is_alive():
                raise RuntimeError('Failed to join process %s' % proc)

        # Stop iperf server (also stopped in teardown class as failsafe)
        secondary_iperf_server.stop()

        # Check errors from parallel processes
        if process_errors.empty():
            asserts.explicit_pass(
                'FuchsiaDevice was successfully able to pass traffic as a '
                'client and an AP simultaneously.')
        else:
            while not process_errors.empty():
                self.log.error('Error in iperf process: %s' %
                               process_errors.get())
            asserts.fail(
                'FuchsiaDevice failed to pass traffic as a client and an AP '
                'simultaneously.')
Example #8
0
 def _generate_legacy_ap_config(self, network_list):
     bss_settings = []
     wlan_2g = self.access_points[AP_1].wlan_2g
     wlan_5g = self.access_points[AP_1].wlan_5g
     ap_settings = network_list.pop(0)
     # TODO:(bmahadev) This is a bug. We should not have to pop the first
     # network in the list and treat it as a separate case. Instead,
     # create_ap_preset() should be able to take NULL ssid and security and
     # build config based on the bss_Settings alone.
     hostapd_config_settings = network_list.pop(0)
     for network in network_list:
         if "password" in network:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(
                     name=network["SSID"],
                     ssid=network["SSID"],
                     hidden=network["hiddenSSID"],
                     security=hostapd_security.Security(
                         security_mode=network["security"],
                         password=network["password"])))
         elif "wepKeys" in network:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(
                     name=network["SSID"],
                     ssid=network["SSID"],
                     hidden=network["hiddenSSID"],
                     security=hostapd_security.Security(
                         security_mode=network["security"],
                         password=network["wepKeys"][0])))
         elif network["security"] == hostapd_constants.ENT_STRING:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(
                     name=network["SSID"],
                     ssid=network["SSID"],
                     hidden=network["hiddenSSID"],
                     security=hostapd_security.Security(
                         security_mode=network["security"],
                         radius_server_ip=network["radius_server_ip"],
                         radius_server_port=network["radius_server_port"],
                         radius_server_secret=network["radius_server_secret"])))
         else:
             bss_settings.append(
                 hostapd_bss_settings.BssSettings(
                     name=network["SSID"],
                     ssid=network["SSID"],
                     hidden=network["hiddenSSID"]))
     if "password" in hostapd_config_settings:
         config = hostapd_ap_preset.create_ap_preset(
             iface_wlan_2g=wlan_2g,
             iface_wlan_5g=wlan_5g,
             channel=ap_settings["channel"],
             ssid=hostapd_config_settings["SSID"],
             hidden=hostapd_config_settings["hiddenSSID"],
             security=hostapd_security.Security(
                 security_mode=hostapd_config_settings["security"],
                 password=hostapd_config_settings["password"]),
             bss_settings=bss_settings)
     elif "wepKeys" in hostapd_config_settings:
         config = hostapd_ap_preset.create_ap_preset(
             iface_wlan_2g=wlan_2g,
             iface_wlan_5g=wlan_5g,
             channel=ap_settings["channel"],
             ssid=hostapd_config_settings["SSID"],
             hidden=hostapd_config_settings["hiddenSSID"],
             security=hostapd_security.Security(
                 security_mode=hostapd_config_settings["security"],
                 password=hostapd_config_settings["wepKeys"][0]),
             bss_settings=bss_settings)
     else:
         config = hostapd_ap_preset.create_ap_preset(
             iface_wlan_2g=wlan_2g,
             iface_wlan_5g=wlan_5g,
             channel=ap_settings["channel"],
             ssid=hostapd_config_settings["SSID"],
             hidden=hostapd_config_settings["hiddenSSID"],
             bss_settings=bss_settings)
     return config
Example #9
0
    def setup_class(self):
        self.log.info('Setup {cls}'.format(cls=type(self)))

        if not self.fuchsia_devices:
            self.log.error(
                "NetstackFuchsiaTest Init: Not enough fuchsia devices.")
        self.log.info("Running testbed setup with one fuchsia devices")
        self.fuchsia_dev = self.fuchsia_devices[0]

        # We want to bring up several 2GHz and 5GHz BSSes.
        wifi_bands = ['2g', '5g']

        # Currently AP_DEFAULT_CHANNEL_2G is 6
        # and AP_DEFAULT_CHANNEL_5G is 36.
        wifi_channels = [
            hostapd_constants.AP_DEFAULT_CHANNEL_2G,
            hostapd_constants.AP_DEFAULT_CHANNEL_5G
        ]

        # Each band will start up an Open BSS (security_mode=None)
        # and a WPA2 BSS (security_mode=hostapd_constants.WPA2_STRING)
        security_modes = [None, hostapd_constants.WPA2_STRING]

        # All secure BSSes will use the same password.
        wifi_password = rand_ascii_str(10)
        self.log.info('Wi-Fi password for this test: {wifi_password}'.format(
            wifi_password=wifi_password))
        hostapd_configs = []
        wifi_interfaces = {}
        bss_settings = {}

        # Build a configuration for each sub-BSSID
        for band_index, wifi_band in enumerate(wifi_bands):
            ssid_name = 'Ixia_{wifi_band}_#{bss_number}_{security_mode}'
            bss_settings[wifi_band] = []

            # Prepare the extra SSIDs.
            for mode_index, security_mode in enumerate(security_modes):

                # Skip the first SSID because we configure that separately.
                # due to the way the APIs work.  This loop is only concerned
                # with the sub-BSSIDs.
                if mode_index == 0:
                    continue

                bss_name = ssid_name.format(wifi_band=wifi_band,
                                            security_mode=security_mode,
                                            bss_number=mode_index + 1)

                bss_setting = hostapd_bss_settings.BssSettings(
                    name=bss_name,
                    ssid=bss_name,
                    security=hostapd_security.Security(
                        security_mode=security_mode, password=wifi_password))
                bss_settings[wifi_band].append(bss_setting)

            # This is the configuration for the first SSID.
            ssid_name = ssid_name.format(wifi_band=wifi_band,
                                         security_mode=security_modes[0],
                                         bss_number=1)

            hostapd_configs.append(
                hostapd_ap_preset.create_ap_preset(
                    profile_name='whirlwind',
                    iface_wlan_2g='wlan0',
                    iface_wlan_5g='wlan1',
                    ssid=ssid_name,
                    channel=wifi_channels[band_index],
                    security=hostapd_security.Security(
                        security_mode=security_modes[0],
                        password=wifi_password),
                    bss_settings=bss_settings[wifi_band]))

            access_point = self.access_points[band_index]

            # Now bring up the AP and track the interfaces we're using for
            # each BSSID.  All BSSIDs are now beaconing.
            wifi_interfaces[wifi_band] = access_point.start_ap(
                hostapd_configs[band_index])

            # Disable DHCP on this Wi-Fi band.
            # Note: This also disables DHCP on each sub-BSSID due to how
            # the APIs are built.
            #
            # We need to do this in order to enable IxANVL testing across
            # Wi-Fi, which needs to configure the IP addresses per-interface
            # on the client device.
            access_point.stop_dhcp()

            # Disable NAT.
            # NAT config in access_point.py is global at the moment, but
            # calling it twice (once per band) won't hurt anything.  This is
            # easier than trying to conditionalize per band.
            #
            # Note that we could make this per-band, but it would require
            # refactoring the access_point.py code that turns on NAT, however
            # if that ever does happen then this code will work as expected
            # without modification.
            #
            # This is also required for IxANVL testing.  NAT would interfere
            # with IxANVL because IxANVL needs to see the raw frames
            # sourcing/sinking from/to the DUT for protocols such as ARP and
            # DHCP, but it also needs the MAC/IP of the source and destination
            # frames and packets to be from the DUT, so we want the AP to act
            # like a bridge for these tests.
            access_point.stop_nat()

        # eth1 is the LAN port, which will always be a part of the bridge.
        bridge_interfaces = ['eth1']

        # This adds each bssid interface to the bridge.
        for wifi_band in wifi_bands:
            for wifi_interface in wifi_interfaces[wifi_band]:
                bridge_interfaces.append(wifi_interface)

        # Each interface can only be a member of 1 bridge, so we're going to use
        # the last access_point object to set the bridge up for all interfaces.
        access_point.create_bridge(bridge_name='ixia_bridge0',
                                   interfaces=bridge_interfaces)
    def setup_class(self):
        super().setup_class()

        self.start_access_point = False
        if "AccessPoint" in self.user_params:
            # This section sets up the config that could be sent to the AP if
            # the AP is needed. The reasoning is since ACTS already connects
            # to the AP if it is in the config, generating the config in memory
            # has no over head is used if need by the test if one of the ssids
            # needed for the test is not included in the config.  The logic
            # here creates 2 ssids on each radio, 5ghz and 2.4ghz, with an
            # open, no security network and one that is wpa2, for a total of 4
            # networks.  However, if all of the ssids are specified in the
            # the config will never be written to the AP and the AP will not be
            # brought up.  For more information about how to configure the
            # hostapd config info, see the hostapd libraries, which have more
            # documentation.
            bss_settings_2g = []
            bss_settings_5g = []
            open_network = self.get_open_network(False, [])
            self.open_network_2g = open_network['2g']
            self.open_network_5g = open_network['5g']
            wpa2_settings = self.get_psk_network(False, [])
            self.wpa2_network_2g = wpa2_settings['2g']
            self.wpa2_network_5g = wpa2_settings['5g']
            bss_settings_2g.append(
                hostapd_bss_settings.BssSettings(
                    name=self.wpa2_network_2g['SSID'],
                    ssid=self.wpa2_network_2g['SSID'],
                    security=hostapd_security.Security(
                        security_mode=self.wpa2_network_2g["security"],
                        password=self.wpa2_network_2g["password"])))
            bss_settings_5g.append(
                hostapd_bss_settings.BssSettings(
                    name=self.wpa2_network_5g['SSID'],
                    ssid=self.wpa2_network_5g['SSID'],
                    security=hostapd_security.Security(
                        security_mode=self.wpa2_network_5g["security"],
                        password=self.wpa2_network_5g["password"])))
            self.ap_2g = hostapd_ap_preset.create_ap_preset(
                iface_wlan_2g=self.access_points[0].wlan_2g,
                iface_wlan_5g=self.access_points[0].wlan_5g,
                channel=hostapd_constants.AP_DEFAULT_CHANNEL_2G,
                ssid=self.open_network_2g['SSID'],
                bss_settings=bss_settings_2g)
            self.ap_5g = hostapd_ap_preset.create_ap_preset(
                iface_wlan_2g=self.access_points[0].wlan_2g,
                iface_wlan_5g=self.access_points[0].wlan_5g,
                channel=hostapd_constants.AP_DEFAULT_CHANNEL_5G,
                ssid=self.open_network_5g['SSID'],
                bss_settings=bss_settings_5g)

        if "wlan_open_network_2g" in self.user_params:
            self.open_network_2g = self.user_params.get("wlan_open_network_2g")
        elif "AccessPoint" in self.user_params:
            self.start_access_point_2g = True
        else:
            raise Exception('Missing parameter in config '
                            '(wlan_open_network_2g)')

        if "wlan_open_network_5g" in self.user_params:
            self.open_network_5g = self.user_params.get("wlan_open_network_5g")
        elif "AccessPoint" in self.user_params:
            self.start_access_point_5g = True
        else:
            raise Exception('Missing parameter in config '
                            '(wlan_open_network_5g)')

        if "wlan_wpa2_network_2g" in self.user_params:
            self.wpa2_network_2g = self.user_params.get("wlan_wpa2_network_2g")
        elif "AccessPoint" in self.user_params:
            self.start_access_point_2g = True
        else:
            raise Exception('Missing parameter in config '
                            '(wlan_wpa2_network_2g)')

        if "wlan_wpa2_network_5g" in self.user_params:
            self.wpa2_network_5g = self.user_params.get("wlan_wpa2_network_5g")
        elif "AccessPoint" in self.user_params:
            self.start_access_point_5g = True
        else:
            raise Exception('Missing parameter in config '
                            '(wlan_wpa2_network_5g)')

        # Only bring up the APs that are needed for the test.  Each ssid is
        # randomly generated so there is no chance of re associating to a
        # previously saved ssid on the device.
        if self.start_access_point_2g:
            self.start_access_point = True
            self.access_points[0].start_ap(hostapd_config=self.ap_2g)
        if self.start_access_point_5g:
            self.start_access_point = True
            self.access_points[0].start_ap(hostapd_config=self.ap_5g)