Ejemplo n.º 1
0
        public void Scan_VariousAuthCipher() // WPA-Personal/TKIP, WPA-Entprise/AES; Open/None/Hidden, WPA2-Personal/AES
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            AP1Config24GHz.Auth    = AuthenticationMethod.WPAPersonal;
            AP1Config24GHz.Cipher  = EncryptionMethod.TKIP;
            AP1Config24GHz.Phy     = PhyType.b;
            AP1Config24GHz.Channel = 5;

            AP1Config5GHz.Auth    = AuthenticationMethod.WPAEnterprise;
            AP1Config5GHz.Cipher  = EncryptionMethod.AES;
            AP1Config5GHz.Phy     = PhyType.a;
            AP1Config5GHz.Channel = 36;

            AP2Config24GHz.Auth     = AuthenticationMethod.Open;
            AP2Config24GHz.Cipher   = EncryptionMethod.None;
            AP2Config24GHz.Phy      = PhyType.g;
            AP2Config24GHz.Channel  = 11;
            AP2Config24GHz.IsHidden = true;   // Hidden

            AP2Config5GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP2Config5GHz.Cipher  = EncryptionMethod.AES;
            AP2Config5GHz.Phy     = PhyType.n;
            AP2Config5GHz.Channel = 44;

            WhckScanning.Scan(sConfig,
                              AP1Config24GHz,
                              AP1Config5GHz,
                              AP2Config24GHz,
                              AP2Config5GHz,
                              SCAN_TEST_OPTIONS.None);
        }
Ejemplo n.º 2
0
        public void Scan_MultipleBSSID()     // Two Open and WPA2 Enterprise
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            AP1Config24GHz.Auth    = AuthenticationMethod.Open;
            AP1Config24GHz.Cipher  = EncryptionMethod.None;
            AP1Config24GHz.Phy     = PhyType.g;
            AP1Config24GHz.Channel = 1;

            AP1Config5GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP1Config5GHz.Cipher  = EncryptionMethod.AES;
            AP1Config5GHz.Phy     = PhyType.a;
            AP1Config5GHz.Channel = 44;

            AP2Config24GHz.Auth    = AuthenticationMethod.Open;
            AP2Config24GHz.Cipher  = EncryptionMethod.None;
            AP2Config24GHz.Phy     = PhyType.g;
            AP2Config24GHz.Channel = 6;

            AP2Config5GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP2Config5GHz.Cipher  = EncryptionMethod.AES;
            AP2Config5GHz.Phy     = PhyType.n;
            AP2Config5GHz.Channel = 36;

            WhckScanning.Scan(sConfig,
                              AP1Config24GHz,
                              AP1Config5GHz,
                              AP2Config24GHz,
                              AP2Config5GHz,
                              SCAN_TEST_OPTIONS.DuplicateSSIDs);
        }
Ejemplo n.º 3
0
        public void Scan_Custom()     // Custom
        {
            bool bParameterSpecified = true;
            SCAN_TEST_OPTIONS customOptions;

            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            bParameterSpecified = AP1Config24GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP1Config5GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP2Config24GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP2Config5GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;

            if (!bParameterSpecified)
            {
                // No parameters specified. Dont run the test
                return;
            }

            customOptions = (SCAN_TEST_OPTIONS)sConfig.WlanTestOptions;
            if (customOptions == 0)
            {
                customOptions = SCAN_TEST_OPTIONS.None;
            }

            WhckScanning.Scan(sConfig,
                              AP1Config24GHz,
                              AP1Config5GHz,
                              AP2Config24GHz,
                              AP2Config5GHz,
                              customOptions);
        }
Ejemplo n.º 4
0
        public void Roam_WPA2_PSK_AES()     // Home AP's (both bands)
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            AP1Config24GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP1Config24GHz.Cipher  = EncryptionMethod.AES;
            AP1Config24GHz.Phy     = PhyType.g;
            AP1Config24GHz.Channel = 1;

            AP1Config5GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP1Config5GHz.Cipher  = EncryptionMethod.AES;
            AP1Config5GHz.Phy     = PhyType.a;
            AP1Config5GHz.Channel = 44;

            AP2Config24GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP2Config24GHz.Cipher  = EncryptionMethod.AES;
            AP2Config24GHz.Phy     = PhyType.g;
            AP2Config24GHz.Channel = 9;

            AP2Config5GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP2Config5GHz.Cipher  = EncryptionMethod.AES;
            AP2Config5GHz.Phy     = PhyType.n;
            AP2Config5GHz.Channel = 36;

            WhckRoaming.Roam(sConfig,
                             AP1Config24GHz,
                             AP1Config5GHz,
                             AP2Config24GHz,
                             AP2Config5GHz,
                             ROAM_TEST_OPTIONS.SuddenLossOfSignal | ROAM_TEST_OPTIONS.GradualLossOfSignal);
        }
Ejemplo n.º 5
0
        public void Associate_Custom() //Custom Mix
        {
            bool bParameterSpecified = true;
            ASSOC_TEST_OPTIONS customOptions;

            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            bParameterSpecified = AP1Config24GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP1Config5GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP2Config24GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP2Config5GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;

            if (!bParameterSpecified)
            {
                // No parameters specified. Dont run the test
                return;
            }

            customOptions = (ASSOC_TEST_OPTIONS)sConfig.WlanTestOptions;
            if (customOptions == 0)
            {
                customOptions = ASSOC_TEST_OPTIONS.None;
            }

            WhckAssociation.Associate(sConfig,
                                      AP1Config24GHz,
                                      AP1Config5GHz,
                                      AP2Config24GHz,
                                      AP2Config5GHz,
                                      customOptions);
        }
Ejemplo n.º 6
0
        public WhckAssociation(RunTimeConfiguration RuntimeConfig,
                               APConfigParameter AP1Config24GHz,
                               APConfigParameter AP1Config5GHz,
                               APConfigParameter AP2Config24GHz,
                               APConfigParameter AP2Config5GHz,
                               ASSOC_TEST_OPTIONS AssocTestOptions)
        {
            if (RuntimeConfig == null)
            {
                throw new ArgumentNullException("RuntimeConfig");
            }
            m_TraceProvider = new WlanHckTestLogger("WhckAssociation");

            this.m_AssociationConfiguration = RuntimeConfig;
            this.m_AP1Config24GHz           = AP1Config24GHz;
            this.m_AP1Config5GHz            = AP1Config5GHz;
            this.m_AP2Config24GHz           = AP2Config24GHz;
            this.m_AP2Config5GHz            = AP2Config5GHz;
            this.m_AssocTestOptions         = AssocTestOptions;

            m_WlanApi = new Wlan();

            m_TestInterface = Helpers.GetWlanInterface(m_WlanApi);

            m_ApConfigClient = Helpers.ConnectToService(m_AssociationConfiguration.ServiceBackChannelAddress);

            m_Routers = Helpers.GetRouterCollection(m_ApConfigClient);
            this.m_DeviceSupports5GHz = RuntimeConfig.DeviceSupports5Ghz;
            m_PowerManager            = new PowerManager();
            m_bIsAccessPointSetup     = false;
        }
Ejemplo n.º 7
0
        public void Associate_OPEN_WPA2_AES() //Sleep/CS and hibernate
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            //AP1 2.4 GHz
            AP1Config24GHz.Auth    = AuthenticationMethod.Open;
            AP1Config24GHz.Cipher  = EncryptionMethod.None;
            AP1Config24GHz.Phy     = PhyType.g;
            AP1Config24GHz.Channel = 1;

            //AP1 5GHz is never used

            //AP2 2.4 GHz
            AP2Config24GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP2Config24GHz.Cipher  = EncryptionMethod.AES;
            AP2Config24GHz.Phy     = PhyType.g;
            AP2Config24GHz.Channel = 11;

            //AP2 5 GHz
            AP2Config5GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP2Config5GHz.Cipher  = EncryptionMethod.AES;
            AP2Config5GHz.Phy     = PhyType.n;
            AP2Config5GHz.Channel = 36;

            WhckAssociation.Associate(sConfig,
                                      AP1Config24GHz,
                                      AP1Config5GHz,
                                      AP2Config24GHz,
                                      AP2Config5GHz,
                                      ASSOC_TEST_OPTIONS.Sleep | ASSOC_TEST_OPTIONS.Hibernate);
        }
Ejemplo n.º 8
0
        public static void Scan(RunTimeConfiguration rc,
                                APConfigParameter AP1Config24GHz,
                                APConfigParameter AP1Config5GHz,
                                APConfigParameter AP2Config24GHz,
                                APConfigParameter AP2Config5GHz,
                                SCAN_TEST_OPTIONS ScanTestOptions
                                )
        {
            TraceProvider traceProvider = new TraceProvider("ScanDriver");

            using (UsingGroup g = new UsingGroup())
            {
                traceProvider.TraceInformation("Scanning Scenarios Configuration ");

                WhckScanning hckScanning = new WhckScanning(rc,
                                                            AP1Config24GHz,
                                                            AP1Config5GHz,
                                                            AP2Config24GHz,
                                                            AP2Config5GHz,
                                                            ScanTestOptions);

                g.Add(hckScanning);

                hckScanning.Scan();
            }
        }
        public WhckRoaming(RunTimeConfiguration rc,
                           APConfigParameter AP1Config24GHz,
                           APConfigParameter AP1Config5GHz,
                           APConfigParameter AP2Config24GHz,
                           APConfigParameter AP2Config5GHz,
                           ROAM_TEST_OPTIONS RoamTestOptions)
        {
            if (rc == null)
            {
                throw new ArgumentNullException("rc");
            }
            traceProvider = new WlanHckTestLogger("WhckRoaming");

            this.RoamingConfiguration = rc;
            this.m_AP1Config24GHz     = AP1Config24GHz;
            this.m_AP1Config5GHz      = AP1Config5GHz;
            this.m_AP2Config24GHz     = AP2Config24GHz;
            this.m_AP2Config5GHz      = AP2Config5GHz;
            this.m_RoamTestOptions    = RoamTestOptions;

            Api = new Wlan();

            TestInterface = Helpers.GetWlanInterface(Api);
            AC            = Helpers.ConnectToService(RoamingConfiguration.ServiceBackChannelAddress);

            routers            = Helpers.GetRouterCollection(AC);
            AccessPointSetup   = false;
            DeviceSupports5Ghz = rc.DeviceSupports5Ghz;
        }
Ejemplo n.º 10
0
        public void Roam_OPEN_NONE()    // Public Wi-Fi AP's
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            AP1Config24GHz.Auth    = AuthenticationMethod.Open;
            AP1Config24GHz.Cipher  = EncryptionMethod.None;
            AP1Config24GHz.Phy     = PhyType.g;
            AP1Config24GHz.Channel = 5;

            AP1Config5GHz.Auth    = AuthenticationMethod.Open;
            AP1Config5GHz.Cipher  = EncryptionMethod.None;
            AP1Config5GHz.Phy     = PhyType.a;
            AP1Config5GHz.Channel = 36;

            AP2Config24GHz.Auth    = AuthenticationMethod.Open;
            AP2Config24GHz.Cipher  = EncryptionMethod.None;
            AP2Config24GHz.Phy     = PhyType.g;
            AP2Config24GHz.Channel = 11;

            AP2Config5GHz.Auth    = AuthenticationMethod.Open;
            AP2Config5GHz.Cipher  = EncryptionMethod.None;
            AP2Config5GHz.Phy     = PhyType.n;
            AP2Config5GHz.Channel = 44;

            WhckRoaming.Roam(sConfig,
                             AP1Config24GHz,
                             AP1Config5GHz,
                             AP2Config24GHz,
                             AP2Config5GHz,
                             ROAM_TEST_OPTIONS.SuddenLossOfSignal | ROAM_TEST_OPTIONS.SuddenDropOfSignal);
        }
Ejemplo n.º 11
0
        public void Roam_Custom()     // Custom
        {
            bool bParameterSpecified = true;
            ROAM_TEST_OPTIONS customOptions;

            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            bParameterSpecified = AP1Config24GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP1Config5GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP2Config24GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;
            bParameterSpecified = AP2Config5GHz.Load(sConfig.TaefTestContext) && bParameterSpecified;

            if (!bParameterSpecified)
            {
                // No parameters specified. Dont run the test
                return;
            }

            customOptions = (ROAM_TEST_OPTIONS)sConfig.WlanTestOptions;
            if (customOptions == 0)
            {
                customOptions = ROAM_TEST_OPTIONS.SuddenLossOfSignal;
            }

            WhckRoaming.Roam(sConfig,
                             AP1Config24GHz,
                             AP1Config5GHz,
                             AP2Config24GHz,
                             AP2Config5GHz,
                             customOptions);
        }
Ejemplo n.º 12
0
        public static void Associate(RunTimeConfiguration rc,
                                     APConfigParameter AP1Config24GHz,
                                     APConfigParameter AP1Config5GHz,
                                     APConfigParameter AP2Config24GHz,
                                     APConfigParameter AP2Config5GHz,
                                     ASSOC_TEST_OPTIONS AssocTestOptions)
        {
            WlanHckTestLogger traceProvider = new WlanHckTestLogger("Associate Driver");

            using (UsingGroup g = new UsingGroup())
            {
                try
                {
                    traceProvider.LogComment("Association Scenarios Begin");

                    WhckAssociation hckAssociation = new WhckAssociation(rc,
                                                                         AP1Config24GHz,
                                                                         AP1Config5GHz,
                                                                         AP2Config24GHz,
                                                                         AP2Config5GHz,
                                                                         AssocTestOptions);

                    g.Add(hckAssociation);

                    //Basic Association AP1 2.4GHz -> AP2 5 GHz (2.4 GHz if 5 not supported), no sleep
                    hckAssociation.BasicAssociationTest();

                    //If requested perform advanced association tests
                    if (AssocTestOptions.HasFlag(ASSOC_TEST_OPTIONS.Sleep) || AssocTestOptions.HasFlag(ASSOC_TEST_OPTIONS.Hibernate))
                    {
                        hckAssociation.AdvancedAssociationTests();
                    }
                }
                catch (Exception e)
                {
                    traceProvider.LogError("Error - " + e.Message);
                    throw;
                }
                finally
                {
                    traceProvider.Flush();
                }
            }
        }
Ejemplo n.º 13
0
        public void Associate_WPA2_PSK_PEAP_AES()
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            //AP1 2.4 GHz
            AP1Config24GHz.Auth    = AuthenticationMethod.WPA2Personal;
            AP1Config24GHz.Cipher  = EncryptionMethod.AES;
            AP1Config24GHz.Phy     = PhyType.n;
            AP1Config24GHz.Channel = 6;

            //AP1 5GHz is never used

            //AP2 2.4 GHz
            AP2Config24GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP2Config24GHz.Cipher  = EncryptionMethod.AES;
            AP2Config24GHz.Phy     = PhyType.n;
            AP2Config24GHz.Channel = 11;

            //AP2 5 GHz
            AP2Config5GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP2Config5GHz.Cipher  = EncryptionMethod.AES;
            AP2Config5GHz.Phy     = PhyType.a;
            AP2Config5GHz.Channel = 157;

            //Enterprise on second router.
            AP2Config24GHz.EapPhase1Type = AuthServer8021X.SUPPORTED_PHASE1_TYPE.EAP_PEAP;
            AP2Config24GHz.EapPhase2Type = AuthServer8021X.SUPPORTED_PHASE2_TYPE.EAP_MSCHAPV2;
            AP2Config5GHz.EapPhase1Type  = AuthServer8021X.SUPPORTED_PHASE1_TYPE.EAP_PEAP;
            AP2Config5GHz.EapPhase2Type  = AuthServer8021X.SUPPORTED_PHASE2_TYPE.EAP_MSCHAPV2;

            WhckAssociation.Associate(sConfig,
                                      AP1Config24GHz,
                                      AP1Config5GHz,
                                      AP2Config24GHz,
                                      AP2Config5GHz,
                                      ASSOC_TEST_OPTIONS.None);
        }
Ejemplo n.º 14
0
        public void Associate_OPEN_WEP_WPA_TKIP()
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            //Because WEP is not supported on 5GHz AP1 2.4 needs to be WEP and AP2 (both) needs to be WPA TKIP.
            //AP1 5GHz is never used

            //AP1 2.4 GHz
            AP1Config24GHz.Auth     = AuthenticationMethod.Open;
            AP1Config24GHz.Cipher   = EncryptionMethod.WEP40;
            AP1Config24GHz.Phy      = PhyType.b;
            AP1Config24GHz.Channel  = 1;
            AP1Config24GHz.IsHidden = true;

            //AP1 5 GHz is not used.

            //AP2 2.4 GHz
            AP2Config24GHz.Auth    = AuthenticationMethod.WPAPersonal;
            AP2Config24GHz.Cipher  = EncryptionMethod.TKIP;
            AP2Config24GHz.Phy     = PhyType.g;
            AP2Config24GHz.Channel = 11;

            //AP2 5 GHz
            AP2Config5GHz.Auth    = AuthenticationMethod.WPAPersonal;
            AP2Config5GHz.Cipher  = EncryptionMethod.TKIP;
            AP2Config5GHz.Phy     = PhyType.a;
            AP2Config5GHz.Channel = 36;

            WhckAssociation.Associate(sConfig,
                                      AP1Config24GHz,
                                      AP1Config5GHz,
                                      AP2Config24GHz,
                                      AP2Config5GHz,
                                      ASSOC_TEST_OPTIONS.None);
        }
Ejemplo n.º 15
0
        public WhckScanning(RunTimeConfiguration rc,
                            APConfigParameter AP1Config24GHz,
                            APConfigParameter AP1Config5GHz,
                            APConfigParameter AP2Config24GHz,
                            APConfigParameter AP2Config5GHz,
                            SCAN_TEST_OPTIONS ScanTestOptions)
        {
            if (rc == null)
            {
                throw new ArgumentNullException("rc");
            }
            traceProvider = new TraceProvider("WhckScanning");
            this.ScanningConfiguration = rc;
            this.m_AP1Config24GHz      = AP1Config24GHz;
            this.m_AP1Config5GHz       = AP1Config5GHz;
            this.m_AP2Config24GHz      = AP2Config24GHz;
            this.m_AP2Config5GHz       = AP2Config5GHz;
            this.m_ScanTestOptions     = ScanTestOptions;

            Api = new Wlan();


            TestInterface = Helpers.GetWlanInterface(Api);
            AC            = null;
            AC            = Helpers.ConnectToService(ScanningConfiguration.ServiceBackChannelAddress);


            if (AC == null)
            {
                Log("Helpers.ConnectToService failed");
                AC = null;
                throw new Exception("Helpers.ConnectToService failed");
            }

            routers = Helpers.GetRouterCollection(AC);

            AccessPointSetup = false;
        }
Ejemplo n.º 16
0
        public void Roam_WPA2_ENTERPRISE_TTLS_TKIP_AES()    // Enterprise TTLS
        {
            APConfigParameter AP1Config24GHz = new APConfigParameter(0, false);
            APConfigParameter AP1Config5GHz  = new APConfigParameter(0, true);
            APConfigParameter AP2Config24GHz = new APConfigParameter(1, false);
            APConfigParameter AP2Config5GHz  = new APConfigParameter(1, true);

            AP1Config24GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP1Config24GHz.Cipher  = EncryptionMethod.TKIP;
            AP1Config24GHz.Phy     = PhyType.g;
            AP1Config24GHz.Channel = 11;

            // Only first Enterprise AP's settings are used
            AP1Config24GHz.EapPhase1Type = SUPPORTED_PHASE1_TYPE.EAP_TTLS;
            AP1Config24GHz.EapPhase2Type = SUPPORTED_PHASE2_TYPE.EAP_MSCHAPV2;

            AP1Config5GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP1Config5GHz.Cipher  = EncryptionMethod.AES;
            AP1Config5GHz.Phy     = PhyType.a;
            AP1Config5GHz.Channel = 40;

            AP2Config24GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP2Config24GHz.Cipher  = EncryptionMethod.TKIP;
            AP2Config24GHz.Phy     = PhyType.g;
            AP2Config24GHz.Channel = 1;

            AP2Config5GHz.Auth    = AuthenticationMethod.WPA2Enterprise;
            AP2Config5GHz.Cipher  = EncryptionMethod.AES;
            AP2Config5GHz.Phy     = PhyType.n;
            AP2Config5GHz.Channel = 36;

            WhckRoaming.Roam(sConfig,
                             AP1Config24GHz,
                             AP1Config5GHz,
                             AP2Config24GHz,
                             AP2Config5GHz,
                             ROAM_TEST_OPTIONS.SuddenLossOfSignal | ROAM_TEST_OPTIONS.GradualDropOfSignal);
        }
        public static void Roam(RunTimeConfiguration rc,
                                APConfigParameter AP1Config24GHz,
                                APConfigParameter AP1Config5GHz,
                                APConfigParameter AP2Config24GHz,
                                APConfigParameter AP2Config5GHz,
                                ROAM_TEST_OPTIONS RoamTestOptions)
        {
            WlanHckTestLogger traceProvider = new WlanHckTestLogger("RoamingDriver");

            using (UsingGroup g = new UsingGroup())
            {
                traceProvider.LogComment("Roaming Scenarios Begin");

                try
                {
                    WhckRoaming hckRoaming = new WhckRoaming(rc,
                                                             AP1Config24GHz,
                                                             AP1Config5GHz,
                                                             AP2Config24GHz,
                                                             AP2Config5GHz,
                                                             RoamTestOptions);

                    g.Add(hckRoaming);


                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.SuddenLossOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.SuddenLossOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing sudden loss of Signal");
                        hckRoaming.SuddenLossOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }

                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.SuddenDropOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.SuddenDropOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing sudden drop of Signal");
                        hckRoaming.SuddenDropOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }

                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.GradualDropOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.GradualDropOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing gradual drop of Signal");
                        hckRoaming.GradualDropOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }

                    if (RoamTestOptions.HasFlag(ROAM_TEST_OPTIONS.GradualLossOfSignal))
                    {
                        string scenarioName = "Roaming " + ROAM_TEST_OPTIONS.GradualLossOfSignal.ToString();
                        Helpers.LogVariationStart(scenarioName, scenarioName);

                        traceProvider.LogComment("Testing gradual loss of Signal");
                        hckRoaming.GradualLossOfSignal();
                        Helpers.LogVariationStop(scenarioName);
                    }
                }
                catch (Exception e)
                {
                    traceProvider.LogError("Error - " + e.Message);
                    throw;
                }
            }
        }