2

I have found tutorials about using minicom to communicate with modems, but none about just listening what data arrives to the serial port of my desktop computer.

I will ask for this case scenario:

  • Utilite Pro computer (embedded device like RaspBerry that includes two serial ports).
  • Ubuntu Linux v14.04 on desktop computer. Serial port on /dev/ttyS0.
  • Minicom on desktop computer (Linux) already configured for 115.200 bps, 8 data bits, 1 stop bit, no flow control. This is the configuration of the Utilite device for its COM port.
  • Serial cable, of course, connected between the Utilite computer and the desktop computer. This serial cable is included in the original box of the device (I don't know if it is null-modem, but I presume it should be the appropriate one).

It is supposed that the Utilite Pro starts outputing diagnose data to its COM port at the moment it starts running.

How can I read this data using minicom?

Both data on screen and to file methods if possible, please.

ADDITIONAL DATA:

  • The Utilite operating system is not relevant here, as long as it is its bootloader (U-Boot) who sends the data to serial port. Even if the Utilite does not boot, the data will be sent to COM port.
  • Won't it be "listening" by default and show you onscreen whatever comes over the serial port after you simply start it? But by the way you don't really need anything like minicom for this, you just need cat and stty. – Celada Sep 13 '15 at 22:04
  • I don't know, @Celada, I have never used minicom. Just starting it doing # minicom shows only the main screen. Maybe my Utilite device is damaged and sends no output to COM1. So I was wanting to ask about the proper method. – Sopalajo de Arrierez Sep 13 '15 at 22:17
1

By default minicom listens for serial data on /dev/modem, this is typically a symlink to the first serial TTY. Sometimes the first serial TTY is not the hardware DB9 port. So the first thing you need to know is which serial TTY your Utilite device is connected to. The easiest way to do that would be run:

for $dev in $(ls /dev/ttyS*); do
  temp=$(mktemp)
  echo $temp
  echo $dev >$temp
  cat $dev >>$temp &
done

Then boot your Utilite device. This will dump the stream from the TTY port to one of the temp files listed in that scripts output. Check each temp file to determine which port you need to configure minicom to use. You can then start minicom with the "-D" option followed by the device. Provided the speed and flow control settings are appropriate, as you say, you should then see the output from your device stream in minicom.

  • I use to detect COM port with dmesg | grep "tty" -i . Is not valid that method? – Sopalajo de Arrierez Sep 14 '15 at 8:22
  • I think that will list all serial ports available, I don't believe that will tell you which one your device is listening on, assuming your machine has more than one. – smokes2345 Sep 19 '15 at 16:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.