• Using the serial ports

    From Johann 'Myrkraverk' Oskarsson@21:1/5 to All on Sun Oct 18 08:38:25 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Mueller@21:1/5 to All on Sun Oct 18 14:43:58 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johann 'Myrkraverk' Oskarsson@21:1/5 to Marcel Mueller on Mon Oct 19 15:26:47 2020
    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 | email: invalid -> com | www.myrkraverk.com/blog/
    I'm not from the Internet, I just work there. | twitter: @myrkraverk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Johann 'Myrkraverk' Oskarsson@21:1/5 to Johann 'Myrkraverk' Oskarsson on Mon Oct 19 19:11:54 2020
    On 19/10/2020 3:26 pm, Johann 'Myrkraverk' Oskarsson wrote:
    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.


    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.

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Marcel Mueller@21:1/5 to All on Mon Oct 19 19:18:20 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Steven Levine@21:1/5 to johann@myrkraverk.invalid on Mon Oct 19 15:06:53 2020
    On Sun, 18 Oct 2020 00:38:25 UTC, Johann 'Myrkraverk' Oskarsson <johann@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 <steve53@earthlink.bogus.net>
    DIY/ArcaOS/Warp etc. www.scoug.com www.arcanoae.com www.warpcave.com ---------------------------------------------------------------------

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)