Old Windows and DOS programs working on modern PC USB serial port

You can easily use old Windows and DOS programs under Linux with serial port RS232 USB adapters. Finally, I show you how to identify the filestream if you actually have physical RS232 serial ports on a Linux PC.

Introduction

If you have an old device that uses an RS232 or USB-RS232 connection, and you’re having difficulty getting it to run on your Windows PC due to the old software, you have a chance to get it easily working on your Linux PC using WINE or DOSBox. If you’re not currently running Linux you can use an Ubuntu Live USB stick.

Old program is Windows based:

One-time setup using WINE:

  1. Boot into Ubuntu, in Terminal type

    apt install wine
    
    sudo adduser $(whoami) dialout
    

    Logout and login again.

  2. Plug in your USB-RS232 adapter. Then type in Terminal

    ls /dev/ttyUSB*
    

    It will probably show up as /dev/ttyUSB0

  3. Type in Terminal:

    ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com1
    

    And your device will be available on the COM1 port in WINE.

Old program is DOS-based:

You can use DOSBox on Linux, Mac, or Windows. leave a comment if you want help for DOSBOX on Windows.

DOS program serial port using DOSBox on Linux

Since DOSBox works on Android, I’m curious if the Bluetooth to serial port adapters can be made to work in an analogous way from Android DOSBox.

Identify filestreams of physical serial ports on Linux

This is only for if you’re using a motherboard or plugin card 9-pin / 25-pin RS232/RS485 port. StarTech makes some good PCI cards with 2, 4, or 8 RS232 ports that are Linux-friendly.

apt install setserial
setserial -g /dev/ttyS* | grep -v unknown

Leave a Comment