Re: FreeBSD blocks on BOCHS serial port

2018-08-15 Thread Eugene Grosbein
On 15.08.2018 18:06, Alexander Lochmann 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.

Why don't you initialize ports as you need?
Do not rely on defaults, they happen to change between OS versions.


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: FreeBSD blocks on BOCHS serial port

2018-08-15 Thread Holger Kipp
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]

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.k...@alogis.com   
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  6750 0056 65 | BIC: BELADEBEXXX
Handelsregister | Amtsgericht Berlin-Charlottenburg | HRB 71484 | USt-IdNr. 
DE200428199

On 15. Aug 2018, at 13:08, Alexander Lochmann 
mailto:alexander.lochm...@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 LochmannPGP 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

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: FreeBSD blocks on BOCHS serial port

2018-08-15 Thread Alexander Lochmann
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 LochmannPGP 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



signature.asc
Description: OpenPGP digital signature


Re: FreeBSD blocks on BOCHS serial port

2018-08-15 Thread Alexander Lochmann
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 LochmannPGP 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



signature.asc
Description: OpenPGP digital signature