Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Aug 2018 11:38:19 +0000
From:      Holger Kipp <Holger.Kipp@alogis.com>
To:        Alexander Lochmann <alexander.lochmann@tu-dortmund.de>
Cc:        Eugene Grosbein <eugen@grosbein.net>, "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: FreeBSD blocks on BOCHS serial port
Message-ID:  <382B489E-F309-4F78-80FC-BFB1C42149A4@alogis.com>
In-Reply-To: <bbf1b72d-577f-c47c-30e3-23e6e59291a3@tu-dortmund.de>
References:  <e0c6883a-ed3c-c48e-6821-05d0aa3eb034@tu-dortmund.de> <bc8f5df6-e338-a9fd-bdd7-e7e146cbcee7@grosbein.net> <661e5d36-6684-fae5-b325-f02ad570f2b4@tu-dortmund.de> <28c22017-7b01-63b0-946a-d0d255af16b2@grosbein.net> <a12a1c5f-cc9f-a875-db30-985ba47a4e56@tu-dortmund.de>, <bbf1b72d-577f-c47c-30e3-23e6e59291a3@tu-dortmund.de>

next in thread | previous in thread | raw e-mail | index | archive | help

Hi Alex,

if serial interfaces are attached via USB, they might not be initialized correctly, because serial interface configuration happens before USB. I encountered this on physical hardware with 8-port USB to RS232.

Simple solution was to change settings using
# stty < /dev/cuaU0.init crtscts -ixon -ixoff
# stty < /dev/cuaU0.lock crtscts ixon ixoff
...
for all eight interfaces after boot completed.

I‘m not sure how serial interfaces are emulated with your VM-environment, though, but maybe your initialization process is just a bit too early?

Best regards,
Holger

Diplom-Mathematiker
Holger Kipp
Senior Consultant
[cid:37690167-0141-447A-9B3E-AC8184A85D11@int1.b.intern]<https://www.alogis.com/>;

Fon:
Fax:
Mobil:
        +49 30 436 58 114
+49 30 436 58 214
+49 178 36 58 114       alogis AG
Alt-Moabit 90 B
10559 Berlin


holger.kipp@alogis.com<mailto:holger.kipp@alogis.com>   www.alogis.com<http://www.alogis.com/>;

alogis AG | Alt-Moabit 90 B | 10559 Berlin | T +49 30 43658-0 | F +49 30 43658-599
Vorstand | Arne Friedrichs, Jörn Samuelson | Aufsichtsratsvorsitzender | Dirk Nedderhoff
Landesbank Berlin | IBAN: DE77 1005 0000 6750 0056 65 | BIC: BELADEBEXXX
Handelsregister | Amtsgericht Berlin-Charlottenburg | HRB 71484 | USt-IdNr. DE200428199

On 15. Aug 2018, at 13:08, Alexander Lochmann <alexander.lochmann@tu-dortmund.de<mailto:alexander.lochmann@tu-dortmund.de>> wrote:

I've to correct myself. It works if I activate the boot console
(console="vidconsole,comconsole").
If I change the mentioned line to console="vidconsole", neither writing
to /dev/ttyu0 nor reading from /dev/cuau1 works.
It seems that the FreeBSD loader initialize the serial ports in a
different way than the OS does.

- Alex

On 15.08.2018 12:46, Alexander Lochmann wrote:
Reading from /dev/cuau1 works. Thank you for your help!
However, I'm pretty sure I tried this device before. Nvm. It works.

- Alex

On 13.08.2018 22:49, Eugene Grosbein wrote:
14.08.2018 3:15, Alexander Lochmann wrote:

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.
Thx. I cannot even run 'stty < /dev/ttyu1' to see the current settings.
It simply blocks...

Use /dev/ttyu1.init to see defaults and /dev/ttyu1.lock to set/show
locked defaults that cannot be changed without disabling a lock first.





--
Technische Universität Dortmund
Alexander Lochmann                PGP key: 0xBC3EF6FD
Otto-Hahn-Str. 16                 phone:  +49.231.7556141
D-44227 Dortmund                  fax:    +49.231.7556116
http://ess.cs.tu-dortmund.de/Staff/al



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?382B489E-F309-4F78-80FC-BFB1C42149A4>