wiki:802.11/wlan_exp/examples/log_capture_continuous

Version 4 (modified by welsh, 10 years ago) (diff)

--

802.11 Reference Design Experiments Framework: Interactive Log Capture Example

This example of the Experiments Framework provides an interactive script for initializing one WARP v3 node, waiting, then retrieving the node's log and writing it to an HDF5 log file.

This script is ideal for capturing a log file with Tx and Rx events recorded from Wi-Fi clients using the 802.11 Reference Design AP or STA.

To use this script:

  • Setup wlan_exp (see Getting Started for details)
  • Configure one WARP v3 node using the 802.11 Reference Design AP bitstream or 802.11 Reference Design STA bitstream
  • Open the file in a text editor and change the NODE_SERIAL_LIST to match your serial numbers
  • Open a Python shell
  • CD to the Python_Reference/examples/txrx_log directory from the expanded 802.11 Reference design archive
  • Run python log_capture_interactive.py
  • After running this script you can analyze the log file using the wlan_exp log tools. Refer to the txrx_log analysis examples to get started processing your log file.

The script will run until you type either 'q', 'quit' or press 'Ctrl-C' and then write the log file:

Initializing experiment

Reseting the network config for all nodes on subnet 10.0.0.
Initializing W3-a-00006 as Node 0
Initializing the time of all nodes on 10.0.0 to: 0.0
Adding current time to log for nodes on 10.0.0

Run Experiment:

Use 'q' or Ctrl-C to end the experiment.

  NOTE:  In IPython, press return to see status update.

Duration:       472 sec     Log Size:    Node 0      =     731880 bytes     quit

Ending experiment

Writing 733288 bytes of data to log file...
    interactive_capture.hdf5
Done.

Experiment Finished.

NOTE: By default, the script will try to use the file name: interactive_capture.hdf5. You are free to override this behavior on the command line: python log_capture_interactive.py <my_file_name>. This script will write the log file to your current directory.


Source: the script is included in the 802.11 Reference Design archive at Python_Reference/examples/txrx_log/log_capture_ap_interactive.py.