Try changing target.setOutuptLen = 8 to target.output_len = 8. As far as I can tell, setOutputLen and setTextLen are not properties, values, or methods of SimpleSerial.
Hi,
I have a question on this section.It is that how can I receive or send data whose length is larger than 256 like 1024, is there a method to complete this operation directly ?
You’ll need to break it into multiple packets. We do something similar in the Fault201 RSA lab in SimpleSerial v1, except we do it on the target->PC end:
if SS_VER!='SS_VER_2_0':
target.simpleserial_write("1", bytearray())
time.sleep(0.2)
output = target.simpleserial_read_witherrors('r', 48, timeout=10)
if output['valid']:
sig.extend(output['payload'])
target.simpleserial_write("2", bytearray())
time.sleep(0.2)
output = target.simpleserial_read_witherrors('r', 32, timeout=10)
if output['valid']:
sig.extend(output['payload'])
print(sig)
Thanks for your answer!
I have known how to do that, but I saw that the len is set to 48, and when I took a try , 128 is wrong for it.What’s the reason?
The parameter type is uint8_t, it means that it allows value from 0-255, isn’t it?
IIRC we ran into consistency issues with longer packets. There’s a limited serial buffer on the capture board as well and if you overrun that data will be lost. We did increase the size of that buffer between when I wrote the code I posted, so longer data strings will probably work better now.
For SimpleSerialV1, the absolute max for data commands will be 192 data bytes - this is in the target code. SimpleSerialV2 will let you transmit more data, since it’s sent in binary instead of being ASCII encoded.