1

I have used serial device using RS232 communication. I want to check signal of device. When I push its button, I can get Hexa data (After I will say signal). My computer has 4 serial ports (main board: asrock IMB-183), so I want to connect serial to device. When I test the device using USB2SERIAL, I can get the signal with minicom. But when I use serial port, minicom does not work.

I checked the Rx, Tx using Windows (same computer and same device) with serial at terminal program (like highper terminal), I can get the signal. So I think I have problem with Linux together with using serial port.

I checked my BIOS. At SuperI/O I turned on COM port to enable. and I checked group, dialout.

Now I show you status of my computer and device.

 # id
......, 20(dialout), .......

 # cat /proc/tty/driver/serial
serinfo : 1.0 driver revision:
0: uart : 16550A port : 000003F8 irq: 4 tx:0 rx:0 RTS|DTR
1: uart : 16550A port : 000002F8 irq: 3 tx:0 rx:0 RTS|DTR
........

linux 3.13.0-32-generic, Ubuntu 12.04

  • Can you try to catch the device output by using cat /dev/ttyS0 command? The number here is the port number, test it from 0 - 3 if you have 4 ports. – P.-H. Lin Feb 7 '17 at 7:17
  • I check all port to cat/dev/ttyS*, but all port do show anything else. – 오찬민 Feb 7 '17 at 7:39
  • Try screen /dev/ttyS0, you can find more instructions here: Working with the serial console, I would say it's better to check if the serial port works on your system, search "RS-232 loopback". Or if you happen to have a COM-to-COM connector, connect it with another system that has a working serial port and test some simple TX/RX with echo / screen command on them. – P.-H. Lin Feb 7 '17 at 9:28
  • to P.-H. Lin, I checked all hardware included RS-232 loopback at windows. all of port is ok. but when i boot with ubuntu, Serial port dosen't work. But!!!! now I found something that ttyS0 is work. and check echo / cat command is ok. but others not work. – 오찬민 Feb 7 '17 at 11:39
0

As you mentioned that all ports work on Windows but not Ubuntu, maybe you can try to use a newer kernel (A 16.04 / 16.10 LiveUSB will do) to see if it can make other ports work.

Anyway, at least it seems that your ttyS0 is working with echo / cat command. The last thing I can suggest is that if you still can't get any signal from you serial device, try to use stty command to change the baud rate:

sudo stty -F /dev/ttyS0  # Print current setting
sudo stty -F /dev/ttyS0 9600  # Set the baud rate

9600 here should be replaced with the correct baud rate.

More information about stty command can be found here.

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.