Example #1
0
import wtf
import wtf.node.ap
import wtf.comm
import wtf.node.sta
from wtf.node import PlatformOps

# path to arduino directory... must be changed
IDE = "/home/jacob/dev/arduino_project/MeshableMCU/arduino-1.5.6-r2"
BOARD = "gmc200_dbg"

arduino_comm = wtf.comm.Serial(port="/dev/ttyUSB2", prompt="")
arduino_comm.name = "arduino"
arduino_comm.verbosity = 2

# make zotac-0 hostapd to check that wifi tests are working
sta_ssh = wtf.comm.SSH(ipaddr="zotac-3.local")
sta_ssh.name = "zotac-3"
sta_ssh.verbosity = 2
ops = PlatformOps(sta_ssh)
iface = wtf.node.Iface.create_iface(name="wlan0", driver="ath9k", ops=ops)
sta = wtf.node.ap.Hostapd(sta_ssh, [iface], ops=ops)

wtf.conf = wtf.config("arduino", comm=arduino_comm, nodes=[sta],
        name="arduino mc200 tests", data={'IDE': IDE, 'BOARD': BOARD})
Example #2
0
import wtf
import wtf.node.ap
import wtf.comm
import wtf.node.sta
from wtf.node import PlatformOps

# path to arduino directory... must be changed
IDE = "/home/jacob/dev/arduino_project/MeshableMCU/arduino-1.5.6-r2"

arduino_comm = wtf.comm.Serial(port="/dev/ttyUSB2", prompt="")
arduino_comm.name = "arduino"
arduino_comm.verbosity = 2

# make zotac-0 hostapd to check that wifi tests are working
sta_ssh = wtf.comm.SSH(ipaddr="zotac-3.local")
sta_ssh.name = "zotac-3"
sta_ssh.verbosity = 2
ops = PlatformOps(sta_ssh)
iface = wtf.node.Iface.create_iface(name="wlan0", driver="ath9k", ops=ops)
sta = wtf.node.ap.Hostapd(sta_ssh, [iface], ops=ops)

wtf.conf = wtf.config("arduino", comm=arduino_comm, nodes=[sta],
                      name="arduino mc200 tests", data={'IDE': IDE})
Example #3
0
import wtf.node.ap
import wtf.node.sta
import wtf.comm
import wtf

# I've got an mwl8k dev board on serial port ttyUSB4
mwl8k_comm = wtf.comm.Serial(port="/dev/ttyUSB4", prompt="[root@fedora-arm /]# ")
mwl8k_comm.name = "mwl8k"
mwl8k_comm.verbosity = 2
mwl8k_ap = wtf.node.ap.Hostapd(mwl8k_comm, "wlan0")

# create a configuration for a nearby STA
sta_ssh = wtf.comm.SSH(ipaddr="192.168.1.80")
sta_ssh.name = "STA"
sta_ssh.verbosity = 2
sta = wtf.node.sta.LinuxSTA(sta_ssh, "wlan0")

wtf.conf = wtf.config("ap_sta", nodes=[mwl8k_ap, sta], name="mwl8k as AP")
Example #4
0
import wtf.node.p2p
import wtf.comm
import wtf

p1_comm = wtf.comm.MvdroidSerial(port="/dev/ttyUSB0")
p1_comm.name = "mvdroid-1"
p1_comm.verbosity = 2
p1 = wtf.node.p2p.Mvdroid(p1_comm)

p2_comm = wtf.comm.MvdroidSerial(port="/dev/ttyUSB1")
p2_comm.name = "mvdroid-2"
p2_comm.verbosity = 2
p2 = wtf.node.p2p.Mvdroid(p2_comm)

wtf.conf = wtf.config("mvdroid", nodes=[p1, p2], name="mvdroid p2p tests")
Example #5
0
import wtf

wtf.conf = wtf.config("tshark", nodes=[], name="TSHARK TEST")
Example #6
0
p1_comm = wtf.comm.SSH(ipaddr="192.168.1.80")
ops = wtf.node.PlatformOps(p1_comm)
p1_comm.name = "NODE 1"
p1_comm.verbosity = 2
p1 = wtf.node.p2p.Wpap2p(p1_comm, [wtf.node.Iface.create_iface(name="wlan0",
        driver="ath9k")], path="/root", ops=ops)

p2_comm = wtf.comm.SSH(ipaddr="192.168.1.90")
ops2 = wtf.node.PlatformOps(p2_comm)
p2_comm.name = "NODE 2"
p2_comm.verbosity = 2
p2 = wtf.node.p2p.Wpap2p(p2_comm, [wtf.node.Iface.create_iface(name="wlan0",
        driver="ath9k")], path="/root", ops=ops2)

# Marvell's mvdroid p2p node, which uses wfdd, wfd_cli, and wpa_supplicant is
# also supported.  Create such a node like this:
#p2_comm = wtf.comm.MvdroidSerial(port="/dev/ttyUSB0")
#p2_comm.name = "mvdroid"
#p2_comm.verbosity = 2

# NOTE: the force_driver_reload option to the Mvdroid constructor forces a full
# reload of the underlying driver at node start/stop time instead of node
# init/shutdown time.  Currently, this option must be set to true to prevent
# the state of one test influencing another test.  Clearly, in a real system
# you would not want to reload the drivers for each wifi-direct use case.  So
# this is a bug in mvdroid.  Once it's fixed, we can stop using
# force_driver_reload=True.
#p2 = wtf.node.p2p.Mvdroid(p2_comm, force_driver_reload=True)

wtf.conf = wtf.config("p2p", nodes=[p1, p2], name="wpa supplicant p2p")
Example #7
0
import wtf.node.p2p
import wtf.comm
import wtf

p1_comm = wtf.comm.SSH(ipaddr="192.168.1.80")
p1_comm.name = "NODE 1"
p1_comm.verbosity = 2
p1 = wtf.node.p2p.Wpap2p(p1_comm, "wlan0", path="/root")

p2_comm = wtf.comm.SSH(ipaddr="192.168.1.90")
p2_comm.name = "NODE 2"
p2_comm.verbosity = 2
p2 = wtf.node.p2p.Wpap2p(p2_comm, "wlan0", path="/root")

# Marvell's mvdroid p2p node, which uses wfdd, wfd_cli, and wpa_supplicant is
# also supported.  Create such a node like this:
#p2_comm = wtf.comm.MvdroidSerial(port="/dev/ttyUSB0")
#p2_comm.name = "mvdroid"
#p2_comm.verbosity = 2

# NOTE: the force_driver_reload option to the Mvdroid constructor forces a full
# reload of the underlying driver at node start/stop time instead of node
# init/shutdown time.  Currently, this option must be set to true to prevent
# the state of one test influencing another test.  Clearly, in a real system
# you would not want to reload the drivers for each wifi-direct use case.  So
# this is a bug in mvdroid.  Once it's fixed, we can stop using
# force_driver_reload=True.
#p2 = wtf.node.p2p.Mvdroid(p2_comm, force_driver_reload=True)

wtf.conf = wtf.config("p2p", nodes=[p1, p2], name="wpa supplicant p2p")
Example #8
0
# pre-configured zotac nodes
for n in range(4):
# comms
    z_ssh = wtf.comm.SSH(ipaddr="192.168.3.15" + str(n + 1))
    ops = PlatformOps(z_ssh)
    z_ssh.name = "zotac-" + str(n)
    z_ssh.verbosity = 2

    ifaces = []
    configs = []

# iface + ip
    iface = wtf.node.Iface.create_iface(name="wlan0", driver=driver,
                                        ip="%s.%d" % (subnet, 10 + n),
                                        ops=ops)
    ifaces.append(iface)
# BSS
    configs.append(wtf.node.mesh.MeshConf(
        ssid=meshid, channel=channel, htmode=htmode, iface=ifaces[0]))
    ifaces[-1].conf = configs[-1]

    z = wtf.node.mesh.MeshSTA(z_ssh, ifaces=ifaces, ops=ops)
    z.configs = configs

    zotacs.append(z)

# XXX: decouple testbed description from the specific test suite
wtf.conf = wtf.config("simplemesh", nodes=zotacs,
                      name="simple two zotac mesh throughput test")
Example #9
0
import wtf.node.ap
import wtf.node.sta
import wtf.comm
import wtf

# I've got an mwl8k dev board on serial port ttyUSB4
mwl8k_comm = wtf.comm.Serial(port="/dev/ttyUSB4",
                             prompt="[root@fedora-arm /]# ")
mwl8k_comm.name = "mwl8k"
mwl8k_comm.verbosity = 2
mwl8k_ap = wtf.node.ap.Hostapd(mwl8k_comm, "wlan0")

# create a configuration for a nearby STA
sta_ssh = wtf.comm.SSH(ipaddr="192.168.1.80")
sta_ssh.name = "STA"
sta_ssh.verbosity = 2
sta = wtf.node.sta.LinuxSTA(sta_ssh, "wlan0")

wtf.conf = wtf.config("ap_sta", nodes=[mwl8k_ap, sta], name="mwl8k as AP")
Example #10
0
    ops = PlatformOps(z_ssh)
    z_ssh.name = "zotac-" + str(n)
    z_ssh.verbosity = 2

    ifaces = []
    configs = []

    # iface + ip
    iface = wtf.node.Iface.create_iface(name="wlan0",
                                        driver=driver,
                                        ip="%s.%d" % (subnet, 10 + n),
                                        ops=ops)
    ifaces.append(iface)
    # BSS
    configs.append(
        wtf.node.mesh.MeshConf(ssid=meshid,
                               channel=channel,
                               htmode=htmode,
                               iface=ifaces[0]))
    ifaces[-1].conf = configs[-1]

    z = wtf.node.mesh.MeshSTA(z_ssh, ifaces=ifaces, ops=ops)
    z.configs = configs

    zotacs.append(z)

# XXX: decouple testbed description from the specific test suite
wtf.conf = wtf.config("simplemesh",
                      nodes=zotacs,
                      name="simple two zotac mesh throughput test")
Example #11
0
    # BSS
    configs.append(
        wtf.node.mesh.MeshConf(ssid=meshid,
                               channel=channel,
                               htmode="HT20",
                               iface=ifaces[0]))

    z = wtf.node.mesh.MeshSTA(z_ssh, ifaces=ifaces)
    z.configs = configs

    zotacs.append(z)

# configure your sniffer node here
ssh = wtf.comm.SSH(ipaddr="10.10.10." + str(6))
ssh.name = "sniffer"
ssh.verbosity = 2
ifaces = []
configs = []
ifaces.append(wtf.node.Iface(name="wlan0", driver="ath9k"))
configs.append(
    wtf.node.mesh.MeshConf(channel=channel, htmode="HT20", iface=ifaces[0]))
sniffer = wtf.node.sniffer.SnifferSTA(ssh,
                                      iface="wlan0",
                                      driver="ath9k",
                                      ifaces=ifaces)
sniffer.configs = configs
zotacs.append(sniffer)

# XXX: decouple testbed description from the specific test suite
wtf.conf = wtf.config("mcca", nodes=zotacs, name="zotac mesh")
Example #12
0
    z_ssh.verbosity = 2

# iface + ip
    ifaces.append(wtf.node.Iface(name="wlan0", driver="ath9k", ip="%s.%d" %
                  (subnet, str(10 + n))))
# BSS
    configs.append(wtf.node.mesh.MeshConf(
        ssid=meshid, channel=channel, htmode="HT20", iface=ifaces[0]))

    z = wtf.node.mesh.MeshSTA(z_ssh, ifaces=ifaces)
    z.configs = configs

    zotacs.append(z)

# configure your sniffer node here
ssh = wtf.comm.SSH(ipaddr="10.10.10." + str(6))
ssh.name = "sniffer"
ssh.verbosity = 2
ifaces = []
configs = []
ifaces.append(wtf.node.Iface(name="wlan0", driver="ath9k"))
configs.append(wtf.node.mesh.MeshConf(
    channel=channel, htmode="HT20", iface=ifaces[0]))
sniffer = wtf.node.sniffer.SnifferSTA(
    ssh, iface="wlan0", driver="ath9k", ifaces=ifaces)
sniffer.configs = configs
zotacs.append(sniffer)

# XXX: decouple testbed description from the specific test suite
wtf.conf = wtf.config("mcca", nodes=zotacs, name="zotac mesh")
Example #13
0
import wtf.comm
import wtf

subnet = "192.168.34"
zotacs = []

# pre-configured zotac nodes
for n in range(10, 12):
# comms
    z_ssh = wtf.comm.SSH(ipaddr="10.10.10." + str(n))
    z_ssh.name = "zotac-" + str(n)
    z_ssh.verbosity = 2

    ifaces = []
    configs = []

# iface + ip
    ifaces.append(wtf.node.Iface(name="wlan0", driver="ath9k", ip="%s.%d" %
                  (subnet, str(10 + n))))
# BSS
    configs.append(wtf.node.mesh.MeshConf(ssid="meshpoo",
                   channel=channel, htmode="HT20", iface=ifaces[0]))

    z = wtf.node.mesh.MeshSTA(z_ssh, ifaces=ifaces)
    z.configs = configs

    zotacs.append(z)

# XXX: decouple testbed description from the specific test suite
wtf.conf = wtf.config("11aa", nodes=zotacs, name="11aa mesh")
Example #14
0
# pre-configured zotac nodes
for n in range(10, 12):
    # comms
    z_ssh = wtf.comm.SSH(ipaddr="10.10.10." + str(n))
    z_ssh.name = "zotac-" + str(n)
    z_ssh.verbosity = 2

    ifaces = []
    configs = []

    # iface + ip
    ifaces.append(
        wtf.node.Iface(name="wlan0",
                       driver="ath9k",
                       ip="%s.%d" % (subnet, str(10 + n))))
    # BSS
    configs.append(
        wtf.node.mesh.MeshConf(ssid="meshpoo",
                               channel=channel,
                               htmode="HT20",
                               iface=ifaces[0]))

    z = wtf.node.mesh.MeshSTA(z_ssh, ifaces=ifaces)
    z.configs = configs

    zotacs.append(z)

# XXX: decouple testbed description from the specific test suite
wtf.conf = wtf.config("11aa", nodes=zotacs, name="11aa mesh")