Am 31.08.2018 um 10:57 schrieb Jiri Slaby:
On 08/31/2018, 10:34 AM, Jiri Slaby wrote:
Heh :D. I wrote and rewrote a lot of pieces in there. And the reason why
You *are* brave! ;-)
we create ports which are not "available" is quite simple. You can use setserial on those /dev nodes to actually configure the port and make it available immediately...
Example:
qemu ... -serial stdio -chardev file,path=/tmp/ser,id=mychr -device isa-serial,iobase=0x1000,chardev=mychr
factory:~ # setserial /dev/ttyS0 /dev/ttyS0, UART: 16550A, Port: 0x03f8, IRQ: 4 factory:~ # setserial /dev/ttyS1 /dev/ttyS1, UART: unknown, Port: 0x02f8, IRQ: 3 factory:~ # echo a > /dev/ttyS1 -bash: echo: write error: Input/output error factory:~ # setserial /dev/ttyS1 port 0x1000 autoconfig factory:~ # echo a > /dev/ttyS1 factory:~ #
And "a" is suddenly in /tmp/ser on the host.
But only if "Hardware" is present. server:~ # ls /dev/ttyS* /dev/ttyS0 /dev/ttyS12 /dev/ttyS16 /dev/ttyS2 /dev/ttyS23 /dev/ttyS27 /dev/ttyS30 /dev/ttyS6 /dev/ttyS1 /dev/ttyS13 /dev/ttyS17 /dev/ttyS20 /dev/ttyS24 /dev/ttyS28 /dev/ttyS31 /dev/ttyS7 /dev/ttyS10 /dev/ttyS14 /dev/ttyS18 /dev/ttyS21 /dev/ttyS25 /dev/ttyS29 /dev/ttyS4 /dev/ttyS8 /dev/ttyS11 /dev/ttyS15 /dev/ttyS19 /dev/ttyS22 /dev/ttyS26 /dev/ttyS3 /dev/ttyS5 /dev/ttyS9 server:~ # setserial -bg /dev/ttyS* /dev/ttyS0 at 0x03f8 (irq = 4) is a 16550A /dev/ttyS1 at 0x02f8 (irq = 3) is a 16550A /dev/ttyS4 at 0x1c90 (irq = 17) is a 16550A server:~ # dmesg|grep ttyS [ 0.396050] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A [ 0.416797] 00:07: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A [ 0.438146] 0000:00:03.3: ttyS4 at I/O 0x1c90 (irq = 17, base_baud = 115200) is a 16550A server:~ # lspci -s 0000:00:03.3 00:03.3 Serial controller: Intel Corporation 4 Series Chipset Serial KT Controller (rev 03) "setserial /dev/ttyS16 port 0x1000 autoconfig" is not going to magically make an additional serial port appear on this machine ;-) -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org