new maxusb library
[goodfet] / client / facedancer-monitor.py
diff --git a/client/facedancer-monitor.py b/client/facedancer-monitor.py
new file mode 100755 (executable)
index 0000000..40b9a5e
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+#
+# monitor-test.py
+
+from serial import Serial, PARITY_NONE
+
+from Facedancer import *
+
+sp = Serial("/dev/ttyUSB0", 115200, parity=PARITY_NONE, timeout=1)
+fd = Facedancer(sp)
+
+fd.monitor_app.print_info()
+fd.monitor_app.list_apps()
+
+res = fd.monitor_app.echo("I am the very model of a modern major general.")
+
+if res == 0:
+    print("echo failed")
+else:
+    print("echo succeeded")
+