# how to send ASCII to serial port?



## IcomIC725 (Dec 6, 2011)

Hi,
I need to simulate an equipment setup in which ASCII text is sent to a serial port on one computer and logged to a text file on another computer, via serial connection. I don't know how to send ASCII to the serial port in DOS. Can anyone advise? 
Our low power radio station's computer uses the BeOS operating system, and it has DOSBox installed on it. The EAS equipment that receives and relays emergency alerts has a serial connection that can be used to connect to a computer. The EAS unit sends ASCII text through a serial port so that a computer can receive it and log it to a text. The EAS manufacturer suggests using Windows 95 or higher on the computer and to run Hyperterminal to log the text from the EAS unit. Since the station computer does not have Windows, but instead BeOS, I would like to use it with DOSBox. I don't live near the radio station, so I need to first simulate it using two computers with serial ports and a null modem to see if I can get DOSBox to work the way I need it to under BeOS.


----------



## jimi (Jun 14, 2000)

If i understand what you're asking - you can just print a text file (which would be the output from the EAS equipment) to a serial port (lpt1 ? sound familiar) this will accomplish what you've asked for - send ASCII to a serial port. off the top of my head i'm not sure how to log whats sent though.

welcome!


----------



## IcomIC725 (Dec 6, 2011)

Hi,
Thanks for the reply. Yes, it's just standard text that is sent through the serial port. I think the DOS command would be: "TYPE FILE.TXT > COM1" I need to serially connect two computers. One computer will use the BeOS operating system running DOSBox, and the other one will be strictly DOS. I need to send text directly from the DOS computer to the BeOS computer via a serial connection (with null modem). This is to simulate now what I need to do later at the actual station. The main goal is to write text to a text file on the harddrive under DOS (DOSBox) automatically, using text received from serial port #1.

The manufacturer's suggested setup is a Windows 95 (or higher) computer running Hyperterminal. Serial port 1 is connected with a straight-through serial cable to the serial port of the EAS unit. The EAS unit stays on 24/7 and periodically receives alerts and monthly/weekly tests which it then sends as standard text though the serial port. The Hyperterminal program receives the text and writes it to a text file on the harddrive. This is meant solely for a backup log in case the printer malfunctions, jams, etc. The EAS unit is already connected to a printer for logging, but it does jam occasionally which results in lost logs.

My situation is that the station computer doesn't use Windows, so I can't connect it using the suggested OS/software. The station computer uses the BeOS operating system which recognizes and uses the serial ports. It does have a program similar to Hyperterminal for the sole purpose of serial connections. Unfortunately it won't automatically log the text to a file on the harddrive, which is what I really need. I'm thinking of running DOSBox in BeOS (it works great with several DOS programs I've tried) and experimenting with DOS programs that are used for serial connections to see if I can get it to log text to a file automatically. I recall using something similar years ago when I used DOS machines in Amateur Radio packet; all received data during the day/week/etc. was constantly added to a text file on the harddrive without being required to manually save the text. This is great in the event of a power failure... no lost logs.


----------

