0

I want to list open serial ports in Java but I didn't do it. I'm using jssc and jSerialComm library in Java but SerialPorts is empty.

When I write in terminal sudo dmesg | grep tty, ıt's showing to me tty0 : console [tty0] enabled

Why I dont see ttyS0 ?

DnzDmr
  • 83
  • 2
  • 8

1 Answers1

1

That message you see does not mean you have a serial port, it only means that the kernel messages are directed to a virtual serial port (/dev/tty0). See here for more details.

Based on the output of dmesg on your system I'm afraid you don't have any hardware (real) serial ports. You can either go get a USB-to-serial for a couple of bucks or use socat to create a virtual serial port.

If you do have a hardware serial port then you are most probably facing a hardware or driver problem.

Marcos G.
  • 3,371
  • 2
  • 8
  • 16