README.rtf
LGDCommunicationKit, Release 1.0 (prerelease)
Examples/SimplePort

Copyright ã 1993, Looking Glass Design, Inc.
All rights reserved.

Project Manager:	Paul Girone
Original Author: 	Mike Gobbi
Creation Date:	June 28, 1993
$Revision: 1.3 $

The SimplePort.app application uses the LGDAppSerialPort object form a connection to the modem.

Execution

Launch the application from the workspace manager and select a device from the pop-up list (choose be one of cufa, cufb, cua, or cub if you are connecting to a modem) and mode.  Click on the open button, and you are connected.  The send button causes the contents of the text field to be sent to the serial device, as well as being echoed to the upper log field.  The poll button will read data from the port and display it in the lower log field, or the auto-poll setting will cause this to happen whenever data is available.  If the bytes switch is set, then the value in the input field is interpreted as an integer, and that byte value is sent to the device.  When you wish to disconnect from the serial device, click close.  Note that this will NOT hang up the modem or disconnect from any remote sites ± it merely breaks the connection between computer and serial port.  To close the connection to the remote site, it is necessary to lower the DTR.

A comment about permissions

If the program reports a connection failure, it is likely that you do not have permission to open the devices.  If this is the case, ask your system administrator to do one of the following:
1.	Set the permissions of the devices to o+w.  This creates a potential security hole, but it provides the most protection against accidentally damaging or altering the system.
2.	Modify the executable to be setuid uucp.  This is an attractive option, since it is likely that any applications written which use the LGDSerialPort object will be running as uucp anyway.  On the other hand, if you create custom programs that run as uucp you take the risk of accidentally damaging files used by uucp.
3.	Change the ownerships of the devices to your username.  This is strongly discouraged, since it will probably cause many unix programs to fail when they are executed.
4.	Execute the self-test as root.  This is strongly discouraged.
We recommend that the first of the four options be used.  For a more detailed discussion of permissions see LGDSerialPort.rtf.