Serial RS232 connection in DOS dosemu

Submitted by fabio on Thu, 2008-05-08 13:49.

Recently I had to play with serial RS232 connections in order to control a robot we have here in the Robotics course at the ULPGC.

We have some pretty old (1989!!!) applications to control and configure the robots which used to run under DOS. I tried to run them under dosemu: unfortunately it didn't work. Maybe because the code the applications use is not really good (direct access to the hardware, incorrect driver usage etc..).

However I can confirm that serial communication in dosemu works.

You just have to correctly configure it: edit your ~/.dosemurc file and add a line to point the COMM1 port to the device file which represents your serial port under linux.

As an example: I use a pl2303 USB-to-serial converter which is represented under Linux as /dev/ttyUSB1. Then my .dosemurc file has this line:

$_com1 = "/dev/ttyUSB1"

To test that everything works as expected you can start dosemu (always check the log in .dosemu and it's outputs) then use the command:

echo HELLO > com1

If everything is setup correctly the HELLO characters will be sent by dosemu to the serial device connected.

Unfortunately, as I already said, this does not guarantee that your dos application using serial communication will work as it might contains unsupported serial communication procedure which might let everything fails.

Anyway .. you can give it a try.

Thanks for information, and a question . . .

Submitted by Richard (not verified) on Mon, 2011-11-14 06:42.

Hello Fabio,

I used what you posted to get dosemu communicating through the loopback to a GTK terminal.

Now I am stuck trying to get the DOS application -- and yes, like the apps you were talking about, it is from 1989.

Here is what I am thinking: While the USB-to-serial converter handles the signaling from my laptop to the serial device, that does nothing to help upstream where the DOS app is looking for a serial port under COMX and instead finds something strange at COMX -- i.e., finds itself in USB-land.

Basically, it seems for this to work I must find or write some kind of virtual serial port that will then translate the output to USB and send it to ttyUSBX.

Do you have any ideas or comments?

Thanks!

Richard

When I was using this stuff,

Submitted by fabio on Mon, 2011-11-14 15:36.

When I was using this stuff, the USB to serial conversion was taken care by the Linux side.. the DOS would see it as a simple serial interface.. So, I actually didn't had to do anything that complex.

Post new comment

The content of this field is kept private and will not be shown publicly.
If you have a personal or company website insert its address in the form http://www.example.com/ .
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <pre> <del> <img> <h2> <h3> <h4> <b> <video> <sub> <sup>
  • Lines and paragraphs break automatically.
  • Images can be added to this post.
  • You may use [inline:xx] tags to display uploaded files or images inline.
  • You may insert videos with [video:URL]
  • Each email address will be obfuscated in a human readable fashion or (if JavaScript is enabled) replaced with a spamproof clickable link.

More information about formatting options