0

I have a hardware controller that I need to communicate to via serial port. How exactly can I communicate with that port using my keyboard as input.

The serial runs on 19200 baudrate, 7 bytesize, and 1 stopbit

1
  • Which tty is mapped to your serial port?
    – 111---
    Commented Jun 30, 2015 at 21:13

2 Answers 2

1

Although minicom(1) and screen(1), as proposed by Marco d'Itri, will both work, neither one lets you talk directly to the serial port. Both of them implement their own VT100-style terminal emulation. Since both of them run inside terminals already, this means that they both interpret terminal emulation escape codes to maintain their idea of a virtual screen, then emit new escape codes sent toward the real terminal (e.g. X11 terminal emulator), which in turn interprets them and draws its idea of the screen contents in your terminal. screen does this because its primary job is not to connect to serial ports but to implement a virtual terminal with different detachable windows. minicom does this for no good reason.

For a solution that directly talks to the serial port, that is, it simply passes bytes back and forth between your terminal and the serial port, have a look at cu(1).

0

The sensible way is to use a terminal emulator like minicom(1), which will allow you to easily configure the serial port parameters.

Good old screen(1) will work as well, but you will have to manually configure the serial port parameters using stty(1): section 13.2 "Using Exec" of the manual explains how to do this.

1
  • Neither minicom nor screen connect you directly to the serial port as requested by the OP.
    – Celada
    Commented Jul 1, 2015 at 2:35

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