Changes between Initial Version and Version 1 of 802.11/wlan_exp/examples/blink_node_leds


Ignore:
Timestamp:
Apr 10, 2014, 3:06:22 PM (10 years ago)
Author:
murphpo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • 802.11/wlan_exp/examples/blink_node_leds

    v1 v1  
     1{{{#!comment
     2[[Include(wiki:802.11/beta-note)]]
     3}}}
     4
     5[[TracNav(802.11/TOC)]]
     6
     7= 802.11 Reference Design: Blink Node LEDs Example =
     8
     9This example of the Experiments Framework is very simple. It uses a simple Python script to send a broadcast command to all WARP v3 nodes which causes them to blink the hex dispaly LEDs for 5 seconds. This script is a good way to test your Python installation, PC network configuration, nodes configuration and Ethernet connections.
     10
     11'''Source:''' the script is included in the '''Python_Reference''' folder of the 802.11 Reference Design archive. The latest version of the code is also displayed below.
     12
     13To run the script:
     14 * Open a Python shell
     15 * CD to the '''Python_Reference/Examples''' directory
     16 * Run {{{python blink_node_leds.py}}}
     17
     18----
     19
     20{{{#!python
     21
     22"""
     23This script blinks the red LEDs of all nodes to ensure broadcast communication
     24
     25Hardware Setup:
     26 - Requires one or more WARP v3 nodes configured with the 802.11 Reference
     27   Design v0.81 or later.
     28 - PC NIC and ETH B on WARP v3 nodes connected to common gigbit Ethernet switch
     29
     30Required Script Changes:
     31  - Set HOST_INTERFACES to the IP address of your host PC NIC
     32
     33Description:
     34  This script will cause all nodes on each of the host interfaces to
     35blink their LEDs.
     36"""
     37import time
     38import wlan_exp.warpnet.util as wn_util
     39
     40# NOTE: change these values to match your experiment setup
     41HOST_INTERFACES   = ['10.0.0.250']
     42
     43# Issue identify all command
     44#   Wait 1 second before issuing the command to make sure all nodes are ready
     45time.sleep(1)
     46wn_util.wn_identify_all_nodes(HOST_INTERFACES)
     47
     48}}}