Change maximum input length of simple serial

Dear all,

I was wondering how to change the maximum input size of the simpleserial, which is 64 bytes. Is there any way to modify it?

Many thanks!

which simpleserial are you interested in changing?

The .c files can be found here:

hardware > victims > firmware

simpleserial/simpleserial.c
simpleserial-base/simpleserial-base.c

You should be able to get away with some slightly longer commands, but once you start getting close to the serial buffer limits on the ChipWhisperer (192 bytes, or 96 characters on SSV1), communication stops being reliable.

I don’t think there’s anything in the simpleserial firmware that puts a limit on transmission length. Do you see errors pop up?

Alex

Hi, sorry for the really really late reply!

I know this files locate. I just wander where to set up the maximum bytes the ChipWhisperer Lite can receive from the host.

Sorry for the late reply again! I’m too busy during the past few weeks and couldn’t have time to figure out what the bug is.

The issue is that once the input bytes “p” exceeds 64 bytes, I will get the following timeout warning:
WARNING:ChipWhisperer Scope:Timeout in OpenADC capture(), no trigger seen! Trigger forced, data is invalid. Status: 8b

But I probably need to disable the get_key function seems it takes another 16 bytes. Maybe this is the reason?

You could try changing that, but that shouldn’t transmission length at all. What firmware version are you running? Older firmware had a smaller serial buffer and some issues related to sending incorrect messages. scope.fw_version should tell you the firmware version you’re running.

Alex

My firmware version is 0.11. It seems like the older version but I don’t know how many compatibility issues I will encounter after update. So after the update, the CW-Lite can handle bytes to 192 properly?

Yes, that’s right. 0.11 is very old at this point, so I’d recommend upgrading.

Alex

I will try to update it today. But there is one thing I want to clarify first: If I break down a 128 bytes data into 2 part and each part is 64 bytes. Is it possible to transfer 2 parts separately? Does the CW clear out the buffer before the second input?

[Update] I tried to update the firmware, but it is not successful… Now I cannot use the board at all. I have post another issue here:

I have successfully updated the firmware to 0.30.

However, after I did several experiments, I suddenly got error “OSError: [Errno FPGA Done pin failed to go high, bad bitstream?]”. I am confused again. Is it somehow related to the debugger?

[Update #1] I found that one of the cables connected to the debugger is not tight anymore. If I remove the debugger, the error won’t happen. Will redo the test after strengthen the cable.