Added another test of a simpler calling pattern. No IRQ, no dynamic payload or ack packet.

This commit is contained in:
maniacbug
2011-08-02 16:32:21 -07:00
parent a31cafcc88
commit 89180f2844
5 changed files with 543 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
#!/opt/local/bin/python
import sys,serial
def read_until(token):
while 1:
line = ser.readline(None,"\r")
sys.stdout.write(line)
if (line.startswith(token)):
break
return line
ser = serial.Serial(sys.argv[1], 57600, timeout=5, dsrdtr=False, rtscts=False)
read_until("+READY")
ser.write(sys.argv[2])
line = read_until("+OK")
ser.close()
if (line.find("PASS") != -1):
sys.exit(0)
else:
sys.exit(1)