1

I am attempting to send a string of serial data from a windows PC using Powershell to a linux machine, I have managed to prove that the data reaches the last point before being connected onto the linux machine. as I am fairly new to the Linux and Ubuntu operating system i was hoping to get some help to show me how i can receive that serial data on a linux machine and begin to log it onto a text file. The serial data being sent from a windows PC using standard RS232 connection. I read some forums that stated I could use 'minicom' to display the received serial data but I have not managed to have any luck with that.

Can you please help?

anonymous2
  • 4,325

1 Answers1

0

This page example how to use minicom

Install minicom

sudo apt-get install minicom

Display Detected System’s Serial Support

dmesg | grep tty

Output will be something like:
[   37.531286] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   37.531841] 00:0b: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[   37.532138] 0000:04:00.3: ttyS1 at I/O 0x1020 (irq = 18) is a 16550A

setserial command

setserial is a program designed to set and/or report the configuration information associated with a serial port. This information includes what I/O port and IRQ a particular serial port is using, and whether or not the break key should be interpreted as the Secure Attention Key, and so on. Just type the following command:

setserial -g /dev/ttyS[0123]

Output:

/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x1020, IRQ: 18
/dev/ttyS2, UART: unknown, Port: 0x03e8, IRQ: 4
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

setserial with -g option help to find out what physical serial ports your Linux box has.

Setup minicom

The -s option use to setup minicom. Type the following command at shell prompt:

minicom -s

Start minicom

minicom

Configure serial port

You need to configure serial port. Use up and down arrows to select menus. Press down and select Serial port setup:

minicom in action

You need to connect your serial device usingcable. Once connected power on device and type minicom command without -s option:

minicom -c on
Yaron
  • 13,453