@database TWC.guide
@master "TWC.guide"
@author "Lutz Vieweg"
@(c) "Copyright © 1993 Lutz Vieweg"
@$VER: TWC.guide 1.0 (21-07-93)

@node Main "TWC ]I[  - the ultimate bidirectional transfer tool"

          #########  ###       ###    ######
          #########  ###       ###   ########
            ###     ###  ###  ###  ###    ###
            ###     ###  ###  ###  ###        
           ###     ###  ###  ###  ###           ]I[
           ###     ###  ###  ###  ###         
          ###     ###  ###  ###  ###    ###
          ###     #############   ########
         ###      ###########     ######   by Lutz Vieweg

                  -*- MANUAL -*-

Topics of this manual:
----------------------

 @{"What is TWC?" link Whatis} And why use it?

 @{"Requirements" link Require} - what you need to run TWC
 
 @{"Quickstart" link Quickstart} - try it now!

 @{"CPS-shooting" link CPS} and other nitty-gritty details
 
 @{"Problems" link Problems} and possible solutions

 @{"Copyright" link Copyright} and how to register TWC
 
 @{"Version" link Version} history

 @{"Future" link Future} extensions, just wanna-be's

IMPORTANT NOTE TO ALL WHO HAVE BEEN USING TWC 2.06 BEFORE:
TWC III is not just another version of TWC, it's a complete
rewrite. Not much is the same as before. TWC III is incompatible
to versions < 3.

@endnode

@node Whatis "What is TWC???"

If you've got a modem, you'll sometimes want to exchange data with
others using it. You can do this with many tools, but they all have
their drawbacks. TWC hasn't. :)

Most other communication software is designed for calling "Bulletin-
Board-Systems", this is not what TWC has been made for. TWC is
meant to be the ultimate utility when you want to call another
TWC-user, just to exchange some data and chat with him...

A short list of features TWC provides (don't mind if you don't
understand some of theese, you can benefit from them without knowing)

- Extreme reliability and system-friendlyness
- Full bidirektional transfer of files, chat-text (and soon even more),
  can save you up to 50% time and phone-bill
- High transfer rates, performs well on bad lines, where other protocols
  sucks with permanent resends
- Low CPU-time usage even at high transfer-rates, example: Bidirectional
  transfer at 2200+2200=4400cps on an A3000 takes approx. 11% CPU time
- Comfortable, font-sensitive GUI
- Multi-threaded program structure, asynchronus GUI, disk I/O etc...

@endnode

@node Require "Requirements - what you need to enjoy TWC"

To run TWC you'll need the following things:

- An Amiga running KS 2.04 or newer

- A modem featuring at least one real 'Full Duplex' transmission standard.
  If you don't know whether your modem fits, just try it - most modern
  modems are suitable.
  
  Some bidirectional modulation schemes are:
  V.22, V.22bis, Bell 212A, Bell 103, V.21, V.32, V.32bis, V.32terbo, V.fast
  
  The following modulation methods are definitely _not_ advisable to
  be used with TWC:
  
  V.23, USR HST, Telebit PEP, Telebit PEP+
  
  If you've got a modem which normally uses one of theese,
  make sure to switch to a suitable modulation method with
  your initialisation command.
  
- Your modem has to be connected to your computer with a so-called
  "7-Wire" cable. That means, RTS/CTS handshake has to be possible.
  The "carrier detect" (CD) wire has also to be connected.
  Modern high-speed modems are connected with such cables in general.

@endnode

@node Quickstart "Quickstart - how to make your first connection"

Little things have to be done to enjoy your first connection
with TWC. If you've got a partner on the phone, who also
has a copy of TWC, you might try a real transfer. If you
want to test out TWC alone, you can also do that, just read on.

Start TWC - now. Invokation can be done either by clicking
on the TWC-Icon at the Workbench, or you may start TWC from
a CLI or shell by simply typing "TWC" in the directory where
you have it. If you start TWC from a CLI, and your stack is
too small, a requester will appear and tell you how to
change this. You can give TWC filenames as parameters
either by passing them through the command-line or by
starting TWC with other Icons selected from WorkBench,
they'll be put into the "files-to-send" list on startup.

The first time you start it, TWC will open a 640*256 Hires
screen, with 4 windows on it (the windows may overlap). If
you've got a hardware that supports larger screens than 640*256,
the first thing you should is: Browse through the "Setup" menu,
find the submenu "Screen" and use the commands "Screen Width"
and "Screen Height" there to adjust the size. Another menu-
command, "Display ID" allows you to change the mode of the
screen TWC will open, here are some usual values for this ID:

0x8000 open an ordinary Hires screen
0x8020 open a  super-Hires screen
0x8004 open an interlaced Hires screen
0x8024 open an interlased super-Hires screen

(For more information on further display-id's refer to the
 C= include-file "graphics/displayinfo.h")

All TWC screen-settings apply only at invocation time,
so you should leave TWC now by clicking the "Quit" Gadget,
and starting it again. Whenever you leave TWC, it will
write its settings back to disk, by default to a file
called "TWC_setup" in the same directory where TWC is.
So make sure TWC can write to this directory.

You can always load and save setup-files from within TWC,
and you can also tell TWC to start with an alternative
setup-file by giving the parameter "-s <filename>" in
the command-line.

... click @{"next page" link Setup}

@endnode

@node Setup "Visit the setup-menu"

Once you're satisfied with the screen, you may arrange the windows
at it as you like. Two of them are resizeable - to take advantage
from larger screens...

Remember, all the changes you make are stored in the setup-file
when you leave TWC.

Now visit the setup-menu again, and call each of its commands
one after each other. If you don't know what a certain value
is good for, just leave it as it was by default. There are a
few values where it's likely you will want to make a change:

Modem/ATA-like command: If you've got a modem with the german
  "BTZ" you may have bad luck: Some of them are unable to
  switch from voice to data mode online, so you'll have
  to config your modem to answer an incoming call automatically,
  please refer to the modem's manual

Modem/ATD-like command: Some modems are dropping the line
  soon when you give an ATD command... a solution may be
  using ATX0D instead, but please read your modem's manual
  on this topic when in doubt...

Serial/Baudrate: Adjust this value for your modem. Most modern
  modems support fixed baudrates, 2400, 9600, 19200, 38400 etc. -
  the default value here is 19200 which is suitable for the
  majority of modems nowadays, but you may need to change this,
  for example, if you've got only a lousy 2400bps modem...
  please refer to the manual of your modem.

You may also want to change the default paths for incoming
and outgoing files, but all the other settings are not that
important by now.

... click @{"next page" link Connect}

@endnode

@node Connect "Now establish the connection"

When you've gone through the little setup, you may now
actually make your first connection. When you've got
a partner on the phone-line, he should have started
and setup TWC, too. One of yours should now press the "ATA"-
Gadget, the other one the "ATD"-Gadget. There should
come some strange beeping noise from your modems, then,
and a text like "JUNK> CONNECT 14400" or similar should
soon appear in the status-window. If not, read the chapter
"Problems".

If you don't have a partner on the phone to test TWC,
you may test it all alone. Use the "Modem/Chat" radio
buttons to switch to "Modem" mode. Give your modem
the command to enter "loopback-test-mode", this command
is "AT&T1" at many modems. The modem should then connect
with itself, and everything you send will be mirrored back
to you. This way, you can transfer data to yourself...

Once the connection is established, you can start sending
your partner what you like. Make sure the "Modem/Chat"
radio-buttons indicate "Chat". Just type something on
the keyboard. The text you type should appear in the string
requester at the "Connect-Panel". When you hit the RETURN-
key, the text in the requester is send to your partner.
A copy is also shown in your "Chat History". Messages
from your partner are preceded with a "> " and also shown
in the "Chat History".

Once you've chatted enough, try a file transfer. Just click
the "Add" Gadget in the "TWC Transfer Panel", a file requester
will appear and you can select one or more files to be send.
After you've made your choice, the files you selected will
be listed in the "TWC Transfer Panel". The transfer of those
files to your partner does not immedietly start. It actually
starts when you click the "START" Gadget. Once you've
started the transfer, it will continue until the connection
is closed, or you hit the "ABORT Sending" Gadget. To abort
a transfer that comes from your partner, you may click "ABORT
Reception".

Now try the feature that's the main difference between TWC
and other communication software: You may continue to chat
while you exchange files with your partner, you may select
more files to be send, and file transmission goes in both
directions at the same time which effectively doubles
the transfer-rate.

... click @{"next page" link Funny}

@endnode

@Node Funny "More funny features available"

Here's, in no special order, a list of additional functions
you may use when you're connected:

Connect Panel / Hang Up: Hitting this button drops the DTR
  outlet of your serial port, causing the modem to go on-hook.
  If you modem does not hang up when you click this Gadget,
  please make a change in your modems configuration, refer
  to your modem's manual for more information on the DTR-behaviour.

Connect Panel / Ring Other: If your partner does something
  in the background while you're transferring files, and
  you want him to listen, click the "Ring Other" Gadget.
  The TWC-screen on his computer will then get into front,
  and a "display-beep" announces your call for attention.

Transfer Panel / Delete: Use this button to delete Files from
  the list of files to be send. First click on the name in the
  list, then click the "Delete" Gadget.

Menu "Function" / Send File as Chat: When you're actually
  transferring files to your partner, and you wish to show
  him the contents of some text file, you may use "Send
  File as Chat" to do so. The contents of the file(s)
  you select is send to your partner as if you typed it
  in the the input-line at the "Connect Panel".

Menu "Setup/Misc", Encryption Key: Phone lines are not safe.
  It's sort of easy for other people to spy on your
  communication, and you may not want them to do so. Whether
  you need to keep your data secret or you're just a little
  paranoid doesn't matter, this option allows you to make TWC
  scramble all the data it transfers.
  Your partner has to set exactly the same encryption key to
  enable TWC to unscramble your data. Setting the encryption
  key to an empty string disables scrambling. Of course it's
  nonsense to tell your partner the encryption key on the
  phone that might be spyed... :)
  Data scrambling needs some extra CPU time.

Menu "Setup/Files", Bump Filenames: If enabled, TWC will
  automatically change the name of an incoming file by apending
  a number when a file with the same name and equal or greater
  length already existed.

Menu "Setup/Notification", Warnings until error: A warning
  doesn't mean that the transfer fails. It just reports something
  that would better not be. Errors cause the screen to be "beeped",
  and you can tell TWC to beep the screen also when a certain amount
  of warning were displayed. Just a matter of taste.

Menu "Setup/Notification", On new chat / On end of transfer:
  Theese two setup entries decide whether the screen is brought to
  front when new chat comes in / the last file in the "to-send"
  list has been emitted.

... click @{"next page" link Quit}

@endnode

@node Quit "How to get rid of TWC"

Assumed the inpropable case you want to leave TWC, you've the
choice how to do this: The normal way is clicking the "Quit"
Gadget or the close-Gadget of the "Connect Panel". Everything
is smoothly abandoned, then. A more brutal way to leave TWC
is sending it a BREAK signal, for example by pressing CTRL-C
in the shell or CLI where you started TWC. Well, there should
be little reason to do it the unusual way.

Remember, unless you've registered TWC, TWC will automatically
quit after approx. 20 minutes.

If you start a file transfer with TWC, and the receiver has
already a file of that name, which is shorter than your's,
TWC will assume you want to resume a former interrupted
transfer. 

@endnode

@node CPS "CPS shooting other nitty-gritty details"

The key to achive the highest possible transfer-rates
is knowledge of your modem, your system and the setup
options of TWC. The first two things I cannot give you.
It's up to you to read your modem's manual. Dot the i's
and cross the t's, it's worth it. It's also up to you
to learn more about your system, this is never a waste
of time.

What can be discussed here are the possible adjustments
to TWC's setup. Here's a point-by-point discussion of
the interesting commands in the "Setup" menu:

Baudrate: Choosing the optimal baudrate to your modem
  is one of the more easy things: The higher, the better.
  When you encounter trouble, lower the baudrate.
  On 68000-driven Amigas you won't be able to achieve
  more than 19200 baud to your modem unless you use
  a non-standard serial-device such as the
  "BaudBandit.device", see below.
  On faster Amigas, the baudrate should normally be the
  highest one your modem supports.

Device:  The standard device that drives the Amiga's
  serial port is called "serial.device" and should reside
  in your devs: directory. You may use any device with
  TWC that acts similar to the "serial.device". By now,
  the only important alternative I know is the
  "BaudBandit.device", which may enable users of slow
  Amigas to use baudrates > 19200. On faster Amigas,
  the original "serial.device" seems to be the better
  choice.

Unit:    This parameter is important only to users
  of multi-serial cards. They'll know about it.

Flags:   TWC really needs a 8N1 CTS/RTS dataflow.
  Anyway, there may be freaks out there that want to
  change the serial flags given to the device, e.g.
  because they want to use TWC over a non RTS/CTS
  including NULL-modem cable... they'll know what they do.

Buffer Size: The size of the buffer the serial device
  uses to prevent data from getting lost shouldn't be
  set to small. A haven't found yet situations where
  more than 32kb are sensible.

File submenu:

Write Buffer: The write buffer is used by the asynchronus
  disk I/O process to prevent writing of small blocks
  many times. Each time a write to the disk is made, the
  medium is validated. This results in avoidable overhead
  when the write buffer is too small. The higher your
  transfer-rates are, the more write buffer you should
  offer.

Protocol submenu:

Max. Packet Size: This value tells TWC how many data-bytes
  should be bundled in one data-packet. Values higher
  than 1016 are not possible, and not sensible, I think.
  Large blocks results in greater delays for the chat-lines
  you send, small blocks result in more protocol overhead,
  and therefore lower transfer-rates. It's a question of
  taste what you prefer. When you've got to use a slow
  2400bps modem, you should use a smaller packet size
  than 1016. When your communication channel is often
  disturbed, smaller packets may increase the transfer-rate
  by decreasing the amount of data that has to be resend
  after an error. Most modern modems do error-correction
  by themselves, so this is not a point.

Resend Timeout: TWC is not as stupid as many other protocols
  that need the data to come in the correct order, packet by
  packet. Those protocols suffer from corrupted data heavily,
  the data rate dramatically decreases. Not so with TWC.
  TWC takes the incoming data-packets regardless of their order.
  Corrupted data-packets are resend at any later time, TWC
  stores all the packets internally until it has the opportunity
  to write sequential data to the incoming file. There are
  situations, where the receiver is unable to order a
  corrupted data-packet again, for exampe, because the
  negative acknolegdment got corrupted itself. This case
  is handled by a timeout the sender triggers when a data-packet
  hasn't been acknolegded for a certain period of time.
  That doesn't mean the sender gets in panic, then... the
  unacknolegded data-packet is just transferred again.
  You can adjust the described timeout to fit your situation.
  A larger timeout may result in a larger internal array
  of unacknolegded packets, and in more time-waste when
  there are unacknolegded packets at the end of a transfer.
  A smaller timeout may result in unneccessary resends
  of data under bad circumstances, when the line is jammed.
  Experiment with this value, if you like.

Hangup Timeout: One should be able to start a file-transmission
  and then leave the computer without having to worry.
  So I implemented a timer that causes the connection to be
  closed when there has been no valid packet been transmitted
  for a certain period of time (data-packets do not count,
  because they are resend automatically, but data-acknolegdements
  count...).
  
Submenu "Process":

GUI Priority: You may change the priority of the GUI-process here.
  0 is the default, you may have your reasons to change this.
  GUI Priority should generally be lower than serial and disk I/O
  priority.

Serial I/O Priority: You may change the priority of the process
  that handles all the serial in/out operations here. This priority
  should generally be higher then disk I/O and GUI priority

Disk I/O Priority: You may change the priority of the process
  that reads/writes to disk here. This priority should generally
  be higher then GUI priority and lower than the serial I/O priority.

Submenu "Misc":

Verbosity Level: People with little knowledge are often confused
  by detailed technical descriptions of what's going on. If
  you don't want to see detailed reports of each and any thing
  that happenes, lower this value. If you are curious, and need
  to know what extra-ordinary things happen, increase this value.
  Sensible values range from 0 to 20.

CPS Display Mode: By default, the CPS displays in the "File Transfer
  Panel" are integrating over time. This results in a relative
  stable CPS display, that does not react heavily on temporary
  changes of the transfer-rate. You can also have TWC to always
  compute an "actual" CPS-rate, based on the time the last
  data-packed needed for transfer. This "actual" value is
  nonsense for the sending-rate when your modem uses packet-oriented
  protocols such as LAPM, V42 or MNP internally, because the
  speed depends then on the fill-state of the modems buffer...


@endnode

@node Problems "Problems - ask Murphy, why."

This chapter will grow with the feed-back I get from you
and all the other TWC users. Questions unasked cannot be
answered...

A few hints that may help you:

- If "HangUp" doesn't work, take a look at your modem's
  configuration. Your modem should hangup when DTR is dropped.

- If you use an A500 and BaudBandit.device, watch out for trouble.
  This thing is not that dependable. Try to use a lower baud-rate,
  if neccessary. BaudBandit 1.4 seems to work fine.

- If you use a ZyXEL Modem, don't use the 5.00e ROM-version along
  with V.42bis compression.

- If you use an USR dual standard modem, make sure you have a V.32bis
  connection. To one-way-only users HST and V.32bis seem to be
  of the same speed, but THEY AREN'T. Use ATB0 to enable V.32bis

- If you use a Telebit Modem, don't use PEP modulation. Use
  V.32 or even better V.32bis instead.

- Don't panic when your V.32bis modems retrain... bad line
  conditions can cause transfer interruptions up to 20 seconds,
  especcially with buggy modem-software (such as the early
  versions of the Rockwell-Chipset used in Supra, Twincom,
  Yoriko and others)

- If you're transmitting over really bad lines (such as the
  german BundesPest Telekotz often provides), and your
  average cps-rate drops below the value (physical bps rate)/10
  you may try to switch off the error-correction (V42, MNP4)
  of your modem. This may sound weired, but TWC's error correction
  is smarter than the one used in most modems, and you may
  gain higher rates... (USR Modems: AT&M0)

- The greater your modem's buffer is, the longer chat-packets
  will be delayed - please remember this... as I'm unable
  to change this...

If you've got other problems or solutions, please send
a report to my UseNet address lkv@mania.robin.de

@endnode

@node Copyright "Copyright and how to register TWC III"

TWC III has been written by Lutz Vieweg. ©1993, all rights reserved.

The TWC executable and documentation is freely distributable,
the serial-number you get when you register is NOT. Remember
this serial-number will be stored in the setup-file, so don't
give anyone a copy of yours.

TWC comes without any warranty at all, use at your own risk.

To register your TWC and get an individual serial-number send
me a letter with US$ 15 in _cash_ + $3 for postage if I can't send
you the serial-number via email (UseNet). You may also send me
DM 20,- (+ 1DM for postage) if you're living in germany.

Once you enter your valid serial-number in the setup menu, TWC
won't quit after approx. 20 minutes anymore...

Send your registrations, feed-back, diamonds etc. to:

Lutz Vieweg
Eduard-Rüppell-Straße 12
60320 Frankfurt am Main
GERMANY

UseNet:  lkv@mania.robin.de

Remember: A bug that's not reported cannot be fixed.


(The following does not apply to anyone except to some
 guys that are having weired and childish discussions
 on the german UseNet, so don't mind if you cannot read it)

DISCLAIMER: Hiermit sei es ausdrücklich gestattet diese
----------  Software zu all jenen Dingen zu gebrauchen,
            die kleinkarierte Dogmatiker ihren potentiellen
            Kunden verbieten wollen, also beispielsweise
            die Übertragung der Wasserstoffbombenkonstruk-
            tionsunterlagen an Killer-Mutanten vom Mars oder
            der Verkauf an Arme, die der kostenfreien
            Beschaffungsmöglichkeiten von ShareWare unkundig
            sind.
            
            Ungeachtet dessen möge derjenige zu Staub zerfallen,
            welcher seine Seriennummer weitergibt...

@endnode

@node Version "Version history"

100       First public release. How long will it take
          until the first bug is found the beta-tests
          did not show?

@endnode

@node Future "Ideas for possible future extensions of TWC"

- Better documentation
- Audio-support ("voice-chatting")
- remote command exectution 
- ARexx Interface. There has been an ARexx interface in
  TWC 2, but since nobody reported any use of it I didn't
  include it in TWC III yet. If you want it, request it,
  and tell me what you need it for...
- Video-support (when appropriate hardware becomes available)

@endnode

