confusion with -O pipe and -I 'keystrokes' option in dosemu
Hi,
I have this legacy application (Rockwell Tripfax), which is a data collector collecting data via serial port from 'blackboxes' on board heavy vehicles. I managed to get this working under dosemu on a SuSE Linux V9.2 machine. The installed DOS is MS-DOS V6.0. The application works nicely when started up interactively.
The application has virtually two modes, the 'data collection' mode and a 'database maintenance' mode, which is selected via a menu.
I would like to control the application via external bash scripts, i.e. users can connect via ssh to the system and the take control; after they exit the application, the script puts the application back into 'data collection mode' automatically.
I explored two ways of achieving this, with the -I 'keystroke' option and via -O namedpipe. Neither of them I could get to work.
Here is what I did for the -I 'keystrokes' option. The key sequence required is
\tfx\pro<enter>
SCDPVF<enter>
<down>
<enter>
<enter>
<any key>
<esc>
<esc>
<esc>
Q
exitemu<enter>
I used the following string as keystrokes
\\tfx\\pro\rSCDPVF\r\r\r\ra\^[\^[\^[Qexitemu\r
This actually starts the application and navigates throught the menus correctly up to the point where a 'special character' is required, i.e. <esc>, <enter>, <down> etc. where nothing more happens. So I presume that the escape sequences I use are incorrect, because when these get entered interactively, the application responds.
In dosemu.conf, I have the following entries:
$_layout = "us"
$_escchar = (30)
Strangely, the \r (<enter> works for the command line, but not for the application. Where do I go wrong? and what would be the escape sequence for the <arrow down> key?
When I try to use named pipes, nothing at all happens when keystrokes are sent via the pipe, dosemu obviously swallows these but there is no visible result.
The fifo pipe I created with mkfifo -m 666 filename and then called dosemu the following way:
dosemu -O filename
Where do I go wrong and how do I get this working? I tried the SuSE supplied version of dosemu, dosemu-1.3.2 and dosemu-1.3.2.
Many thanks in advance for any help.
Peter Sutter
SOPAC(WA) Pty Ltd
19 Bebich Drive
Wanneroo WA 6065
Western Australia