README: sample-external

This is a simple example demonstrating use of a SeaMAC device in External Sync
mode.  This sample consists of two applications: a sender and a receiver.  The
applications expect to be given the device ids of two SeaMAC serial ports
connected together by a null modem.  The sending port must also have its 
TELEMENT clock routed to the TXCLK and RXCLK pins of the receiver.  It is also
necessary to route the sender's RTS or DTR signals to the receiver's CTS pin.

This example is limited by the nature of SeaMAC device's External Sync mode.
SeaMAC devices do not have built-in support for transmit external 
synchronization, but can mimic the desired behavior by toggling modem control
signals.  The time delay between changing these signals and sending data
can be very great and therefore there is no way to properly synchronize
communications between two SeaMAC devices using external sync mode without
specialized external circuitry.

Due to these limitations, this example application reads a specified number of
data bytes after detecting a high to low transition on the SYNC (CTS) pin.
Alternatively, synchronization can be triggered internally by using RTS.
Since this application demonstrates the use of a seperate SeaMAC device using
modem control signals as the sync trigger, character synchronization is very
poor.  A great deal of line noise will be capture by the receiver, and when the
data is captured it will almost inevitably violate character boundaries.

The receive application should be started before the send application.  The
first argument for each sample is the SeaMAC serial port desired to preform
the operations on.  The receiver can also set the number of bytes to capture
after detecting the external synchronization signal.  The send application can 
optionally take one more argument: message size.

$ receive-mono /dev/ttySM1 256
$ send-mono /dev/ttySM0 8

Received data is captured to the file "data" in the directory from which the 
receive application is run.  The message(s) sent by the send application 
consist of the specified number of data bytes cycling through all printable 
ASCII characters.

Note:  Because this application uses the standard N_TTY line discipline received
data will be returned to the user in chunks. 
