Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Also, try `screen`

  screen /dev/ttyS0 
  screen /dev/ttyUSB0 115200
You can specify baud rate (defaults to 9600), and a number of other parameters. Some of these are nicely documented at https://www.cyberciti.biz/faq/unix-linux-apple-osx-bsd-scree... if you dislike reading the entire man page for screen(1).


One issue with using screen for these purposes is that it will silently drop \xFF bytes. In my case I was trying to pull an image off of an Arduino or RPI connected camera, and my images would arrive like 99% accurate (mostly correct headers etc) but would not open in any image viewing program. Took a long time before I realized that transferring the data via screen was causing the corruption.


That's somewhat curious. Do you know why screen does anything special with 11111111?


I imagine many will go see if tmux does it as well. Tmux appears to not want that feature: https://github.com/tmux/tmux/issues/1862


whats the advantage over just using something like cu inside a tmux window?

https://man.openbsd.org/cu.1


I agree with the assertion by the tmux maintainers that screen probably shouldn't do it either.


The problem with this, and likely why the post was made in the first place, is screen and many other solutions are basically just a terminal emulator on your existing terminal emulator and may cause problems. screen for instance seems to make snippets I use to resize serial terminals nonfunctional, likely because it does not implement things the same as xterm-like terminals.


If you want neither Minicom nor Screen, and Socat is a bit too minimal, there is dterm[1]

[1] http://www.knossos.net.nz/resources/free-software/dterm


On the other end of the scale, if minicom doesn't have enough features, there's Kermit. Especially handy if you need to script "expect" style functionality over serial. http://www.kermitproject.org/


For a standard serial terminal I also really like the `miniterm.py` script that is included with the PySerial Python package.

    miniterm.py /dev/ttyUSB0 115200
It's just a basic serial terminal but it covers all of my use cases (mostly interfacing with embedded devices).


There's a very nice write up about the socat command line interface here [1] in case anyone is interested.

[1] https://medium.com/@copyconstruct/socat-29453e9fc8a6




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: