A first trial:
- the Linino puts random characters using key1 (then waits 3 seconds)
- the Sketch side gets on key1, and puts the same message on key2 (should happen in the 3 seconds)
- the Linino gets on key2 and compares with what it had put on key1. If OK, it restarts with a longer message. If it fails it tries another get.
At a message length of 266 (always that length) it seems to FAIL:
Trying length 262
put AZORBF9S9C8E1V2YR531TS4GOFRN5YHOLCI5T7KAP1E6SLVH3UPK4SVABTLB7RC80JTCHBPEZHK5ZFE183G5GMHHD552DUBTKJD2PPTU5VANVBHFANI01SIDCEK2PN88REU7V0RJX0T0PS8JPDJX988PBF78Y37XYWHHBOL0FGCZ7AXJPXFKF0MKUH5I2EN89EAN1I9NPWEYVKB5DWCL7NWKTDBDXHQ62MCOOHP348SGNO2J5LPHW8TFVAW9E913T9UGN7
got AZORBF9S9C8E1V2YR531TS4GOFRN5YHOLCI5T7KAP1E6SLVH3UPK4SVABTLB7RC80JTCHBPEZHK5ZFE183G5GMHHD552DUBTKJD2PPTU5VANVBHFANI01SIDCEK2PN88REU7V0RJX0T0PS8JPDJX988PBF78Y37XYWHHBOL0FGCZ7AXJPXFKF0MKUH5I2EN89EAN1I9NPWEYVKB5DWCL7NWKTDBDXHQ62MCOOHP348SGNO2J5LPHW8TFVAW9E913T9UGN7
OK
Trying length 263
put DA4VIB5FV9B8K669U3POPSNQHO1U8NI3JWLBG1LW9YW9028ME309HHPCGW39ZQZQYJ43TIVN367MIIX8N74RPS45V3TFSBX5ZIQGO8FDTP40B10X7A7CLJ3DOGZMDSHNO6V4WWRN1WHAR3GHA094UQ69OKYN46GENJG77C8E322DC16Q3SOTQ5PWE12QD7LOF450ZU5ZUFTLJZCZCL5TA5MBGUCYIEQS9W02F5KP78NI6L4BJT6QCMG9IHQJIS26M9Z64R0
got DA4VIB5FV9B8K669U3POPSNQHO1U8NI3JWLBG1LW9YW9028ME309HHPCGW39ZQZQYJ43TIVN367MIIX8N74RPS45V3TFSBX5ZIQGO8FDTP40B10X7A7CLJ3DOGZMDSHNO6V4WWRN1WHAR3GHA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23TNQ8229RKFWX3Q27APKLWCLP80IDVH0NNQU4HJF2DPG3RN1EYH3FGUFHDS2SH34JH34TITEPPA9IB7QWXV7AMEMNXBK5NMF91026XV2BE9FS1PQPW93CUY4QDOUA29KI
FAIL
Trying length 262
put AZORBF9S9C8E1V2YR531TS4GOFRN5YHOLCI5T7KAP1E6SLVH3UPK4SVABTLB7RC80JTCHBPEZHK5ZFE183G5GMHHD552DUBTKJD2PPTU5VANVBHFANI01SIDCEK2PN88REU7V0RJX0T0PS8JPDJX988PBF78Y37XYWHHBOL0FGCZ7AXJPXFKF0MKUH5I2EN89EAN1I9NPWEYVKB5DWCL7NWKTDBDXHQ62MCOOHP348SGNO2J5LPHW8TFVAW9E913T9UGN7
got AZORBF9S9C8E1V2YR531TS4GOFRN5YHOLCI5T7KAP1E6SLVH3UPK4SVABTLB7RC80JTCHBPEZHK5ZFE183G5GMHHD552DUBTKJD2PPTU5VANVBHFANI01SIDCEK2PN88REU7V0RJX0T0PS8JPDJX988PBF78Y37XYWHHBOL0FGCZ7AXJPXFKF0MKUH5I2EN89EAN1I9NPWEYVKB5DWCL7NWKTDBDXHQ62MCOOHP348SGNO2J5LPHW8TFVAW9E913T9UGN7
OK
Trying length 263
put DA4VIB5FV9B8K669U3POPSNQHO1U8NI3JWLBG1LW9YW9028ME309HHPCGW39ZQZQYJ43TIVN367MIIX8N74RPS45V3TFSBX5ZIQGO8FDTP40B10X7A7CLJ3DOGZMDSHNO6V4WWRN1WHAR3GHA094UQ69OKYN46GENJG77C8E322DC16Q3SOTQ5PWE12QD7LOF450ZU5ZUFTLJZCZCL5TA5MBGUCYIEQS9W02F5KP78NI6L4BJT6QCMG9IHQJIS26M9Z64R0
got DA4VIB5FV9B8K669U3POPSNQHO1U8NI3JWLBG1LW9YW9028ME309HHPCGW39ZQZQYJ43TIVN367MIIX8N74RPS45V3TFSBX5ZIQGO8FDTP40B10X7A7CLJ3DOGZMDSHNO6V4WWRN1WHAR3GHA094UQ69OKYN46GENJG77C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APKLWCLP80IDVH0NNQU4HJF2DPG3RN1EYH3FGUFHDS2SH34JH34TITEPPA9IB7QWXV7AMEMNXBK5NMF91026XV2BE9FS1PQPW93CUY4QDOUA29KI
FAIL
From that length onwards, I keep on receiving the previous message...did the Arduino side crash??
If I reset the Arduino side, things are ok again.
If I reset the Arduino side, things are ok again.
This is the python script:
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))
sys.path.insert(0, '/usr/lib/python2.7/bridge/')
from bridgeclient import BridgeClient as bridgeclient
bc = bridgeclient()
for x in range(250,300):
myrand = id_generator(x)
print "Trying length",x
print "put", myrand
bc.put('to_slave',myrand)
# wait for identical returned message
while True:
time.sleep(3)
r = bc.get('from_slave')
if r is None:
print "No answer key found yet"
else:
print "got", r
if r==myrand:
print "OK"
break
else:
print "FAIL"
This is the sketch:
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
return ''.join(random.choice(chars) for x in range(size))
sys.path.insert(0, '/usr/lib/python2.7/bridge/')
from bridgeclient import BridgeClient as bridgeclient
bc = bridgeclient()
for x in range(250,300):
myrand = id_generator(x)
print "Trying length",x
print "put", myrand
bc.put('to_slave',myrand)
# wait for identical returned message
while True:
time.sleep(3)
r = bc.get('from_slave')
if r is None:
print "No answer key found yet"
else:
print "got", r
if r==myrand:
print "OK"
break
else:
print "FAIL"
#include <Bridge.h> char value[512]; void setup() { pinMode(12,OUTPUT); Bridge.begin(); } void loop() { Bridge.get("to_slave",value,512); Bridge.put("from_slave",value); delay(100); }
No comments:
Post a Comment