Score:3

How do it read message from RS232 port in my computer

cn flag

I have an old computer which has a RS232 male port I have install Ubuntu 20.04 on it.

enter image description here

I have connecting an external device to it I would like to read message from the serial port. Please provide tool or command I can use to read this.

Pilot6 avatar
cn flag
You can use e.g. minicom.
guiverc avatar
cn flag
I used to like `kermit` (`apt-cache search kermit` will show some alternatives), but I've used `minicom` too (and `apt-cache search minicom` shows multiple alternatives too)
user10489 avatar
in flag
pedantic: rs232 doesn't have "messages", it isn't packet based, it is an asynchronous character stream.
Score:2
in flag

Since this is an ubuntu site, here are a few ubuntu packages (install with apt install ) that support serial:

Stand alone programs:

  • gtkterm
  • screen
  • ttylog

Programming libraries:

  • golang-github-tarm-serial-dev (for go)
  • libjssc-java (for java, also libjssc-java-doc)
  • libserial-dev (for c++)
  • python-serial (python pyserial)
  • python3-serial

This list is not exhaustive. It only includes the highlights and most generic serial port use. There are other packages that use the serial port for specific purposes, and programming libraries (like termios and stdio) that are needed to use the serial port but are not specifically for it.

Score:0
tr flag

You can use several programs to communicate with serial devices, you don't say weather you need to connect to a device via terminal or read and write data via a program.

When I need to get a shell or admin a serial device, I use GNU screen. Something like screen /dev/ttyUSB0 19200 to connect to the ttyUSB0 device with a bitrate of 19,200. Screen is well documented and very popular. You can install it with apt install screen

Pragmatically, all languages have libs that enable serial communications. Here's a few;

https://pythonhosted.org/pyserial/ is popular for Python

https://www.npmjs.com/package/serialport-v5 will do the trick for Node

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.