Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2018 02:36:27 +0700
From:      Eugene Grosbein <eugen@grosbein.net>
To:        Alexander Lochmann <alexander.lochmann@tu-dortmund.de>, freebsd-stable@freebsd.org
Subject:   Re: FreeBSD blocks on BOCHS serial port
Message-ID:  <bc8f5df6-e338-a9fd-bdd7-e7e146cbcee7@grosbein.net>
In-Reply-To: <e0c6883a-ed3c-c48e-6821-05d0aa3eb034@tu-dortmund.de>
References:  <e0c6883a-ed3c-c48e-6821-05d0aa3eb034@tu-dortmund.de>

next in thread | previous in thread | raw e-mail | index | archive | help
13.08.2018 20:52, Alexander Lochmann wrote:

> Hi folks!
> 
> We are doing some automatic experiments using FreeBSD running in a
> virtual machine.
> To control the experiment from the outside, we use serial ports to
> communicate with an userspace program.
> The communication via serial does work with QEMU. However, it does not
> work with BOCHS which is our desired emulator.
> Even simple operations like 'echo FOO | tee /dev/ttyu1' or 'cat
> /dev/ttyu1' do not work. Both commands block 'forever'.
> It does not matter whether we use ttyu0 (file backend) or ttyu1 (tcp
> socket).
> I put some debug output in sys/dev/uart/uart_dev_ns8250.c. The output
> suggests that the driver more or less reads and writes to the serial
> ports. At least it does something...
> 
> Do you have any hints how we can further analyze this problem?
> Did anyone came across a similar problem?

This could be modem control line "Carrier Detection" (CD) or flow control problem:
emulators can have distinct default settings for serial ports.

You should not rely on defaults and make sure you disable modem control/CD
either explicitly (using stty(1) etc.) or implicitly by switching to /dev/cuau0
instead of /dev/ttyu0. Flow control settings should match too, for both sides
of virtual port.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bc8f5df6-e338-a9fd-bdd7-e7e146cbcee7>