1

I have a problem getting Serial Port working on INTEL NUC DE3815TYBE. I have Debian Wheezy installed with kernel 3.16.0-0.bpo.4-amd64.

When I do:

setserial -g /dev/ttyS*

I get:

/dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4
/dev/ttyS1, UART: 16550A, Port: 0x0000, IRQ: 19
/dev/ttyS2, UART: 16550A, Port: 0x0000, IRQ: 19
/dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3

I can connect to ttyS0 - ttyS2 without any problem but ttyS3 is not working and I am getting this error:

I call command:

stty -F /dev/ttyS3 9600 cs8 cread clocal

I get:

stty: /dev/ttyS3: Input/output error

Any idea how to fix this? I am running the commands as ROOT. I also tried: setserial /dev/ttyS3 irq 3 uart 16550A skip_test but I am getting the same stty: /dev/ttyS3: Input/output error

Output of:

dmesg | grep tty



[    0.000000] console [tty0] enabled
[    0.952559] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    0.953593] 0000:00:1e.3: ttyS1 at MMIO 0xd0810000 (irq = 19, base_baud = 2764800) is a 16550A
[    0.954072] 0000:00:1e.4: ttyS2 at MMIO 0xd080e000 (irq = 19, base_baud = 2764800) is a 16550A
[  27.740208] ttyS2 - failed to request DMA
[  27.746627] ttyS1 - failed to request DMA
[  440.532070] ttyS3: LSR safety check engaged!
[  443.700047] ttyS3: LSR safety check engaged!
[  445.288960] ttyS3: LSR safety check engaged!
[  452.796029] ttyS3: LSR safety check engaged!
[  453.716441] ttyS3: LSR safety check engaged!
[  463.732506] ttyS3: LSR safety check engaged!
[  470.222491] ttyS3: LSR safety check engaged!
[  470.222774] ttyS3: LSR safety check engaged!
[  473.748363] ttyS3: LSR safety check engaged!
[  474.359756] ttyS3: LSR safety check engaged!
[  482.783201] ttyS3: LSR safety check engaged!
[  483.763953] ttyS3: LSR safety check engaged!
[  493.931641] ttyS3: LSR safety check engaged!
[  503.982224] ttyS3: LSR safety check engaged!
[  514.020686] ttyS3: LSR safety check engaged!
[  524.074170] ttyS3: LSR safety check engaged!
[  534.090644] ttyS3: LSR safety check engaged!
[  544.110381] ttyS3: LSR safety check engaged!

lsof /dev/ttyS3 doesn't return anything so it means there is nothing connected to ttyS3 I guess but I am not very skilled with linux so I might be mistaken

Why I can see 4 ttyS* in my Linux but physicaly I have only 2 physical Serial Ports on the board?

2
+100

You state that you have only 2 physical serial port which you detect to ttyS1 and ttyS2. ttyS3 and ttyS4 don't exist; they are exposed, but you have to ignore them. This is simply the way the driver works; it probes what may be a serial port and expose it to you, but you have to verify it is a real serial port because the driver can't be 100% sure. This line:

ttyS3: LSR safety check engaged!

tells you that the serial port ttyS3 is not ready, and in your case it'll never be because it doesn't exist. The driver does its best to correctly detect the serial ports, but sometimes it fails. When that's the case you have to find which interfaces exposed are really connected to the hardware manually which you've already done.

  • OK,but is it possible somehow set manualy /dev/ttyS3, UART: unknown, Port: 0x02e8, IRQ: 3 to be working or not? I also dont get why I can see 4 ttyS* in my Linux but physicaly I have only 2 physical Serial Ports on the board? – Simon Mar 24 '15 at 16:28
  • 1
    Just to understand it correctly. /dev/ttyS1 and /dev/ttyS2 should be those two physical serial ports, right? But what is /dev/ttyS0 then? I can also connect to this one. Is it some virtual serial port? – Simon Mar 25 '15 at 20:55
  • Sorry I wrote ttyS(N) for ttyS(N - 1) ;) Well, I thought I was pretty clear that you have to do some tests in order to be sure which physical port is mapped to which ttyS. Sometimes lspci output can help you if you have a detailled datasheet with your board, but at the end your have to plug something into the serial port nonetheless. – user108045 Mar 25 '15 at 22:48
  • @rafirafi all that should be edits or comments to your previous answer. Couldn't you simply edit one of your answers, so that it has the complete and correct information (to the best of your knowledge)? (Even if you are not allowed to post comments yet, you must be allowed to edit your answers, aren't you?) I see, now the moderators have already converted this to comments and made a bit more order here... – imz -- Ivan Zakharyaschev Mar 25 '15 at 23:35
  • @rafirafi thanks for the answer. I will do some testing and connect something to the serial port. I am sorry for my repeated questions, I wasnt just clear to me how serial port works in linux because I am kind of new to it. I still dont really understand why the driver shows 3 working serial ports instead of 2 but i will test it. thanks – Simon Mar 26 '15 at 12:38

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.