#
# Create an object that describes the network configuration of the host PC
network_config = config.WlanExpNetworkConfiguration(
    network=NETWORK, jumbo_frame_support=USE_JUMBO_ETH_FRAMES)

# Create an object that describes the WARP v3 nodes that will be used in this experiment
nodes_config = config.WlanExpNodesConfiguration(
    network_config=network_config, serial_numbers=NODE_SERIAL_LIST)

# Initialize the Nodes
#  This command will fail if any WARP v3 node does not respond
nodes = util.init_nodes(nodes_config, network_config)

print("\nInitialized nodes:")
# Put each node in a known, good state
for node in nodes:
    msg = "    {0} ".format(repr(node))

    print(msg)

print("\n\n")
print("*********************************************************************")
print("Starting interactive console. The initialized wlan_exp node instances")
print(" are stored in the list variable 'nodes', indexed in order of node ID")
print("Example: blink LEDs at node ID 0: 'nodes[0].identify()'")
print("*********************************************************************")
print("\n\n")

# Create Debug prompt
util.debug_here()
示例#2
0
# Create an object that describes the network configuration of the host PC
network_config = config.WlanExpNetworkConfiguration(network=NETWORK,
                                                    jumbo_frame_support=USE_JUMBO_ETH_FRAMES)

# Create an object that describes the WARP v3 nodes that will be used in this experiment
nodes_config   = config.WlanExpNodesConfiguration(network_config=network_config,
                                                  serial_numbers=NODE_SERIAL_LIST)

# Initialize the Nodes
#  This command will fail if any WARP v3 node does not respond
nodes = util.init_nodes(nodes_config, network_config)

print("\nInitialized nodes:")
# Put each node in a known, good state
for node in nodes:
    msg  = "    {0} ".format(repr(node))

    print(msg)

print("\n\n")
print("*********************************************************************")
print("Starting interactive console. The initialized wlan_exp node instances")
print(" are stored in the list variable 'nodes', indexed in order of node ID")
print("Example: blink LEDs at node ID 0: 'nodes[0].identify()'")
print("*********************************************************************")
print("\n\n")

# Create Debug prompt
util.debug_here()

示例#3
0
# Configure the network of nodes
for node in nodes:
    # Set all nodes to be on the same channel
    node.set_channel(CHANNEL)

    # Remove any current association information
    node.disassociate_all()

# Set the network SSID
ssid = n_ap.set_ssid(AP_SSID)
print("AP SSID: '{0}'\n".format(ssid))

# Force the association state between the AP and STA
#  This call inserts the STA into the AP's association table
#   and sets the active BSS at the STA to the AP
n_ap.add_association(n_sta)

# Check that the nodes are associated.
if not n_ap.is_associated(n_sta):
    print("\nERROR: Nodes are not associated.")
    print("    Ensure that the AP and the STA are associated.")
    sys.exit(0)

#-----------------------------------------------------------------------------
# Explore with the network
#-----------------------------------------------------------------------------

# Create Debug prompt
wlan_exp_util.debug_here()
NODE_SERIAL_LIST  = ['W3-a-00001']

#-------------------------------------------------------------------------
#  Initialization
#
# Create an object that describes the network configuration of the host PC
network_config = wlan_exp_config.WlanExpNetworkConfiguration(network=NETWORK)

# Create an object that describes the WARP v3 nodes that will be used in this experiment
nodes_config   = wlan_exp_config.WlanExpNodesConfiguration(network_config=network_config,
                                                           serial_numbers=NODE_SERIAL_LIST)

# Initialize the Nodes
#  This command will fail if either WARP v3 node does not respond
nodes = wlan_exp_util.init_nodes(nodes_config, network_config)

print("\nInitialized nodes:")
# Put each node in a known, good state
for node in nodes:
    msg  = "    {0} ".format(repr(node))

    print(msg)

print("")

# Create Debug prompt
wlan_exp_util.debug_here()