예제 #1
0
    def setUpClass(cls):
        # Check and clean up wpantund process if any left over
        process_cleanup.ps_cleanup()

        cls.hardwareSelect()

        for device in cls.routers + cls.children + cls.ed[1:]:
            cls.add_test_device(device)

        for d in cls.device_list:
            d.set_logger(cls.logger)
            d.set_up()

        total_networks = NUM_ROUTERS
        cls.network_data_list = []

        for i in range(total_networks):
            cls.network_data_list.append(
                WpanCredentials(
                    network_name="SILK-{0:04X}".format(
                        random.randint(0, 0xffff)),
                    psk="00112233445566778899aabbccdd{0:04x}".format(
                        random.randint(0, 0xffff)),
                    channel=random.randint(11, 25),
                    fabric_id="{0:06x}dead".format(random.randint(0,
                                                                  0xffffff))))

        cls.thread_sniffer_init(cls.network_data_list[0].channel)
예제 #2
0
    def setUpClass(cls):
        # Check and clean up wpantund process if any left over
        process_cleanup.ps_cleanup()

        cls.hardwareSelect()

        cls.add_test_device(cls.router)

        for d in cls.device_list:
            d.set_logger(cls.logger)
            d.set_up()

        cls.network_data = WpanCredentials(
            network_name="SILK-{0:04X}".format(random.randint(0, 0xffff)),
            psk="00112233445566778899aabbccdd{0:04x}".format(
                random.randint(0, 0xffff)),
            channel=random.randint(11, 25),
            fabric_id="{0:06x}dead".format(random.randint(0, 0xffffff)))