Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using the serial ports

14 views
Skip to first unread message

Johann 'Myrkraverk' Oskarsson

unread,
Oct 17, 2020, 8:38:33 PM10/17/20
to
Dear c.o.o.m,

I just tried to connect Chessmaster 4000 (running in Win-OS/2) to
another instance over a virtual serial line in VirtualBox, however
it complained it couldn't access the serial port.

How do I make sure the serial driver is loaded, and the com port works
in OS/2 itself?

I am using ArcaOS, as I said in VirtualBox, so I thought this part
would be easy.

I naively tried to fopen( "com1", "r+" ) but this did not work.

What is my next step?

--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk

Marcel Mueller

unread,
Oct 18, 2020, 8:43:59 AM10/18/20
to
Am 18.10.20 um 02:38 schrieb Johann 'Myrkraverk' Oskarsson:
> I just tried to connect Chessmaster 4000 (running in Win-OS/2) to
> another instance over a virtual serial line in VirtualBox, however
> it complained it couldn't access the serial port.

Vou want to communicate over *virtual* serial ports?

Does the software try to access the UART controller directly? This is
not allowed by default for good reasons. But the virtual DOS driver
supports this feature if you enable it by the setting COM_DIRECT_ACCESS.

> How do I make sure the serial driver is loaded, and the com port works
> in OS/2 itself?

AFAIR
DEVICE=\BOOT\COM.SYS ...
see http://www.edm2.com/index.php/COM.SYS

> I am using ArcaOS, as I said in VirtualBox, so I thought this part
> would be easy.
>
> I naively tried to fopen( "com1", "r+" ) but this did not work.

- Have you configured a virtual COM port in VBOX?
- Is the COM.SYS driver loaded. Try /V to get meaningful boot messages.
- Is the VCOM.SYS driver loaded (for DOS emulation)?
- Check for direct hardware access (see above).


Marcel

Johann 'Myrkraverk' Oskarsson

unread,
Oct 19, 2020, 3:26:55 AM10/19/20
to
On 18/10/2020 8:43 pm, Marcel Mueller wrote:
> Am 18.10.20 um 02:38 schrieb Johann 'Myrkraverk' Oskarsson:
>> I just tried to connect Chessmaster 4000 (running in Win-OS/2) to
>> another instance over a virtual serial line in VirtualBox, however
>> it complained it couldn't access the serial port.
>
> Vou want to communicate over *virtual* serial ports?
Yes, I configured the two virtual machines to connect through a named
pipe on the host system.
> Does the software try to access the UART controller directly? This is
> not allowed by default for good reasons. But the virtual DOS driver
> supports this feature if you enable it by the setting COM_DIRECT_ACCESS.
>
>> How do I make sure the serial driver is loaded, and the com port works
>> in OS/2 itself?
>
> AFAIR
> DEVICE=\BOOT\COM.SYS ...
> see http://www.edm2.com/index.php/COM.SYS
Reading now.
>> I am using ArcaOS, as I said in VirtualBox, so I thought this part
>> would be easy.
>>
>> I naively tried to fopen( "com1", "r+" ) but this did not work.
>
> - Have you configured a virtual COM port in VBOX?
Yes, see above.

> - Is the COM.SYS driver loaded. Try /V to get meaningful boot messages.
Afaict, no; a quick grep -i com \config.sys yielded nothing promising;
I'm reading the edm/2 page now.

> - Is the VCOM.SYS driver loaded (for DOS emulation)?
Also negative.

> - Check for direct hardware access (see above).
>
>
> Marcel
Thank you, I'll see if I can load the driver successfully.

Johann 'Myrkraverk' Oskarsson

unread,
Oct 19, 2020, 7:11:58 AM10/19/20
to
I loaded the pscom.sys drivers, for SMB support, though I think in VBox
I don't need it. By fopen( "com1", "r+" )ing on both ends, I have
verified I'm able to send text from one machine to the other, but it
takes quite a few send tries for a single receieve, so I believe there's
more to serial programming than I was aware of.

I've also loaded vcom.sys on both ends, but it does not seem the
Chessmasters are able to talk successfully to each other, and that
can be a bug in Chessmater, Win-os/2, and/or vcom.sys because the
windows session seems to freeze completely.

Marcel Mueller

unread,
Oct 19, 2020, 1:18:23 PM10/19/20
to
Am 19.10.20 um 13:11 schrieb Johann 'Myrkraverk' Oskarsson:
> I loaded the pscom.sys drivers, for SMB support,

SMB-Support?
OS/2 can share COM ports over SMB out of the box using the IBM Peer
Requester.

> though I think in VBox
> I don't need it.  By fopen( "com1", "r+" )ing on both ends, I have
> verified I'm able to send text from one machine to the other, but it
> takes quite a few send tries for a single receieve, so I believe there's
> more to serial programming than I was aware of.
>
> I've also loaded vcom.sys on both ends, but it does not seem the
> Chessmasters are able to talk successfully to each other, and that
> can be a bug in Chessmater, Win-os/2, and/or vcom.sys because the
> windows session seems to freeze completely.

This might be related to your remote COM ports over SMB. VCOM.SYS can
only grant access to /physical/ UART controllers. Basically it acquires
the port from OS/2 in exclusive mode and instead of using it access to
the I/O ports are enabled in the DOS VDM.
Shared COM ports cannot be accessed via direct port I/O.

But emulated COM ports from VBox can be accessed by port I/O.


Marcel

Steven Levine

unread,
Oct 19, 2020, 4:06:59 PM10/19/20
to
On Sun, 18 Oct 2020 00:38:25 UTC, Johann 'Myrkraverk' Oskarsson
<joh...@myrkraverk.invalid> wrote:

HI Johann,

> I naively tried to fopen( "com1", "r+" ) but this did not work.

I recommend you test your serial connection with a terminal program
like ZOC or HyperAccess.

fopen is not a good test for a number of reasons. One is that it is
doing buffered IO, but is not what you want for serial data, which is
typically character oriented and may not be line oriented.

Steven

--
---------------------------------------------------------------------
Steven Levine <ste...@earthlink.bogus.net>
DIY/ArcaOS/Warp etc. www.scoug.com www.arcanoae.com www.warpcave.com
---------------------------------------------------------------------
0 new messages