npat-efault / picocom

Minimal dumb-terminal emulation program
GNU General Public License v2.0
644 stars 126 forks source link

Enable emap to be processed on the data read from serial before log it. #117

Closed ebecz closed 2 years ago

ebecz commented 4 years ago

I have an equipment that returns line carriage instead of line break, by adjusting the imap I could proper use the terminal, but the log files still was being printed with line carriage corrupting the data.

This path uses the emap to write the received buffer to log in a similar way it does with transmitted buffer.

May be that doesn't make sense. Does anyone knows a better alternative? I've notice the tx log uses the omap, so the log is the raw serial stream - but doing so we loses information when the line carriage happens.

wsakernel commented 2 years ago

I think the log really should be the raw serial stream, i.e. exactly what is sent to the device and what is received from the device. Post-processing the log file should be easy enough (with sed, awk)? Or is there a reason it doesn't work for you?

ebecz commented 2 years ago

I agree with you - makes sense. I misinterpreted the log purpose.