1

Unless I'm missing something, there appears to be no simple way in *NIX to read from a serial port directly into a file

I had imagined something as simple as cat /dev/ttyX > file but apparently not

Does anyone know a trick that I'm missing?

1 Answer 1

0

If you're just trying to capture data from a serial port, Minicom might work. I believe it supports logging to a file.

I thought doing a cat /dev/ttySx would work as well...are you sure it's mapped to the proper serial port? Is something else not allowing the device file to be opened? What happens if you just cat the file instead of redirecting it?

3
  • Maybe it is something to do with line-buffering? Dec 21, 2010 at 13:10
  • Strangly, This got sorted by playing with minicom... After HUP and quitting minicom, cat > file works :S Sorry for the time wasted. Dec 21, 2010 at 13:47
  • It could be that the port needed settings reset to defaults or was set in a funny mode. Dec 21, 2010 at 13:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .