pyecsca.sca.target.simpleserial module¶
Provides an abstract target class communicating using the ChipWhisperer’s SimpleSerial protocol.
- class SimpleSerialMessage(char, data)[source]¶
Bases:
objectA SimpleSerial message consisting of a starting character and a hexadecimal string.
- class SimpleSerialTarget[source]¶
Bases:
SerialTarget,ABCA SimpleSerial-ish target, sends and receives SimpleSerial messages over a serial link.
- abstract read(num=0, timeout=0)[source]¶
Read upto
numbytes or untiltimeoutmilliseconds from the target’s serial output.
- recv_msgs(timeout)[source]¶
Receive
SimpleSerialMessagemessages, while waiting uptotimeoutseconds.- Parameters:
timeout¶ (
int) – How long to wait.- Return type:
Mapping[str,SimpleSerialMessage]- Returns:
The received messages with their char.
- abstract write(data)[source]¶
Write the
databytes to the target’s serial input.- Parameters:
data¶ (
bytes) – The data to write.- Return type:
None
- send_cmd(cmd, timeout)[source]¶
Send a
SimpleSerialMessageand receive the response messages that the command produces, within atimeout.- Parameters:
cmd¶ (
SimpleSerialMessage) – The command message to send.timeout¶ (
int) – The timeout value to wait for the responses.
- Return type:
Mapping[str,SimpleSerialMessage]- Returns:
A mapping of the starting character of the message to the message.