You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ cat script.py
#!/usr/bin/env python
import serial
s = serial.Serial('/dev/ttyUSB0')
s.write(b'\x00\x00\xff\x0a\xff\x00')
$ ./traciex -w foo.file -t /dev/ttyUSB0 ./script.py
tracie: Tracing I/O on Executables
v1.0, released 2020-08-15
Developed by CsokiCraft
tracie is free software; see LICENSE
***tracie v1.0
***Waiting for connection...
***Connected
***tracie v1.0
***Waiting for connection...
***Connected
�
�%
Expected output:
all 6 bytes appear in the output
Actual output:
only 0xff bytes are present:
$ od -xa foo.file
0000000 ffff
del del
0000002
The text was updated successfully, but these errors were encountered:
Very interesting find indeed! I did a little debugging, and it seems that this is in fact the case, no \0 or \n characters are being saved to the trace file. However, I do believe that they are being sent in the named pipes, but they aren't handled properly by the shell builtin echo in traciex (line 14). As I do not know how to make echo behave in a binary-friendly way, I think the only option is to not use traciex, but rather make your own Tracie front-end. All the relevant info can be found in tracie.c, lines 14-20. If I have the time, I may try to re-roll traciex in Python3 or C and that will hopefully fix the issue, but until then, use socat or dd (or something similar that properly handles binary data) to read TRACIE_PIPE_W (/tmp/tracie-pipe-w).
Expected output:
all 6 bytes appear in the output
Actual output:
only
0xff
bytes are present:The text was updated successfully, but these errors were encountered: