[opensuse] Mysterious serial port (serial8250)
Hi list, Today I needed to do some adjustment work that uses serial communication. I use cutecom for this (and can really recommend it!). However when I started it - nothing happened! It took some 30s, then the window popped up. When I clicked on the serial selection pulldown menu, again everything was dead for half a minute or so. Once I had opened a device it worked normally. Later I ran cutecom through strace and saw that when it hangs, it opens /dev/ttyS0 and closes it. This close seems to hang the whole process. Now the question is: What is this ttyS0!? This is a laptop... OK, it has a docking station, but that doesn't have a (physical) port either. So looking at the journal, I see kernel: Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled kernel: serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A I looked in /proc/interrupts, but 4 isn't listed there. So how do I find out what this is? My search ended up in /sys/devices/platform/serial8250/tty/ttyS0 but I don't really get a clue from what I see there :o The serial8250 driver is built fixed into the kernel, and seems important(?) and disabling not recommended... Can I somehow tell it to ignore that device, whatever it is? My 'solution' at the moment is to chmod /dev/ttyS0 to 600, then at least my cutecom works without hangs. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Monday, 19 February 2018 8:59:09 ACDT Peter Suetterlin wrote:
Hi list,
[...]
My 'solution' at the moment is to chmod /dev/ttyS0 to 600, then at least my cutecom works without hangs.
Check that the user as which you're running your terminal program is a member of the "dialout" group - that should fix the serial port access issue. I think ttyS0 is the default terminal console port (hence the reason why disabling it is not recommended) - but I could be wrong on that. You should also try PuTTY (or qPuTTy if you're using KDE) - it does telnet, ssh and serial but won't open the serial port until you tell it to. It will allow you to modify which serial port you're using before connecting (and thus bypass the timeout issue you're seeing with cutecom). Maybe cutecom also has configuration option (CLI switch or config file) to modify the default serial port? Regards, Rodney. -- ============================================================== Rodney Baker VK5ZTV rodney.baker@iinet.net.au CCNA #CSCO12880208 ============================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Rodney Baker wrote:
On Monday, 19 February 2018 8:59:09 ACDT Peter Suetterlin wrote:
Hi list,
[...]
My 'solution' at the moment is to chmod /dev/ttyS0 to 600, then at least my cutecom works without hangs.
Check that the user as which you're running your terminal program is a member of the "dialout" group - that should fix the serial port access issue.
On the contrary. I am in the dialoiut group, so I *can* open ttyS0 - which causes that timeout on close. What I do is *remove* the permissions for the group (dialout), so cutecom (run as user) cannot open it...
You should also try PuTTY (or qPuTTy if you're using KDE) - it does telnet, ssh and serial but won't open the serial port until you tell it to.
Might be worth a try at least, though I'm not sure. cutecom shortly opens the ports to build a list of (really) available interfaces. I don't really intend to switch away from cutecom - it's too perfect (for my taste - afriend of mine prefers screen for serial communications :D). I have a workaround, but I'd rather know what that serial port is, and why it is messing up on close... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
19.02.2018 01:29, Peter Suetterlin пишет:
Hi list,
Today I needed to do some adjustment work that uses serial communication. I use cutecom for this (and can really recommend it!).
However when I started it - nothing happened! It took some 30s, then the window popped up. When I clicked on the serial selection pulldown menu, again everything was dead for half a minute or so. Once I had opened a device it worked normally.
Later I ran cutecom through strace and saw that when it hangs, it opens /dev/ttyS0 and closes it. This close seems to hang the whole process.
Now the question is: What is this ttyS0!? This is a laptop... OK, it has a docking station, but that doesn't have a (physical) port either.
So looking at the journal, I see kernel: Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled kernel: serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
This looks like actual physical COM port.
I looked in /proc/interrupts, but 4 isn't listed there.
Interrupt is claimed when port is opened.
So how do I find out what this is?
I guess you need to read your motherboard manual or ask on forums where it is discussed. Your motherboard may have some option to disable it in BIOS menu. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Andrei Borzenkov wrote:
19.02.2018 01:29, Peter Suetterlin пишет:
So looking at the journal, I see kernel: Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled kernel: serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
This looks like actual physical COM port.
Yes, also what I thought.
I looked in /proc/interrupts, but 4 isn't listed there.
Interrupt is claimed when port is opened.
Ah, that's why. Thanks.
So how do I find out what this is?
I guess you need to read your motherboard manual or ask on forums where it is discussed. Your motherboard may have some option to disable it in BIOS menu.
Ah - BIOS. Should have thought of that. I remember doing a BIOS update in winter. Because last autumn I had been using cutecom a lot, and didn't have such issues.... I'll search the Lenovo groups then. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Peter Suetterlin wrote:
Ah - BIOS. Should have thought of that. I remember doing a BIOS update in winter. Because last autumn I had been using cutecom a lot, and didn't have such issues....
In case someone's interested: Indeed some of the Lenovo laptops (including mine) have AMT including a serial-over-LAN feature. The update I did in December was to patch the security hole in the Intel ME firmware. As 'thankfully' Lenovo does not supply update software for Linux I had to use a patched winpe bootstick for this. Either the new firmware, or running Windows (had not done that before) exposed this serial port, despite AMT being deactivated (It's switched off in BIOS). So it looks I have to live with this 'port'. I've now created a file /etc/tmpfiles.d/block_AMT_ttyS0.conf: #Type Path Mode UID GID Age Argument z /dev/ttyS0 0600 - - - - to make sure it's as-good-as-not-there.... (not yet sure it works like this, will see after the next boot...) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Peter Suetterlin
-
Rodney Baker