explicitly specify python3; add preamble and debouncing to keyboard emulator to suppo...
[goodfet] / client / facedancer-monitor.py
1 #!/usr/bin/env python3
2 #
3 # monitor-test.py
4
5 from serial import Serial, PARITY_NONE
6
7 from Facedancer import *
8
9 sp = Serial("/dev/ttyUSB0", 115200, parity=PARITY_NONE, timeout=1)
10 fd = Facedancer(sp)
11
12 fd.monitor_app.print_info()
13 fd.monitor_app.list_apps()
14
15 res = fd.monitor_app.echo("I am the very model of a modern major general.")
16
17 if res == 0:
18     print("echo failed")
19 else:
20     print("echo succeeded")
21