




                                          
      ۱   ۱  ۱   ۱       ۱        ۱
 ۱      ۱  ۱     ۱        ۱  ۱   ۱  ۱
۱       ۱     ۱ ۱       ۱۱۱ ۱    ۱    
۱    ۱       ۱        ۱۱۱ ۱ ۱
۱۱          ۱         ۱   ۱ ۱ ۱   ۱ ۱
۱   ۱  ۱     ۱        ۱     ۱   ۱ ۱   ۱ ۱   
۱   ۱ ۱     ۱        ۱     ۱   ۱ ۱   ۱    ۱
۱   ۱ ۱   ۱ ۱   ۱      ۱   ۱ ۱   ۱   ۱
                                      

                 The AX.25 Medium Access Control Layer
                    Version 0.08 (25 January 2003)


                   Resident AX.25-driver for the PC
              and BayCom-Modem, SCC-Boards, PAR96, YAM96,
           PA0HZP-OptoPcScc Board, KISS, THD7/TMD700/TS2000,
                     and DRSI cards, BPQ Ethernet

                       by Henk de Groot, PE1DNN

             Based on TFPCX 2.73 by Henk de Groot, PE1DNN
              Based on TFPCX 2.21 by Ren Stange, DG0FT

                            Contents
                            --------

  1.      Foreword
  2.      A word about the documentation.
  3.      Quick Start
  4.      Introduction

  5.      Invoking and Configuration of AX25_MAC
  5.1.    General Options
  5.2.    Options for loading as TSR
  5.2.1.  Port- and Baud Rate-Configuration
  5.2.2.  Other Options
  5.3.    Removal of AX25_MAC from RAM

  6.      Operation
  6.1.    Multiport use
  6.2.    The commands for the AX25_MAC.INI file
  6.3.    KISS
  6.4.    THD7/TMD700/TS2000
  6.5.    MS-Windows, OS/2 and others.

                                  APPENDICES

  1.      Error Remedies (Modem Operation)
  1.2.    Problems with other Programs
  1.3.    Hardware Problems

  2.      Hardware Connections
  2.1.    Serial Modems
  2.2.    BayCom-USCC-Card
  2.3.    BayCom PAR96 and PICPAR modem
  2.4.    YAM96 modem
  2.5.    BPQ Ethernet

  3.      Information for Software Developers
  3.1.    Program-Interface
  3.1.1.  AX25_MAC-Interface
  3.1.2.  Special Functions


1. Foreword

  In  1997  DG0FT  published his TFPCX work under the GNU General Public
  License, and stopped maintaining the code.  I took over this code  and
  implemented the latest firmware from NORD><LINK in TFPCX.

  When I needed a driver to  send  and receive raw AX.25 frames I looked
  at  TFPCX.  I only needed the  MAC layer (Medium Access Control layer)
  part and  not the NORD><LINK  protocol stack. I took this layer out of
  TFPCX and  made new functions  to send and receive  raw frames.  Since
  this driver  does not  contain any  NORD><LINK code  its free  of  the
  NORD><LINK  ALAS  license  and  is  pure  GNU  GPL  software now.  For
  documentation  on  how  to use  this  driver on  different hardware  I
  pointed to  the TFPCX documentation.  But a need was expressed to have
  own documentation  for AX25-MAC.  So Now I did  another rip-off job by
  striping down the TFPCX documentation for AX25-MAC, taking out all the
  stuff that is no longer needed when there is no protocol stack.

  Note  that I  can not  guarantee that AX25-MAC  will  run  without any
  problem on every PC when  using a  serial modem: especially when using
  a PC with a slow CPU you may  encounter problems during reception. XTs
  running with  a clock  frequency below  8MHZ are  not usable  (or with
  limitations). Some  TSR's (Terminate  and Stay  Resident) programs are
  known  to  cause  problems  (See  Appendix  1.1.). Since this is not a
  commercial product I take this  for granted. I think this program will
  work for most users with some compromises .

  I like to  thank  Ren (DG0FT) for making all this software and making
  it available under the GPL license so I could reuse it.

  73s Henk, PE1DNN                            Apeldoorn, 25 January 2003


2. A word about the documentation.

  I assume you have  a suitable Modem or  TNC. This can be  any modem or
  TNC which is supported by AX25_MAC.  Furthermore, you  need a suitable
  Program (which  makes  use  of  AX25_MAC).  Finally you also need some
  knowledge about TNC-Software,  especially what things like "TX-Delay",
  and "Persist" etc do.

  If you  get  AX25_MAC  running  without   reading  this  documentation
  completely you may save some time,  but you may have overlooked a  few
  tricks  which  will  come  in  handy.   If  you  have any questions or
  problems,  please  find  a  solution  by  reading this document first.
  Practice has shown  that the same  questions are raised  over and over
  again. I have kept the frequently  asked questions in mind when I  was
  writing this document  but this document  will never be  complete.  Of
  course this documentation  is not a  basic course in  MS-DOS or packet
  radio. A little  hint:  you  can quickly find  a keyword by  using the
  search function of a Text Editor.

  This document mentions certain  hardware and  software  which has been
  designed by other Radio Amateurs:   most of the time their call  signs
  are enclosed between brackets.

  Concepts and Abbreviations:

  Port       a packet radio interface consisting of a port ( COM, LPT
             or SCC-Port), modem and a transceiver. When using more
             ports it is called multiport-operation. For BPQ Ethernet
             the interrupt number of the FTP software packet driver is
             used as 'port'.

  Frame      one  complete  data   unit  transmitted  by   packet  radio
             (packet), consists  of an  address field,  a control field,
             data and a checksum.

  Interrupt  interruption of  the currently  running program  due to   a
             hardware-event  (e.g.  a  key  press,  elapse  of a defined
             time-interval).   Software-interrupts  are  not  caused  by
             hardware  but  created  by  executing  a particular program
             instruction.

  KISS       (KA9Q and others) stands  for 'Keep It Simple Stupid'   and
             defines a  simple Data  Format for  the transfer  of Frames
             and TNC-Parameters  over an  asynchronous Serial  Port. The
             original goal was to move the protocol processing from  the
             TNC to  the Terminal-CPU  in order  to run  protocols which
             were not supported by the TNC. KISS is implemented in  many
             TNCs: it also enables direct connection to the computer.

  SMACK      (DL5UE  and  DK5SG)   is  the abbreviation of   'Stuttgarts
             Modified Amateur radio-CRC-Kiss'  and extends the  on error
             free  transmission  based  KISS  with  a  checksum (CRC) so
             transmission errors can be recognized.

  THD7/      (Kenwood)  Line of tranceivers with  build-in TNC.  The TNC
  TMD700/    behaves as TAPR TNC. Even on the THD7 KISS is possible, but
  TS2000     older THD7 models and the US models have  a bug  preventing
             packet transmission. In the newer THD7 European models KISS
             is working,  but handling its TNC is delicate.  The setting
             for TMD7 also works for the TMD700 and TS2000. Maybe future
             Kenwood models with a build-in TNC will work also.
             
  0x         Prefix of Hexadecimal Number (e.g. 0x300 = 300H)


3. Quick Start

  Because  of  the  many   different  configuration  settings  and   the
  existence of many different  environments no general 'recipes' can  be
  given.   In  most  cases  it  will  be sufficient if you read sections
  5.2.1. In case of trouble read appendix 1.  For multiport  operations,
  the sections 6.1 and 6.2 are important. In section 6.3 important  tips
  for operation using KISS are given.  Section 6.4  describes  specifics
  about the THD7/TMD700/TS2000 TNC.

  If you used a previous version without the '-P' option and were  using
  the default COM-1 port you now have to include the option '-PCOM1'.

  Command 'AX25_MAC -H'  will show  all allowed  options in  a shorthand
  form.
  Command 'AX25_MAC -U' removes AX25_MAC from RAM.


4. Introduction

  In the  spring of  2000 the  idea was  born to  write a new digipeater
  (kind of digital relay)  for use in a mode called APRS.  For this task
  access to raw AX25 frames  was needed and also the ability to transmit
  raw AX.25 frames.  This is needed because our program should have full
  control over the contents of the AX.25 frame, including all digipeater
  field, source and destination; all bits and pieces. We did however not
  want to reinventing the wheel or used of a bulky and hard to configure
  layer. But still it should cover a lot of different hardware, the more
  the better.  Since our new program should be used on cheap PC's like a
  80286 it should run under DOS and be available as public source.

  That a lot of  demands, but the ideal  candidate for this was found in
  TFPCX. Other  options would have been  BPQ and FlexNet - but then this
  would  not be GNU  but closed source.  Also  BPQ  and FlexNet  are not
  really  light-weight since  there were  designed with  another task in
  mind.

  The TFPCX  program was  suitable for a  large range  of modems and the
  author DG0FT kindly  donated his  source under the GNU Public License,
  which states  that you make  use the source as long as you publish the
  changed source also under the GPL license. This is  what I intended to
  do anyway so this suited me fine.

  The protocol stack  in TFPCX, which  is TF27b by NORD><LINK is covered
  by a license called 'ALAS',  but since we  were after raw frame access
  we could  get rid  of the protocol  stack completely  and only be left
  with the  work of DG0FT  (and the additions of the YAM modem and BPQ I
  added later to TFPCX).

  The lowest level of driver code was extracted from  TFPCX and put into
  AX25_MAC. Some glue ware was added to it to add some buffering.

  When AX25_MAC is loaded you can send was AX.25  frames to the program.
  AX.25_MAC will add  the CRC and send this frame exactly as is  through
  whatever modem  you defined.  So the sender  is not bothered about the
  modem specifics  this  way.  For reception AX25_MAC  will get the data
  from the modem and  check the CRC.  Packets with  a valid CRC are then
  offered to the program using the AX25_MAC layer.

  The use of AX25_MAC  makes a  program that  has to send an receive raw
  AX.25 frames  modem independent.  Besides that  the TFPCX drivers were
  proven to  be stable  for many years.  We will  therefore not run into
  difficult problems  although driving a modem  error free and stable is
  not always  a trivial  task and debugging  can be a  real pain.  TFPCX
  provided us with  stable drivers for AX25_MAC so we could  concentrate
  on the application without  bothering about the  driver. And  AX25_MAC
  lived up to this expectation and is as stable as TFPCX was.

  AX25_MAC runs only on IBM-compatible PCs.

  Updates:

  0.08: Changed the initialisation to set the THD7 to KISS,  now it also
        works for the  TMD700  and  TS2000  and  maybe also  for  future
        Kenwood models with a build-in TNC.
  0.07: Added new TNC type THD7
        This  TNC  behaves  like  KISS  but  is  very  easy  to overrun.
        Therefore this special type.  It keeps  2 seconds between packet
        transmissions  to  avoid overrun. Also it will avoid full duplex
        data exchange, when data is received the transmission is delayed
        to avoid  overloading the  THD7.  Besides  that  it watches  for
        packet  reception.  If no packets  are received  after  the last
        transmission,  then the THD7 is restarted  (TNC  deactivated and
        activated again  and then put in KISS mode). Note that this will
        only  work on  TH-D7's  that have KISS.  I only  tested it  on a
        TH-D7E  version  2.0.  I received  mixed  reports about  the  US
        versions so the only thing you can do is try if its works.
  0.06: Fixed textual information.
        Port numbers now start counting at 1 instead of 0.  This is done
        to make the portnumbers  correspond  with the port  numbers used
        in DIGI_NED and is also more logical for users. The INI file now
        also has  a version  number to  prevent  accidental  use of  not
        compatible .INI files.
  0.05: New method for  detecting if the  PC timer is re-programmed. Now
        the  RTC  interrupt  is  used  to  count  the  number  of  timer
        interrupts.  Unfortionately  this only works on PC-AT or better.
        The methode used in 0.03 and 0.04 did not work on all PC's. This
        one should be more compatible as it uses common interfaces.
  0.04: More robust restore  of PC timer.  It is  updated on the fly but
        now also once  more when thei  applicaion using AX25_MAC resumes
        running. This will fix possible race-conditions.
  0.03: The PC timer (PIT0) is  reprogrammed when  AX25_MAC detects that
        the counter is  reset to the default values.  For example QBASIC
        does this.  Now it  is possible  that an  application  shells to
        DOS,  runs QBASIC  and  returns  without  disabling  the  BayCom
        reception and transmission.
  0.02: First  wide  distribution  with  DIGI_NED,  an  APRS  digipeater
        program.
  0:01: Internal development version.

5. Invoking and Configuration of AX25_MAC

  AX25_MAC will be activated by the following Command Line:

  AX25_MAC [ -N ] [ <load options> | -U ]

  All  options  start  with  a  '-'  sign  and  are separated by a space
  character.   The  space  character  shall  not  appear  as part of the
  option. Options are case-insensitive (no difference between upper  and
  lower  case.   Certain  options   (e.g.  '-P')  have  more  than   one
  parameter,  separated  by  a  ':'.  For  those  values  which  are not
  explicitly specified default values will be used.

  Example:

  Option '-PUSCC::5' will be interpreted as '-PUSCC:300:5:1103', since
  the omitted values default to 300 and 1103.

  It makes  sense to start  AX25_MAC from a batch-file so you won't have
  to type  in the same  options over  and over  again. All  options  are
  listed  in short-hand form, which will  also be presented as help-text
  if you enter 'AX25_MAC -H', The <load options> are only relevant while
  loading AX25_MAC as a TSR, and remain valid until AX25_MAC is unloaded
  from memory.

  Usage: AX25_MAC [ -N ] [ <load options> | -U ]

  <general options>              <legend>
    -N no messages                 [] optional
    -U unload                      |  alternative
                                   x  hex digit
                                   n  dec digit
  <load options>
    -P<port>[:xxx:nn:nnnn]  packet port [addr:IRQ:<clock>]
    -Bnnnn[:nnnn ...]       baud rate (1 number/port)

    -F[file]  read init file
    -D        debug mode
    -C[xx]    show DCD [color]
    -Ixx      AX25_MAC interrupt
    -L        interLock - one TX at a time (only for half-duplex ports)
    -BU[nnnn] number of buffers
  <port>  COMn | LPTn | PARn | YAMn | BPQnn | KISSn | DSCC | OSCC | USCC
          (n = 1-4, for BPQ n=  60-80)
  <clock> 0 = disable    2 = hardclock    4 = PA0HZP port  (1 digit/
          1 = softclock  3 = DF9IC modem  5 = PA0HZP timer  channel)


5.1. General Options

  These options can be used together with every other option.  Currently
  there is only one:

-N  Suppress Messages

  In  case  messages   from  the  program   are  not  wanted   (e.g.  in
  batch-files),  they  can  be  suppressed  by  using this option. Error
  messages are not suppressed.


5.2. Options for loading as TSR

  AX25_MAC will always  load as a  resident program in  RAM, except when
  option '-U' is specified or when AX25_MAC is already running  resident
  in  memory.  If  you  want  to  use  multiple  drivers simultaneously,
  AX25_MAC has  to be  the first  TSR to  be loaded.  I cannot guarantee
  that  it will work without problems in this case.

  The AX25_MAC  program can  also be  loaded high  in upper-memory (UMB)
  using the LOADHIGH command if  there is sufficient room. Keep  in mind
  that there are  some problems when  using EMM386-drivers however  (see
  appendix 1.1.).

  In  order  to  adapt  AX25_MAC  to  different  hardware,  transmission
  speeds, and user preferences there   are a lot of options, which  will
  be described here.

  After loading, the following report will appear (example)

  Ŀ
     AX25_MAC v0.08  (25 Jan 2003)      
                by PE1DNN               
  Ĵ
   Contains portions of TFPCX by DG0FT  
   Published under GNU GPL License.     
  Ĵ
   5 Port(s), AX25_MAC-Int FD           
  Ĵ
   1: COM1 (3F8/00),  1200 Bd, MODEM    
   2: SCC0 (300/07),  1200 Bd, SOFTCLK  
   3: SCC1 (301/07),  1200 Bd, SOFTCLK  
   4: SCC3 (303/07),  9600 Bd, DF9IC    
   5: COM2 (2F8/03),  9600 Bd, KISS     
  

  followed by the DOS prompt. AX25_MAC is now loaded and occupies a part
  of memory.  In  the lower box the  number, the interface, the  address
  and when applicable the IRQ, the baud rate and types of the  connected
  modems are displayed.


5.2.1. Port- and Baud Rate-Configuration

-P  Specification of the used ports

  This option can be specified multiple times: twice for serial  modems,
  once for -SCC cards,   once for BayCom PAR96  or  PICPAR modems,  once
  for the  YAM96 modem,  once for  a BPQ  Ethernet link  and 4 times for
  KISS & THD7 ports,  but not  more  than  8  times  in  total.  Do  not
  underestimate processing load on the PC when using serial modems.

  The allocation of  port numbers will  follow the same  sequence as the
  order in  which the  ports are defined on  the command line, where the
  order of SCC-ports  is fixed. The  report given above  as example will
  appear when starting AX25_MAC with:

  AX25_MAC -PCOM1 -PUSCC -PKISS2

  If the option '-P'  is not specified not  any port is used,  this only
  makes sense  if you want  to load AX25_MAC as dummy  to test a program
  that needs a loaded AX25_MAC driver.

  The optional port addresses should be  in the range 0x100 to 0x3F8 and
  be divisible by  8. With SCC, KISS and THD7, use  of the IRQs  2-5, 7,
  9-12  and  14-15  are possible.  AT's do not  actually have an  IRQ 2.
  Instead of this IRQ 9 is used. Each port must have an unique IRQ.

-PCOMn or -PLPTn modem connected to COMn or LPTn (n = 1-4)

  The base address of the port will be read from the BIOS-data area  and
  has  to  be  present  there.   Most  BIOS-versions  don't  keep   this
  information for COM3 and  COM4. In that case  the address can also  be
  specified explicitly using '-P<Port>:xxx'.

  Example:

  AX25_MAC -PCOM3:338

  Using this command a modem connected to COM3 will be used, using  base
  address 0x338.  This address should  be  looked  up in  the  manual or
  description of the interface. The  number of the port (in this example
  3) will be ignored if the base address is explicitly specified but has
  to be present and between 1 and  4. The IRQ of the interface is  of no
  interest to AX25_MAC since it is not used.

  When using 2 modems, the first modem specified shall be the one  which
  is  most  frequently  used  because  the  first  modem  has  a  higher
  priority. It is evident that  other programs can't use the  same ports
  as used by AX25_MAC.

-PUSCC:<Base>:<IRQ>:<Modems>  use BayCom USCC-card
-POSCC:<Base>:<IRQ>:<Modems>  use PA0HZP OptoPcScc-card
-PDSCC:<Base>:<IRQ>:<Modems>  use BayCom Digi SCC-card

  The base address of the SCC card, the IRQ and a 4 digit number can  be
  specified as parameters. The 4 digit number specifies the type of  the
  SCC ports (up to  4).  The following  settings are possible (see  also
  appendix 2.2.):

  0  Disable      Port disabled (Switched Off)

  1  Softclock    The transmit and receive clocks are created internally
                  for use with AFSK-Modems (duplex mode not possible)

  2  Hardclock    The  transmit clock will  be generated by  the  modem,
                  the receive clock is created internally (e.g. G3RUH)

  3  DF9IC-Modem  The transmit and receive  clock will be generated   by
                  the modem, NRZ-Mode

  4  PA0HZP-Port  The  receive  clock  will   be   created   internally,
                  divided  externally   by  32   and  passed   back   to
                  the   SCC-Controller   as    transmit   clock.    (for
                  OptoPcSCC-card)

  5 PA0HZP-Timer  This port  generates a  timing reference  for   timing
                  purposes (Only for OptoPcSCC-card).

  The modem types 1-3 are reserved  for the USCC- and DSCC card,  type 4
  only functions with the OptoPcScc-Card.

  Number 5 has a special meaning. AX25_MAC requires a regular timer-tick
  for internal timing. This timer-tick can be delivered by the OptoPcScc
  card, but  not when  running under  Windows. In  this case  the system
  timer of  the PC  will be  used, which  is, however,  not so accurate.
  This  can  cause  a  problem  for  some  parameters  (e.g. TXDELAY and
  TXTAIL). AX25_MAC offers  the  possibility to  use an otherwise unused
  SCC-Port  for  generation   of  an  accurate   timer-tick,  which   is
  recommended when not all ports are in use.

  Examples:

  AX25_MAC -PUSCC:300:7:1103

  Base address  is 0x300  and IRQ  is 7.   USCC-ports 1  and 2 are using
  Softclock for use with normal  AFSK-modems (the two '1' digits),  port
  3 is disabled and port 4  is used with a DF9IC-modem (the  '3' digit).
  This is also the default setting when only '-PUSCC' is supplied.

  AX25_MAC -PUSCC:300:7:31

  USCC-Port 1 is now setup for a DF9IC modem. Port 2 uses the  Softclock
  and ports 3 and 4 are  switched off. This setting is required  for the
  9K6-USCC  Card,  which   offers  only  2   SCC-ports.   If  no   clock
  specification is supplied  '1103' is used  by default (as  above), but
  then a setting is  given using less than  4 digits the missing  digits
  will interpreted as '0'.

  AX25_MAC -POSCC:150:3:4445

  OptoPcScc-Card with base address  0x150, IRQ 3. Port  1, 2 and 3  will
  be  used  as modem  ports with  an external  clock. Port  4 delivers a
  timer-tick.   This is  also the  default setting  when using  '-POSCC'
  without additional parameters.

  AX25_MAC -PDSCC:300:7:2222

  BayCom-Digi-SCC-Card with  base address  0x300, IRQ  7. All  ports are
  used with  G3RUH modems,  which will  also deliver  the clock. This is
  also  the  default  setting  when  using  '-PDSCC'  without additional
  parameters.

-PKISSn:<Base>:<IRQ> KISS-Port on COMn (n = 1-4)

  The  base   address  will   be  determined   automatically,  but   can
  be overridden  if   a base-address   is specified.    IRQ  4   will be
  used as the default  interrupt for COM1   and  COM3, and  IRQ  3   for
  COM2  and  COM4.  If  the  default  is  not  correct  for   your  port
  hardware,  you will have to explicitly specify the correct IRQ.

  Examples:

  AX25_MAC -PKISS1

  KISS-Port on COM1, base  address determined automatically and  default
  IRQ for COM1 used. For COM1  and COM2 this setting will be  sufficient
  in most cases.

  AX25_MAC -PKISS3:338:5

  KISS-Port on COM3, base address 0x338 and IRQ set to 5

-PTHD7n:<Base>:<IRQ> THD7-Port on COMn (n = 1-4)

  The  base   address  will   be  determined   automatically,  but   can
  be overridden  if   a base-address   is specified.    IRQ  4   will be
  used as the default  interrupt for COM1   and  COM3, and  IRQ  3   for
  COM2  and  COM4.  If  the  default  is  not  correct  for   your  port
  hardware,  you will have to explicitly specify the correct IRQ.

  Examples:

  AX25_MAC -PTHD71

  THD7-Port on COM1, base  address determined automatically and  default
  IRQ for COM1 used. For COM1  and COM2 this setting will be  sufficient
  in most cases.

  AX25_MAC -PTHD73:338:5

  THD7-Port on COM3, base address 0x338 and IRQ set to 5

  Note: The driver switches the  THD7,  TMD700  or  TS2000 to KISS. Note
  that the  communication speed  over the serial line is  fixed to  9600
  Baud.

-PPARn<Base>:<IRQ>

  BayCom PAR96 and BayCom PICPAR-Modem  connected to LPT 'n', where  'n'
  is the number  of the LPT  port. The base  address will be  determined
  automatically, but  can be  overridden by  specifying a  base-address.
  The default  IRQ is  set to  7.   When this  is not in accordance with
  your installation, you have to specify the correct IRQ.

  Examples:

  AX25_MAC -PPAR1

  BayCom  PAR96  or  PICPAR  modem  on  LPT1,  base  address  determined
  automatically and default IRQ 7 used.

  AX25_MAC -PPAR2::5

  BayCom  PAR96  or  PICPAR  modem  on  LPT2,  base  address  determined
  automatically and IRQ set to 5.

-PYAMn<Base>:<IRQ>

  YAM96-Modem connected to COM 'n', where  'n' is the number of the  COM
  port. The base  address will be  determined automatically, but  can be
  overridden  if   a  base-address   is specified.     IRQ  4    will be
  used as  the default   interrupt for  COM1    and   COM3, and   IRQ  3
  for COM2  and  COM4.  If  the   default  is  not  correct  for    your
  port hardware,  you will have to explicitly specify the correct IRQ.

  Examples:

  AX25_MAC -PYAM1

  YAM96  modem  on  COM1,  base  address  determined  automatically  and
  default IRQ 4 used.

  AX25_MAC -PYAM2::5

  YAM96 modem on  COM2, base   address determined automatically  and IRQ
  set to 5.

-PBPQnn

  FTP  software packet driver installed at software interrupt 'nn'. 'nn'
  is  in  hexadecimal,  between 60 and 80.  If  'nn'  is  not  specified
  AX25_MAC will  search for  an FTP  software  packet driver.  The first
  driver found will be used.

  Examples:

  AX25_MAC -PBPQ6F

  FTP software packet driver at software-interrupt 0x6F.

-Bnnnn[:nnnn ...] specification of the baudrate for each port

  When using multiple ports the  values separated by a ':'  are assigned
  to  each  port  in  order  (first  value  for port-1, second value for
  port-2 and so on). The following values can be specified:

                                                       Default

  Serial Modem   300, 1200, 2400 or 4800 Baud            1200

   SCC Softclock    50-38400 Baud                        1200
       PA0HZP-Port  50-38400 Baud                        1200
       Hardclock    50-38400 Baud                        9600
       DF9IC-Modem   1-65535 Baud (without significance) 9600

  KISS              2400, 4800, 9600, 19200,             9600
                    38400 or 57600 Baud

  THD7/TMD700/      1200, 9600                           1200
  TS2000

  PAR96/PICPAR      9600, 19200 Baud                     9600

  YAM               45-19200 Baud (without significance) 9600

  BPQ               meaningless, not used

  When  using  serial  modems,  only  the  above  specified  values  are
  possible; when using SCC cards intermediate values are also  possible.
  When using Hardclock  the delivered transmit-clock  shall be equal  to
  the  specified  value.   When  using  a  DF9IC  modem  the  value   is
  meaningless because  the clocks  are generated  externally, but  it is
  advisable to  specify the  correct  value  anyway, because  that value
  will be  displayed when  using the  'P' command.  When using the YAM96
  modem the given  baudrate is cosmetic  too (just like  for DF9IC), the
  communication speed to the  YAM96 modem is fixed  at 19200 Baud.   The
  initialization of the modem (using YAMINIT - supplied with the  modem)
  determines the actual speed on the air interface.

  Example:

  AX25_MAC -PCOM1 -PUSCC:::1003 -B300::19200

  Modem on COM1  at 300 baud,  USCC-Port 1 with  Softclock at 1200  baud
  (Default, '::') and USCC-Port 4 with DF9IC-modem at 19200 baud.

  Which  baudrates  are  possible  on  a  particular  PC, depends on its
  computing power  (see  table in appendix  1.1.).  When using  a serial
  modem at  300 baud  the system  clock will  lose half  a minute  every
  hour.


5.2.2. Other Options

-BU[nnnn] Size of the AX25_MAC-Buffer

  AX25_MAC  temporarily saves frames  of AX25 data  in 405 byte buffers.
  These buffers are used store frames that need to be transmitted and to
  store  received frames  before they  are retrieved by the application.
  (403 bytes  for the Frame data and 2 bytes for buffer administration).

  The number  of buffers  needed  may  be  totally  different  from  one
  application to  the other  and also  depends on  the number  of active
  ports.  If AX25_MAC has  a small  number of buffers  only a few frames
  can be kept in  intermediate buffers and additional data to be send or
  is received will be lost. Too many buffers waste memory.

  The default value of 100 buffers is usually adequate. If many channels
  are in use  and the  load is high then it  makes sense to increase the
  value.  If there is  very little  RAM available,  then also  a smaller
  number of buffers can be used.  If only one or two ports are used then
  a value of 50 buffers also seems to be adequate.

-C[xx] Transmit-/Receive indicator switch

  When using this option  an indication of the  transmit-/receive status
  will be  displayed while  in Host  mode. The  indicator appears at the
  top right hand corner of the screen ('S' for transmit (Send), 'R'  for
  receive).   When more  ports are  to be  used, each  port will  have a
  separate  indicator,  the left  indicator  will be  the indicator  for
  port 0.  When using KISS mode or THD7 mode  the indicator will display
  the status of the  connection  between  PC  and  TNC.  The  indication
  only works in text mode.  The additional parameter  specifies  a color
  attribute.

  Example:

  AX25_MAC -C17
              ^ Foreground (here White)
             ^  Background (here Blue)

  Numbers of the Color Attributes:

  0 Black    4 Red      8 Dark-Grey   C Light-Red     Monochrome:
  1 Blue     5 Magenta  9 Light-Blue  D Light-Magenta
  2 Green    6 Brown    A Light-Green E Yellow        07 Normal
  3 Cyan     7 White    B Light-Cyan  F Light-White   70 Inverse
                        ^             ^
                        only foreground

-F<File> File for the setup parameters (default AX25_MAC.INI)

  When using this  option (and only  then!) the specified  file (or when
  no file name is given AX25_MAC.INI) will be read during the startup of
  AX25_MAC and interpreted by AX25_MAC.  This makes  it possible  to set
  the channel access  parameters to  be used for  you radio  and channel
  occupation by other users.  The file will be looked for in the current
  directory if no pathname is given.

  The  file  can  be  created  using  normal text editor and may contain
  comments (preceded by '#' or ';')  and empty lines.  Each command will
  be interpreted. Tabs will be handled as spaces and  will be ignored at
  the beginning and end of a Line.  An example-file is  included  in the
  distribution package of AX25_MAC.

-Ixx  Software-Interrupt for AX25_MAC-Interface (40-FF)

  The communication  between  AX25_MAC  and the application-program uses
  the specified software-interrupt. Default value is interrupt 0xFD. You
  only need to change this if the specified interrupt is already in  use
  by another program.

-L interLock

  Normally frames  for transmission are transmitted as soon as possible.
  If the '-L' parameter is specified then only one transmitter is active
  at any time. If a transmission is ongoing the other transmissions will
  wait until  the transmission  is finished.  This only  works for half-
  duplex ports.  Full duplex  ports  will  transmit  regardless  of this
  interlock flag.  This option  can be  used when your  transmitters are
  powered by a power supply that  is too weak to supply the transmitters
  during simultaneous transmissions.

-D Test Mode (Debug)

  This  option  is  valid  for  the  most  recently supplied '-P' option
  issued before the '-D' option on the command-line. It will activate  a
  test-mode for this port or  these ports. Each interrupt for  this port
  will  lead  to  a  voltage  change  on  the  internal PC speaker which
  results in a ticks (cracks) or a tone.

  The  test  mode  is  mainly  used  for  fault-finding  when  there are
  transmit or  receive problems  during modem  operation. (see  Appendix
  1.1.). When using 1200 baud  you should hear a 1800  Hz-Tone (baudrate
  *  1.5).   This  tone  should  be  clear and without interruptions. An
  unclear tone  is caused by  delayed interrupts. If the quality  of the
  tone sounds disturbed or interrupted then the CPU is overloaded.  What
  is  and  what  is  not  acceptable  is hard to define: some background
  noise is most likely still acceptable.

  When using this option with a  KISS, THD7, SCC-Card,  PAR96/PICPAR  or
  YAM96 modem  you  can  check  if  interrupts  are  generated  at  all.
  These interrupts can  occur  constantly or  only  during  transmission
  and reception.

  When the option '-D' is specified  in before any '-P' option then  you
  will hear ticks in time with the system clock.


5.3. Removal of AX25_MAC from RAM

  By  using  the  command  'AX25_MAC -U'  you  can  remove  the resident
  AX25_MAC from the memory.


6. Operation

  In  this  section  the  most  important  features in  AX25_MAC will be
  explained.


6.1. Multiport use

  AX25_MAC can  manage up to 8 ports.  I think that using  them all will
  only occur in exceptional cases.

  A unique  number (1-8)  is assigned  to each  port. The  assignment of
  those numbers follows the exact  same order as the '-P'  options which
  are given at the start of  AX25_MAC.  These port numbers are displayed
  by AX25_MAC at startup.

  Example:

  Ĵ
   1: COM1 (3F8/00),  1200 Bd, MODEM    
   2: SCC0 (300/07),  1200 Bd, SOFTCLK  
   3: SCC1 (301/07),  1200 Bd, SOFTCLK  
   4: SCC3 (303/07),  9600 Bd, DF9IC    
   5: COM2 (2F8/03),  9600 Bd, KISS     
  

  Some commands in the AX25_MAC.INI file (see  section 6.2. and appendix
  1.) need a port number to set some parameters for one specific port.

  Command Format:

  <Command> <Port>:[Parameter]

  <Port> is a  digit between 1  and 8, no  space is allowed  between the
  digit and the ':'.

  Example:

  ; Port 1
   P   1:64       ; (8-255) Persistent value for transmission (=P/255)
   W   1:10       ; (10 ms) Slottime
   T   1:30       ; (10 ms) TX-Delay: PTT on -> transmission of data
  ;
  ; Port 2
   P   2:64       ; (8-255) Persistent value for transmission (=P/255)
   W   2:10       ; (10 ms) Slottime
   T   2:10       ; (10 ms) TX-Delay: PTT on -> transmission of data

  If the port number  is not specified for  a command which needs a port
  number, an error message is given and the command is ignored.


6.2. The commands for the AX25_MAC.INI file

  The individual commands that can appear in AX25_MAC.INI:

T  TX-DELAY

  This is the delay, in 10  ms units, between keying up the  transmitter
  (PTT) and  the actual  transmission  of data.  This delay  is   needed
  because it takes  some time   between keying the  transmitter and  the
  actual transmission of  a stable  carrier.  The value depends   on the
  switching speed of the transmitter.

  Example:

    T   1:30       ; (10 ms) TX-Delay: PTT on -> transmission of data

P  PERSIST

  This is  the Persistence access parameter,  used to  add a random time
  before  transmissions  to allow more users  to use the same frequency.
  Before transmission a random value between 0 and 255 is generated.  If
  the value is  below or  equal to  the  Persist value, the transmission
  will be started.  Otherwise transmission  will  be  postponed  for one
  slot time (see W). Then a  new random value is  generated and compared
  again with the Persist value, until transmission can be started.

  Example:

    P   1:64       ; (8-255) Persistent value for transmission (=P/255)

W  Slottime

  With this command the time of a Slottime is defined in units of 10 ms.
  This is used  in conjunction  with the Persist  value and  is the wait
  time between comparing  random numbers  with the  Persist values until
  the transmission of Packets is granted.

  Example:

    W   1:10       ; (10 ms) Slottime

X  PTT enable

  With this  parameter you can enable and disable the PTT. When disabled
  AX25_MAC will 'transmit' data without actually keying the transmitter.
  Value '0' is used to disable the PTT, value '1'  will enable it.

  Example:

    X   1:1        ; (0-1)   PTT (0=off, 1=on)

@C  DCD-Working

  AX25_MAC   has  a  Soft-DCD   (software  squelch).   When  using  slow
  transceivers (slow meaning a slow squelch circuit)  you can  leave the
  squelch of  the receiver  fully  open.  AX25_MAC  will  determine  for
  itself  whether or not a packet signal is being received.

  The  Soft-DCD  can  be  controlled  by  means of the '@C' command, the
  given parameter  controls  the noise-canceling level.  This  parameter
  can be a  number between 0  and 63. When  using '@C0' the  Soft-DCD is
  switched off (default)- all other  values activate the Soft-DCD.   The
  lower the  value the  more unstable  and faster  the Soft-DCD becomes,
  the  higher  the  value,  the  more  stable and slower it becomes. The
  ideal DCD should be both  stable and fast. Therefore the  best setting
  will good compromise between the two extremes. To simplify the job  of
  finding the  right value  you can  use the  DCD indicator  (see option
  '-C').   When  using  a  small  value  you  will  see the unstable DCD
  indication, when using a large value you will see slow and  inaccurate
  recognition of  signals.   The best  way to  set this  correctly is to
  slowly increase the parameter value while listening to the signals  on
  the PR QRG,  until the indication  is correct. A  good start value  is
  '@C25'.

  When using  SCC, PAR96  or PICPAR  ports an  adjustment is  not really
  needed, all  values above  0 will  activate the  Soft-DCD and they all
  have the same meaning for  the operational software.  I  was, however,
  annoyed by the constant flickering of the indicator, so you can  still
  adjust the value  to reduce the  flicker. For the  YAM96 modem the  @C
  command will not work at all since it always uses a hardware DCD.

  IMPORTANT!

  The soft-DCD  only recognizes  PR-Signals at  the same  baud rate. You
  can _not_ use the  soft-DCD on packet QRG's which carry PR signals  at
  different baud-rates.

  When using KISS or THD7, the  TNC  handles  the  DCD, and this command
  only defines the time  (in 10ms-Units) after  which the RX  indication
  will be removed from the  screen if no further  data was received from
  the TNC.

  Example:

    @C  1:10       ; (0-63)  DCD (0=Hard-DCD, >0 Adj speed for Soft-DCD)

@D   DUPLEX

  With @D full duplex can be switched on or off. When 0 is specified the
  port works  in half duplex,  when 1  then full duplex is selected.  In
  full duplex transmission takes place regardless of the DCD state.

  Example:

    @D  1:0        ; (0-1)   Duplex (0=off, 1=on)

@TA  TXTAIL

  You  can  specify  the  TXTAIL  value  in 10ms units (0-6000) but this
  value  is  in  normal  cases  (for  the  selected  baudrate  and timer
  inaccuracy)  already  set  to  the  most  optimal value (@TA=4 for 300
  baud, @TA=1 otherwise). When using  KISS the correct value depends  on
  the used TNC, therefor it is not set automatically in this case.

  Example:

    @TA 1:4        ; (10 ms) TX-Tail: end of frame -> PTT off


6.3. KISS

  When using KISS there are some special things you'll need to know.  We
  will elaborate on this in this section .

  Before you  start AX25_MAC  the TNC has to be  switched on should have
  been set to KISS mode.  AX25_MAC does  not offer the option of putting
  the TNC into KISS mode.  To set  the  TNC to KISS mode you  can use an
  the external program like SETKISS  (which can be in the  TFPCX  driver
  package for example).

  AX25_MAC supports the  KISS-enhancements   SMACK  (Version   1.0)  and
  RMNC-CRC-KISS,  which  both  improve  the  reliability  of   transfers
  between the TNC and the  PC. SMACK or RMNC-CRC-KISS will  be activated
  automatically if the connected TNC supports it. SMACK or RMNC-CRC-KISS
  is only activated when least 1 Frame has been sent and received.

  With KISS, the Send-/Receive indicator does not show the  send/receive
  status  on  the  radio  channel,  but  the  send/receive status on the
  serial port to the TNC or to a connected other PC.

  To couple two PCs together (e.g. one running a digipeater and  another
  running a mailbox) you need a null-Modem-Cable. When using this  setup
  AX25_MAC always works in duplex mode (the command  @D is meaningless).
  The parameters should be setup accordingly. The following descriptions
  are  mainly  important  for  normal  use  with  a TNC (no direct cable
  connection).

  In KISS-Mode, AX25_MAC has no direct control over  the radio  channel,
  because the TNC is in between. AX25_MAC has  no possibility  to detect
  whether or not the  frequency is free and  when the frames to  be sent
  are actually  transferred, which  may lead  to unwanted transmissions.
  This may  lead to  two transmitters to  come on air at  the same time,
  despite the use of the '-L' flag.  Since this will only be for a short
  duration when this happens, this is most likely not a big problem.  If
  it is really an issue then do not use KISS or use a hardware interlock
  on the transmitters also.


6.4. THD7/TMD700/TS2000

  When using THD7 there are some special things you'll need to know.  We
  will elaborate on this in this section.

  In case of the THD7/TMD700/TS2000, AX25_MAC switches the  TNC to  KISS
  mode. Everything written about  KISS applies to the  THD7 setting too,
  but the THD7 doesn't know about SMACK and RMNC-CRC-KISS,  so  AX25_MAC
  will not try to use that. When  switching  the  THD7/TMD700/TS2000  to
  KISS it will also switch the on-air baudrate to  9600 baud if that was
  specified with the -B flag. Default speed on air is  1200 Baud (serial
  line speed is fixed to 9600 baud for the THD7 setting).

  Special for the  THD7  is to go easy  on the TNC.  It is very  easy to
  overrun the TNC,  after which is stops receiving and transmitting.  So
  when there are multiple packets to send,  the driver will  insert some
  time between the packets to give the THD7 a chance to send them.  This
  reduces the number of TNC hangups a lot.

  Secondly there is a build-in detection  mechanism that watches  if the
  driver still  receives  data after  a  transmission.  When there is no
  reception then the  THD7  TNC  is switched off and on  (there is a way
  to do that,  even when the  TNC  itself  does  not respond).  AX25_MAC
  then switches the TNC to KISS and communication should be restored.
  
  The driver  cannot  detect  if  there is no  RX  data because the  TNC
  stopped  or  that  there  is just no  data,  so sometimes the  TNC may
  be restarted when it  was not needed.  I tried  to minimize this,  but
  it cannot  be avoided.  It only  occurs  when there is  not much  data
  anyway so hopefully not too  many packets are lost  the few seconds it 
  takes to  restart  the TNC.  At least  is works  reasonably well  this
  way.

  The mechanism described above also works for the TMD700 and TS2000.  I
  don't  know  if  these  devices  need  that  too,  but  this  way  the
  communication  is  also  recovered when  the  TMD700  and  TS2000  are
  powered off and on.

6.5. MS-Windows, OS/2 and others.

  When using a modem AX25_MAC requires a very low interrupt latency (see
  appendix 2) which  can not be accomplished when running under Windows,
  or IBM OS/2 2.0 (although there are  a lot of people  who find it hard
  not accept  this fact).  That is why  AX25_MAC  will generate an error
  message if an attempt is made to start  AX25_MAC for  modem use  while
  running one  of these systems.  Newer version  of Windows may hide the
  fact  that AX25_MAC runs under windows.  Then the error message is not
  displayed, but it will not work nevertheless.

  Operating an SCC-Card using these systems is possible.  Actually, this
  works  quite  well  when  using  1200  baud  under Windows. When using
  higher baud-rates running SCC cards will also cause problems.  Running
  OS/2 will  not work  as well  as running  under Windows,  but this was
  only tested  during a  short test.  I have  no idea  how well a PAR96,
  PICPAR or YAM96 modem will work under these systems.

  KISS mode works in my setup on both systems up to at least 38400  baud
  without any problem. The COM ports are fully supported by Windows  and
  OS/2 drivers,  which is  unfortunately not  the case for the SCC cards
  (which is of course reasonable).

  When  using  other  multitasking  systems  you  may  find  a   similar
  behavior.


                             Appendices


1. Error Remedies (Modem Operation)

  When you  have a  problem you  should first  find out  what could have
  caused it.  Besides AX25_MAC,  it could be caused  by the  application
  using the driver, the modem, the SCC Card, DRSI, PAR96/PICPAR or YAM96
  modem, or the transceiver.

  This section focuses mainly on use with a modem.

  AX25_MAC demands  more from  your PC compared  to the use  of a normal
  TNC.  When your  PC  cannot  live up  to this  demand you  will  be in
  trouble. To understand this I will  explain  how  AX25_MAC  works when
  sending and receiving.

  When  using  packet  radio  the  information  is  transmitted  using a
  synchronous serial link.  The PC's serial  port can, when  used in the
  normal way, only transmit asynchronous serial information using  start
  and stop-bits which  do not exist  with packet radio.  The serial port
  can therefore not be used in  the normal way. This means AX25_MAC  has
  to handle each and every bit itself: the serial  port is only used  as
  a simple latch which can store only one bit.

  To enable AX25_MAC to handle the  data in  a predefined  speed of, for
  example, 1200 bits/s it needs a accurate clock. To transmit the  clock
  has to deliver 1200 ticks/s. The  method used to receive data needs  a
  clock  which  can  deliver  3600  ticks/s  which  makes it possible to
  constantly  synchronize  on  the  received  signal.  AX25_MAC  uses  a
  software PLL.  The modem RX line is  sampled 3 times per bit to detect
  if the  RX line changed from a logical 1 to  0 or 0 to 1. In the ideal
  situation such a change should  only  occur  on  every  third  sample.
  Due to inaccuracies the timing drifts away with respect to the sender.
  Since three samples are taken per bit the direction  of the  drift can
  be detected and compensated.

  As accurate clock I used the  PC's internal timer which is present  in
  any PC and is  normally  used  for  the  date/time  in  DOS.  AX25_MAC
  re-programs  the  timer  to  supply  an timer-interrupt 3600 times per
  second.  The  interrupt  handler  (the  so  called  Interrupt  Service
  Routine, ISR)  will take  control over  the CPU  and suspend what ever
  was executing at  that moment and  will call the  functions which take
  care of  sending and  receiving. It  is inevitable  this can only work
  correctly if  all the  interrupts are  handled in  a steady repetition
  and  without  too  much  delay.  This  will  be a problem when running
  Windows or OS/2,  that's the reason  why it does  not work right  when
  using these systems.

  If you  compare the  load on  the PC  caused by AX25_MAC compared to a
  TNC,  AX25_MAC  will cause a 30 times higher  load when using the same
  baudrate, using 1200 baud it can be compared  with a 36000 baud TNC on
  your PC, which gives problems on a lot of slow PCs. Luckily enough for
  us, PCs are getting faster and  faster,  so  this  has  become  a less
  of a problem over the years. The timing  inaccuracies are causing most
  problems nowadays when AX25_MAC doesn't run under plain  DOS. This  is
  still a big difference between using AX25_MAC or using a TNC.


  1.1. Send- and Receive Problems

  The used  PC should  in the  first place  be capable  of handling  the
  large number of interrupts.  When your PC is  not able to handle  this
  it  will  run  very  slowly,  or  your  PC will lock-up or crash. From
  experience  the  following  table  may  used  as  a guideline (without
  guarantee):

  PC    XT   XT   286  386
  MHz   5    8    12   20

  Baud
   300  *    *    *    *
  1200  ?    ?    *    *
  2400  -    ?    *    *
  4800  -    -    ?    *

  *  Operation possible
  ?  Operation probably possible (with Limitations)
  -  Operation impossible

  As you  see, a  modern PC  with at  least a  486 or  Pentium processor
  should not cause any problems with processing speed any more.

  There are,  however, also  problems with  PCs which  are in  principle
  fast enough. Most of the  time the installation suffers from  unstable
  reception, which leads to many  REJects, which in turn will  result in
  many retransmissions.   This is in  most of the  cases caused by  some
  residential program,  driver or  additional hardware  which delay  the
  interrupts handling  too long.  When the  timer interrupt  handling is
  delayed for more than 200s during the reception of a frame the  whole
  frame will be lost (even if it occurs only once). When you  experience
  these  kind of  problems you  could  start  AX25_MAC  using  the  '-D'
  option. When you hear  interruptions of  the tone you hear from the PC
  speaker, you experience this problem.

  Common sources of problems:

  - Usage  of Extended  (XMS) or  Expanded   Memory (EMS)  as buffer for
    the terminal program and disk-caches (especially  on a 286 PC)

    To avoid  this you  should prevent  usage of  this RAM  as  long  as
    AX25_MAC is used.

  - A   driver, which  enables resident  programs to  be loaded  in high
    memory (e.g. EMM386)

    If the  previous solution  did not  work for  you, you could disable
    the whole EMM386 driver while using AX25_MAC.

  - Slow Keyboard-Driver (KEYB)

    If  frames  are  always  lost  when  a  key is pressed you could try
    another keyboard driver.

  - VGA-cards and HD-controllers

    Many  VGA-Card  disable  interrupts  for  some  time when running in
    graphic mode. I also heard  there are HD controllers which  give the
    same  kind  of problem.  When  the controller was removed everything
    worked again. It is a problem for me to give a general solution  for
    this. You could try a program which does not run in graphic mode.

  - Running under Windows

    Although you can not  start  AX25_MAC in a DOS session under Windows
    for use  with a serial  modem, you  can start AX25_MAC in DOS before
    starting windows.  Some  people have reported this  works for  them,
    but  most  users will  get nothing  but trouble  using  this  setup.
    Windows will delay the timer interrupts to much  to make a  reliable
    transmission. The only solution is to quit using AX25_MAC this way.

  Sometimes  you have to live with  a compromise to use AX25_MAC. If you
  are not willing  to accept  this then AX25_MAC is not the right way to
  go. If you wonder why AX25_MAC  stopped working  all of  a sudden  you
  have  to question if you loaded  a new driver or changed anything else
  in the  setup of  your PC.  Something I  do NOT want is somebody using
  AX25_MAC on a Digi QRG  with a setup  which only receives one out of 4
  frames correctly each time.


1.2. Problems with other Programs

  While AX25_MAC is active you should  not run programs which use the PC
  timer which  is in  use by AX25_MAC.  If you do your system may crash,
  run extremely slowly, or the DOS clock will not run correctly anymore.
  Among these programs are:

  - MS-Word 5.0 and 5.5
  - EDIT in MS-DOS 5.0
  - DosShell in MS-DOS 6.2
  - MS-Windows
  - many Mouse Drivers

  Using the following  programs also gave  problems, the exact  cause is
  unknown:

  - Keyboard  driver  from  DR-DOS  6.0  (keyboard hang-up), use another
    drivers (e.g. CKEYGR.COM, which was distributed with SP).

  - Microsoft mouse driver (MOUSE.COM). Cure: use another driver

  - IBM VCPI.SYS-Driver (used in notebooks), removal of the driver might
    solve the problem


1.3. Hardware Problems

  There are PCs (especially Laptops), which do not have 100%  compatible
  serial ports. The demands on the ports are not so high as for  BayCom,
  when  the  deviations are  too big it  can also  cause  problems  with
  AX25_MAC on these computers. In many cases receiving works buy sending
  does not.  Up till  now I  received  some  reports  of  this  for  the
  following computers:

  - Toshiba 1000XE
  - NEC Multispeed
  - Olivetti M24

  AX25_MAC  offers  the  possibility  to use  the modem on the LPT port,
  which might be an option to bypass the problem.

  Most  laptops  and  notebooks  have  build-in Power Management to save
  (battery) power. When the keyboard is not pressed for some time  Power
  Management  may  reduce  de  processor  speed,  which  may  reduce the
  processing power  for AX25_MAC  below a usable  level. When using this
  kind  of  PCs  (e.g.  Olivetti  Quaderndo)  it  is often  required  to
  deactivate the  Power  Management  (especially  the  reduction  of the
  processor  speed).  If  your  PC  has  enough  power even with reduced
  processor speed you can try to leave it enabled.


2. Hardware Connections


2.1. Serial Modems

  BayCom-compatible modems can  be used without  changes. In rare  cases
  there could be problems which are caused by the more stable supply  of
  power to the  modem in AX25_MAC  compared BayCom. In  AX25_MAC the TXD
  line remains  steady at  approximately +12V, the BayCom solution has a
  pulse  signal on  this control  line. Therefore  the supplied  voltage
  to the  modem is a  little higher, the voltage on pin 7 of the TCM3105
  may not have the ideal voltage anymore. In  this case a  re-adjustment
  of the voltage on  pin 7 is required  (see modem  documentation). Tip:
  this voltage is  also very  important for  the correct  functioning of
  the software DCD, you can use  the  Soft  DCD  indicator to adjust the
  voltage.

  Additionally there  is a  option of  connecting the  modem (e.g.  from
  DigiCom)  to  a  LPT-Port.  When  using  this, 6 data output lines are
  switched to a stable 5V which  could be used as voltage supply  to the
  modem (Use at your own risk)

  Here are the connections for the Modem-Ports

  COM-Port

  Signal   25pol.  9pol.  Meaning

  DTR      20      4      Transmit data +/- 12V
  RTS      4       7      PTT, High active, -12V=RX, +12V=TX
  CTS      5       8      Receive data
  GND      7       5      Signal ground
  TXD      2       3      +12V for BayCom-Modem

  LPT-Port

  Signal   25pol.         Meaning

  DATA1-6  2-7            constant 5V approx. for Modem
  DATA7    8              Transmit data, TTL-Level
  DATA8    9              PTT, High active, 0V=RX, 5V=TX
  BUSY     11             Receive data
  GND      18-25          Signal ground

  Modems using the  AM7911 can also  be used. You  may have to  increase
  the TXTAIL-parameter (command @TA) a little for this. At this point  I
  like to point out you need different modems for higher baudrates.


2.2. BayCom-USCC-Card

  The  connections  needed  for  the  USCC  card  can  be  found  in its
  documentation. Here  I will  only supply  the numbering  given to  the
  ports  and  the  default  setting  of  the  modem  clock  supply   and
  baudrate:

  Port  SCC  Modem-Clock    Baud  Modem

  SCC0  1A   Softclock      1200  AFSK (TCM3105)
  SCC1  1B   Softclock      1200  AFSK (AM7911)
  SCC2  2A   Disable        9600  External
  SCC3  2B   DF9IC-Modem    9600  FSK  (DF9IC)

  The second  SCC controller  (Z8530) does  not have  to be present when
  the  appropriate  channels  are  not  used,  the  first  controller is
  mandatory.  Therefore  you  can  also  use  the  9k6 USCC card (option
  -PUSCC:<Base>:<IRQ>:31).

  The following  table shows  the exact  clock source  for receive (RxC)
  and  transmit  (TxC)  and  also  the  used  encoding  mode. The column
  contains the number  to be supplied  with the -PUSCC  option, the last
  column shows the equivalent  values for the BayCom  parameters CARRIER
  and  HENNING.  Soft-DCD  and  Duplex-Operation  can  be switched on by
  means of the commands @C and @D.

  -P              RxC  TxC  Mode CARRIER HENNING

   1 Softclock    DPLL BRG  NRZI   0/1      0
   2 Hardclock    DPLL RTxC NRZI   2-4      0
   3 DF9IC-Modem  TRxC RTxC NRZ    1-4      1

  BRG   Baud rate generator \ embedded inside the
  DPLL  Digital PLL         / SCC-Controller
  RTxC                      \ Connections of the
  TRxC                      / SCC-Controller


2.3.  BayCom PAR96 and PICPAR modem

  You  can  use  the  PAR96  and  PICPAR modem with AX25_MAC.  There are
  some things to note:

  The PAR96  and PICPAR  modem are  connected to  one of  the LPT ports.
  AX25_MAC assumes  a  normal  LPT port is present.  On modern PC's this
  can be an  EPP  port  (Enhanced Printer  Port). AX25_MAC  assumes this
  port is  set as if it is a normal LPT port at startup. If not AX25_MAC
  might fail to communicate  with the  modem  (I do not have information
  how to  setup the EPP port as normal printer port so I can't do it).

  There is  a particular  problem with  the PICPAR  modem.  The power to
  the PICPAR  modem is  supplied by  the LPT  port. If  the modem is not
  powered at the start of AX25_MAC, the  initialization  by  AX25_MAC is
  finished before the power on  the PICPAR is stable. The  communication
  to the modem completely  fails in that case.  A way to solve  it seems
  to be lowering  the value of  the capacitors on  the power line  or to
  switch over to an external power supply.

  You must specify the correct IRQ at startup: the default IRQ is 7.  If
  you attempt to use the wrong IRQ, the communication to the modem  will
  also fail.


2.4.  YAM96 modem

  You can  use the  YAM96 modem  with AX25_MAC. There are some things to
  note:

  Before you can use the YAM96  modem you have to download the  software
  into the FPGA by means of the YAMINIT program you got with the  modem.
  If this  is not  done before  AX25_MAC starts,  AX25_MAC will  give an
  error message.

  The YAM96 modem is connected to one of the COM ports. AX25_MAC assumes
  a normal  COM port is  present. When no port address is given AX25_MAC
  tries to  retrieve  this address  from  the BIOS area.  When using COM
  ports 3 or 4 this port address  maybe invalid.  In  that case you have
  to specify these values yourself.

  You must specify  the correct IRQ  at startup:   the default IRQ  is 4
  when using COM1 or COM3, 3 when using COM2 or COM4. If you attempt  to
  use the wrong IRQ, the communication to the modem will fail.

  Also be aware not to  use COM1 and COM3 or  COM2 and COM4 at the  same
  time. If your mouse is connected  to COM1 you should not use  COM3 for
  example.  You can use this combination however if COM3 is assigned  to
  another  IRQ  (so  in  fact  there  should be only one active COM-port
  using the IRQ at the same time).


2.5.  BPQ Ethernet

  You can use BPQ Ethernet with AX25_MAC. There are some things to note:

  You must  load an  FTP software  packet-driver  for your Ethernet card
  before loading  AX25_MAC. This kind of driver is usually supplied with
  an  Ethernet card.  Also on the Internet a lot of FTP software drivers
  can be  found  for a large  number of  cards.  The most famous are the
  Crynwr Software  packet  drivers by Russell Nelson.  These drivers are
  free to use, also the source code can be found on the Internet.

  AX25_MAC will try to program the  FTP software  packet  driver  to use
  multicast Ethernet packets. If that fails AX25_MAC  will fall  back to
  use broadcast  Ethernet packets. In that  case AX25_MAC will print out
  a message to inform the  user about this.  This BPQ driver will run at
  an equivalent speed  of approximately 19200 baud.  The reason for this
  low speed is  to minimize  the load on the CPU,  the speed can be much
  higher in theory but we  also  want  CPU time for  the application and
  for the other  modems that are connected. The transmitter is using the
  internal timer to start transmissions.


3. Information for Software Developers


3.1. Program-Interface

  The communication  with  AX25_MAC is  done using a software-interrupt.
  There are  several sub-functions  which are  selected by  the value in
  register AH.  Parameters are passed in the AL and ES:DI registers when
  needed.  On return register  AX will  hold the  result or  0xFFFF when
  an unknown  sub-function  was  selected.  All  input  characters  have
  to be read before  the output can  be  send  again.


3.1.1. Frame data

  The layout  of  the  "Frame data"  moved  between  the application and
  AX25_MAC is as follows:

  offset type      name
  ----------------------------
     0   word      data-length
     2   byte      port-number
     3   byte[400] data
   403

  Where: data-length: number of bytes in  "data"  for  this  AX.25 frame
                      excluding the 16 bit CRC (low-byte first)
         port-number: port on which this frame was received or has to be
                      transmitted, WARNING: zero based (0 = first port)
         data:        the raw AX.25 frame without CRC which was received
                      or shall be transmitted


3.1.2. AX25_MAC-Interface

  Sub functions:

  AH = 1     Check, whether an AX.25 frame is available on the input

             Returns :   AX = 0  No AX.25 frame available on the input
                         AX = 1  AX.25 frame available on the input

  AH = 2     AX.25 frame read (call only if sub function 1 reported
             the availability of an AX.25 frame on the input)

             Parameter:  ES:DI   Pointer to a storage area  to  put  the
                                 the "Frame data" in.

             Returns :   AL = 0  Frame copied to storage area
                         AL = -1 Error

  AH = 3     Output an AX.25 frame

             Parameter:  ES:DI   Pointer  to  a   storage   area   which
                                 contains the "Frame data" to transmit

             Returns :   AL = 0  Frame read and queued for transmission
                         AL = -1 Error

  AH = 0xFB  Request number of Ports

             Returns:   AL       Number of used ports (0 to 8)

  Eight bytes behind  the entry  of  the  AX25_MAC  interrupt  routine a
  recognition  string 'AX25_MAC'is available,  which can be used to find
  out which interrupt is used by AX25_MAC.

  Other functions may  do something but  are used for  debugging and may
  be  removed  in  the  future.  That's  why I regard these additions as
  'undocumented features'.  Look  in  the  source to find out what these
  functions currently do.
