Serial RS232 connection in DOS dosemu
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 . . .
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,
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