6

I am unable to access the serial port on my PC with Ubuntu 12.04.

The command:

dmesg | grep ttyS

Outputs:

[    0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

I think serial port is not getting detected.

Can anyone please help me in solving the problem?

4
  • Please post the output of ls /dev/ttyS*. Did you have any serial device to test the port (i.e. Serial Arduino, printer, serial mouse... etc.)?
    – 0x2b3bfa0
    May 5, 2015 at 15:00
  • /dev/ttyS0 /dev/ttyS14 /dev/ttyS2 /dev/ttyS25 /dev/ttyS30 /dev/ttyS8 /dev/ttyS1 /dev/ttyS15 /dev/ttyS20 /dev/ttyS26 /dev/ttyS31 /dev/ttyS9 /dev/ttyS10 /dev/ttyS16 /dev/ttyS21 /dev/ttyS27 /dev/ttyS4 /dev/ttyS11 /dev/ttyS17 /dev/ttyS22 /dev/ttyS28 /dev/ttyS5 /dev/ttyS12 /dev/ttyS18 /dev/ttyS23 /dev/ttyS29 /dev/ttyS6 /dev/ttyS13 /dev/ttyS19 /dev/ttyS24 /dev/ttyS3 /dev/ttyS7 May 6, 2015 at 10:53
  • this is the output i got when i tried that command May 6, 2015 at 10:53
  • 2
    Can you check that you have access to read and write in ttyS01. In my case ls -l /dev/ttyS0 returns: crw-rw---- 1 root dialout 4, 64 May 8 08:20 /dev/ttyS0 and I can use it with no problems.
    – Harris
    May 8, 2015 at 12:31

1 Answer 1

8
+50
[    0.590705] 00:08: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A

The line above tell us that the kernel detected a 16550 UART chip in your PC, which provides a serial port (ttyS0), and there's some resources allocated to it (0x3f8 I/O address, IRQ 4).

The default permissions for serial devices are the following:

crw-rw---- 1 root dialout ... /dev/ttyS0

So, if you are a member of the dialout group, you'll be able to access (read from/write to) the serial port devices. Add yourself to the dialout group by running:

sudo adduser $USER dialout

Or:

sudo adduser <username> dialout

Then log out and log in again. Now you should have access to the serial port. Of course, you must also input the correct settings (speed, data bits, parity, stop bits, flow control) in the program you're using to access the device.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .