How can I monitor data on a serial port in Linux?

前端 未结 5 1353
忘掉有多难
忘掉有多难 2021-01-30 14:07

I\'m debugging communications with a serial device, and I need to see all the data flowing both directions.

It seems like this should be easy on Linux, where the serial

5条回答
  •  无人及你
    2021-01-30 14:47

    I looked at a lot of serial sniffers. All of them are based on the idea of making a virtual serial port and sniff data from that port. However, any baud/parity/flow changes will break connection.

    So, I wrote my own sniffer :). Most of the serial ports now are just USB-to-serial converters. My sniffer collects data from USB through debugfs, parse it and output to the console. Also any baudrate changes, flow control, line events, and serial errors are also recorded. The project is in the early stage of development and for now, only FTDI is supported.

    http://code.google.com/p/uscmon/

提交回复
热议问题