[comp.sys.amiga] Routing to the serial port

noel@uokmax.ecn.uoknor.edu (Bamf) (03/21/90)

    Given a program that just writes to the standard screen, 
(using nothing more than (f)printf's) is there a relativly easy 
way to route this output to the serial port, and conversely to 
get input from the serial port?

    Perhaps through the AUX: port, or something?  Can you just 
open AUX: and read and write from it, or must you do more with 
the serial.device, and send requests, or however its done that 
way?

Thanks,

	Bamf (noel@uokmax.ecn.uoknor.edu)

-- 
/*             "If you were a dragon, I'd give you a straw"
----You want it should sing too?----|       lost.in.the.net.of.it.all
 Dis' claimer, dat claimer, to look | noel@uokmax.ecn.uoknor.edu [129.15.20.2]
 at em', you'd never know the diff. |   "How many oranges in an orangutan?"  */

tell@oscar.cs.unc.edu (Stephen Tell) (03/27/90)

In article <1990Mar21.042202.30263@uokmax.uucp> noel@uokmax.ecn.uoknor.edu (Bamf) writes:
>
>    Given a program that just writes to the standard screen, 
>(using nothing more than (f)printf's) is there a relativly easy 
>way to route this output to the serial port, and conversely to 
>get input from the serial port?

>    Perhaps through the AUX: port, or something?  Can you just 
>open AUX: and read and write from it, or must you do more with 
>the serial.device, and send requests, or however its done that 
>way?

I don't know about AUX:, but I have had good luck using the UUSER:  handler
that comes with the AmigaUUCP1.03d distribution like this.  When reading, you
have to modify your code a bit because it times out and returns an error to
your read() call. (either standard level 1 unbuffered I/O or AmigaDOS Read(),
stdio can be made to work also).  Output is no problem at all.
Note that this isn't what it was meant for, but it does work.  It doesn't
change the port settings, so you have to do that some other way.
I always ran stuff using it out of VT100v29 with the port in shared
mode.

I got a version of kermit working really easily using UUSER:, no fiddling
with serial.device at all.

AmigaUUCP is on one of the fish disks as I recall.   (I FTP'ed it from
somewhere, ucbvax.berkekey.edu, I think.)
--------------------------------------------------------------------
Steve Tell					tell@wsmail.cs.unc.edu
CS Grad Student, UNC Chapel Hill.
Former chief engineer, Duke Union Community Television, Durham, NC.