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
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
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)
.
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.
minicom
nor screen
connect you directly to the serial port as requested by the OP.
– Celada
Jul 01 '15 at 02:35
tty
is mapped to your serial port? – 111--- Jun 30 '15 at 21:13